[Gdal-dev] gdal_contour

Frank Warmerdam warmerdam at pobox.com
Tue Jun 15 11:09:11 EDT 2004


Norman Barker wrote:
> Hi,
> 
> I am looking to use gdal_contour (because it looks cool!), but I can't 
> find any documentation to it anywhere!  I have
> got a copy of the exe from the open_ev download, how to use it?  Also 
> how can you use it with MapServer?

Norman,

In it's simpliest form you would do something like:

   gdal_contour -a elev dem.tif contour.shp 10.0

This would create 10meter contours from the DEM data in dem.tif and produce
a shapefile in contour.shp/shx/dbf with the contour elevations in the "elev"
attribute.

Some flags which I remember the purpose of are:

  -b <band>: picks a particular band to get the DEM from.  Defaults to band 1.
  -a <name>: provides a name for the attribute in which to put the elevation.
             If not provided not elevation attribute is attached.
  -3d: Force production of 3D vectors instead of 2D.  Includes elevation at
       every vertex.
  -inodata: Ignore any nodata value implied in the dataset - treat all values as valid.
  -snodata <value>: Input pixel value to treat as "nodata".
  -f <format>: create output in a particular format, default is shapefiles.
  -i <interval>: elevation interval between contours.
  -off <offset>: Offset from zero relative to which to interpret intervals.
  -fl <level>: Name one or more "fixed levels" to extract.

I need to get this into the utilities document.

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list