- Main Page
- Classes
- Files
- Related Pages

# gdal_contour

builds vector contour lines from a raster elevation model

Usage:

    Usage: gdal_contour [-b <band>] [-a <attribute_name>] [-3d] [-inodata]
                        [-snodata n] [-f <formatname>] [-i <interval>]
                        [-off <offset>] [-fl <level> <level>...]
                        <src_filename> <dst_filename>

This program generates a vector contour file from the input raster elevation model (DEM).

-s_srs srs def:
  source spatial reference set. The coordinate systems that can be passed are anything supported by the OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes (ie. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prf file containing well known text. </dl

-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 no 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.

Example:

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.

    gdal_contour -a elev dem.tif contour.shp -i 10.0

Generated for GDAL by 1.5.1.