Raster To Polyline (Conversion) |
|
Release 9.2
Last modified April 2, 2008 |
![]() ![]() ![]() Print all topics in : "Tools" |
Converts a raster to polyline 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 polyline 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 feature output is assumed to be a shapefile.
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
RasterToPolyline_conversion <in_raster> <out_polyline_features> {ZERO | NODATA} {minimum_dangle_length} {SIMPLIFY | NO_SIMPLIFY} {raster_field}
Parameter | Explanation | Data Type |
<in_raster> |
The input integer raster dataset. |
Composite Geodataset |
<out_polyline_features> |
The output feature class that will contain the converted polylines. |
Feature Class |
{ZERO | NODATA} |
Specifies the value that will identify the background cells. The raster dataset is viewed as a set of foreground cells and background cells. The linear features are formed from the foreground cells.
|
String |
{minimum_dangle_length} |
Minimum length of dangling polylines that will be retained. The default is zero. |
Double |
{SIMPLIFY | NO_SIMPLIFY} |
Simplifies a line by removing small fluctuations or extraneous bends from it while preserving its essential shape.
|
Boolean |
{raster_field} |
The field used to assign values from the cells in the input raster to the polyline features in the output dataset. It can be an integer or a string field. |
Field |
RasterToPolyline_conversion JeffersonRoads.tif roads NODATA # NO_SIMPLIFY Values
Scripting syntax
About getting started with writing geoprocessing scripts
RasterToPolyline_conversion (in_raster, out_polyline_features, background_value, minimum_dangle_length, simplify, raster_field)
Parameter | Explanation | Data Type |
in_raster (Required) |
The input integer raster dataset. |
Composite Geodataset |
out_polyline_features (Required) |
The output feature class that will contain the converted polylines. |
Feature Class |
background_value (Optional) |
Specifies the value that will identify the background cells. The raster dataset is viewed as a set of foreground cells and background cells. The linear features are formed from the foreground cells.
|
String |
minimum_dangle_length (Optional) |
Minimum length of dangling polylines that will be retained. The default is zero. |
Double |
simplify (Optional) |
Simplifies a line by removing small fluctuations or extraneous bends from it while preserving its essential shape.
|
Boolean |
raster_field (Optional) |
The field used to assign values from the cells in the input raster to the polyline features in the output dataset. It can be an integer or a string field. |
Field |
# RasterToPolyline_sample.py # Description: # Converts a raster to polyline 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" OutPolylineFeatures = "C:/data/raster2polyline.shp" # Process: RasterToPolyline_conversion gp.RasterToPolyline_conversion(InRaster, OutPolylineFeatures, "NODATA", "", "NO_SIMPLIFY") except: # Print error message if an error occurs print gp.GetMessages()
Map Algebra syntax
See GridLineShape.
ArcObjects syntax
See RasterDataToLineFeatureData.