Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#3535 closed defect (fixed)

gdal_contour generates contours which are not right-side-high

Reported by: pcor Owned by: chaitanya
Priority: normal Milestone:
Component: Algorithms Version: 1.7.1
Severity: normal Keywords:
Cc: warmerdam

Description

To see the problem, generate contours from the attached testdem.tif with an interval of 12.192. Several contours near the central high point are oriented counter clockwise.

The logic for determining left-side-high in GDALContourGenerator::ProcessRect? is wrong. Patch attached which correctly determines the high side, avoids the need to reverse vectors by giving them the correct orientation to start with, and removes return codes from several functions which either never return a failure code or for which the return code is always ignored.

Attachments (2)

testdem.tif (17.1 KB) - added by pcor 10 years ago.
contour.diff (17.3 KB) - added by pcor 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by pcor

Attachment: testdem.tif added

Changed 10 years ago by pcor

Attachment: contour.diff added

comment:1 Changed 10 years ago by warmerdam

Cc: warmerdam added
Owner: changed from warmerdam to chaitanya

Chaitanya,

Please review and apply as appropriate.

comment:2 Changed 8 years ago by chaitanya

Resolution: fixed
Status: newclosed

Fixed in #3462 Corrected some typos in docs in r34133 in trunk.

comment:3 Changed 8 years ago by warmerdam

The revision was actually r24133.

Note: See TracTickets for help on using tickets.