Raster To Polygon (Conversion) |
|
Release 9.2
Last modified April 2, 2008 |
![]() ![]() ![]() Print all topics in : "Tools" |
Converts a raster dataset to polygon features.
Usage tips
Command line and Scripting
The input raster can have any cell size and may be any valid integer raster dataset.
The Field parameter allows you to choose which column in the raster dataset will become an attribute in the output polygon file. The column containing the cell values (VALUE) will become a column with the heading Grid_code in the attribute table of the output feature class.
The following environments affect this tool: current workspace, scratch workspace, output coordinate system, and output extent.
Command line syntax
An overview of the Command Line window
RasterToPolygon_conversion <in_raster> <out_polygon_features> {SIMPLIFY | NO_SIMPLIFY} {raster_field}
Parameter | Explanation | Data Type |
<in_raster> |
The input integer raster dataset. |
Composite Geodataset |
<out_polygon_features> |
The output feature class that will contain the converted polygons. |
Feature Class |
{SIMPLIFY | NO_SIMPLIFY} |
Determines if the output polygons will be smoothed into simpler shapes or conform to the input raster's cell edges.
|
Boolean |
{raster_field} |
The field used to assign values from the cells in the input raster to the polygon features in the output dataset. It can be an integer or a string field. |
Field |
RasterToPolygon_conversion landuse.tif landuses SIMPLIFY Values
Scripting syntax
About getting started with writing geoprocessing scripts
RasterToPolygon_conversion (in_raster, out_polygon_features, simplify, raster_field)
Parameter | Explanation | Data Type |
in_raster (Required) |
The input integer raster dataset. |
Composite Geodataset |
out_polygon_features (Required) |
The output feature class that will contain the converted polygons. |
Feature Class |
simplify (Optional) |
Determines if the output polygons will be smoothed into simpler shapes or conform to the input raster's cell edges.
|
Boolean |
raster_field (Optional) |
The field used to assign values from the cells in the input raster to the polygon features in the output dataset. It can be an integer or a string field. |
Field |
# RasterToPolygon_sample.py # Description: # Converts a raster to polygon features. # Requirements: None # Author: ESRI # Date: Oct 20, 2005 # Import system modules import arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() try: # Set local variables InRaster = "C:/data/raster1" OutPolygonFeatures = "C:/data/raster2polygon.shp" # Process: RasterToPolygon_conversion gp.RasterToPolygon_conversion(InRaster, OutPolygonFeatures, "NO_SIMPLIFY") except: # Print error message if an error occurs print gp.GetMessages()
Map Algebra syntax
See GridShape.
ArcObjects syntax
See RasterDataToPolygonFeatureData.