Converts a raster to a feature dataset, as points, lines, or polygons.
Rasters can be converted to point, line, or polygon features.
Parameter | Explanation |
---|---|
inputRaster |
The input raster layer. |
field |
A field that specifies the conversion value. It can be any integer or text value. A field containing floating-point values can only be used if the output is to a point dataset. The default is the Value field, which contains the value in each raster cell. |
outputType |
Specifies the output type.
If the output type is Line or Polygon, an additional parameter appears allowing the simplification of lines or polygons. |
simplifyLinesOrPolygons (Optional) |
Specifies whether lines or polygons will be simplified (smoothed). The smoothing is done in such a way that the line contains a minimum number of segments while remaining as close as possible to the original raster cell edges.
|
outputName |
The output feature class that will contain the converted points, lines, or polygons. |
createMultipartFeatures (Optional) |
Specifies whether the output polygons will consist of single-part or multipart features.
|
maxVerticesPerFeature (Optional) |
The vertex limit used to subdivide a polygon into smaller polygons. This parameter produces similar output as that created by the Dice tool in the Data Management toolbox. If left empty, the output polygons will not be split. This is the default. This parameter is only supported if Output Type is Polygon. |
ConvertRasterToFeature example 1 (Python window)
This example converts a raster to polygon features.
import arcpy arcpy.ConvertRasterToFeature_ra('https://MyPortal.esri.com/server/rest/services/Hosted/Landuse/ImageServer', 'Value', 'POLYGON', 'SIMPLIFY', 'outFeatures')
ConvertRasterToFeature example 2 (stand-alone script)
This example converts a raster to polygon features.
#------------------------------------------------------------------------------- # Name: ConvertRasterToFeature_Ex_02.py # Description: Convert a raster to polygon features. # # Requirements: ArcGIS Image Server # Import system modules import arcpy # Set local variables inRaster = 'https://MyPortal.esri.com/server/rest/services/Hosted/Landuse/ImageServer' inField = 'Value' outType = 'POLYGON' simplify = 'SIMPLIFY' outFeatures = 'outFeatures' arcpy.ConvertRasterToFeature_ra(inRaster, inField, outType, simplify, outFeatures)
There are no tags for this item.
There are no credits for this item.
There are no use limitations for this item.