Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Conversion toolbox > From Raster toolset > Tools

Raster To Polygon (Conversion)

Release 9.2
Last modified April 2, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Converts a raster dataset to polygon features.


Usage tips

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.

  • SIMPLIFY — The polygons will be smoothed into simpler shapes. This is the default.
  • NO_SIMPLIFY — The polylines will 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
Data types for geoprocessing tool parameters


Command line example

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.

  • SIMPLIFY — The polygons will be smoothed into simpler shapes. This is the default.
  • NO_SIMPLIFY — The polylines will 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

Data types for geoprocessing tool parameters


Script example

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

The Spatial Analyst extension must be present to use this link.

ArcObjects syntax
See RasterDataToPolygonFeatureData.

The Spatial Analyst extension must be present to use this link.

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.