Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#2194 closed defect (fixed)

gdal_contour always uses field id's of 0 and 1 for id and elevation

Reported by: winkey Owned by: chaitanya
Priority: normal Milestone: 1.7.0
Component: Utilities Version: unspecified
Severity: normal Keywords: contour
Cc: warmerdam

Description

gdal_contour has field id values of 0 and 1 hard coded into the app for id and elevation. this assumes the layer your contouring to has no default fields. a kml layer has 2 default layers name and description.

I am unsure how this issue effects ogr2ogr i have not checked. i was contouring and translating via the c api when i noticed the problem.

brian

Attachments (1)

gdal_contour.cpp.diff (1.4 KB ) - added by chaitanya 15 years ago.
Checks the field IDs for ID and elevation in the FeatureDefn instead of assuming 0 and 1

Download all attachments as: .zip

Change History (6)

comment:1 by warmerdam, 15 years ago

Cc: warmerdam added
Component: defaultUtilities
Keywords: contour added
Milestone: 1.7.0
Owner: changed from warmerdam to ashrafroni

Ashraf,

The gdal_contour program should try to keep track of what the id is of newly added fields, and use those fields as the target for the id and elevation so that output to formats with some automatic base fields (like KML) will work properly.

comment:2 by warmerdam, 15 years ago

Owner: changed from ashrafroni to chaitanya

Chaitanya,

Could you address this one at your convenience. It is low priority.

by chaitanya, 15 years ago

Attachment: gdal_contour.cpp.diff added

Checks the field IDs for ID and elevation in the FeatureDefn instead of assuming 0 and 1

comment:3 by chaitanya, 15 years ago

Status: newassigned

I checked this patch with the KML format and it worked fine.

comment:4 by chaitanya, 15 years ago

Resolution: fixed
Status: assignedclosed

comment:5 by warmerdam, 15 years ago

The fix was applied in trunk (r16577).

Note: See TracTickets for help on using tickets.