[Gdal-dev] Question about gdal_contour

Frank Warmerdam warmerdam at pobox.com
Tue Jan 16 11:33:35 EST 2007

William Hughes wrote:
> Hi:
>      I am trying to use gdal_contour.  When I call it with a couple
> of simple options the lines produced have nodes with coordinates
> in raw pixel, line space.  Is there an easy way to change these
> to georeferenced?


If the source file has a meaningful geotransform, then it should be used
to convert the locations into georeferenced coordinates as the contour
generation runs.  However, if you only have GCPs then there is currently
no mechanism to use those to establish georeferencing for the contours.

There is one funny aspect to the way the contour algorithm gets the
geotransform.  It has to ask for the dataset from the band object
internally, and it is vaguely possible this could be linking back to a
dummy band in some cases (some format drivers).  So if you believe you
have a geotransform but you aren't getting georeferenced vectors let me
know the details of the input format - perhaps a gdalinfo report.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

More information about the Gdal-dev mailing list