GME

Geospatial Modelling Environment

convert.polygonstoraster (Converts Polygons to Raster)

Converts a polygon dataset to raster format

Description

This command converts a polygon dataset to raster format based on a user-specified field in the attribute table of the polygon dataset. This command works on both numeric and string (text) fields. If the field type is numeric, the output raster pixel type will be matched to the field type. If the field type is string, then the output raster will be integers representing unique values based on the string field. The string values will be written to the attribute table of the raster so that you may easily relate the raster integers to the corresponding string.

The output raster is assigned the same spatial reference as the input polygon layer. The cellsize must be specified in coordinate system units (e.g. meters for UTM).

Note that if the field data type is double precision, the output format is forced to be Imagine Image (.img) format as GeoTIFF and Grid formats do not support double precision values.

Syntax

convert.polygonstoraster(in, field, out, cellsize);

inthe input polygon data source
fieldthe field in the polygon data source upon which the new raster values will be based
outthe output raster dataset to create
cellsizethe cell size resolution in coordinate system units

Example

convert.polygonstoraster(in="C:\data\soils.shp", field="SOILTYPE", out="C:\data\soiltype.img", cellsize=50);


Messages

Please consider making a purchase to support the continued development of these tools  Read more...

Tips on how to use this interface efficiently  Read more...

Links

Open Source GIS

Copyright © 2001-2014 Hawthorne L. Beyer, Ph.D., Spatial Ecology LLC    Connect on LinkedIn