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

Raster To Polyline (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 to polyline features.


Usage tips

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.

  • ZERO — The background is composed of cells of zero or less or NoDdata. All cells with a value greater than zero are considered a foreground value.
  • NODATA — The background is composed of NoData cells. All cells with valid values belong to the foreground.

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.

  • SIMPLIFY — The polylines will be simplified. This is the default.
  • NO_SIMPLIFY — The polylines will not be simplified.

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
Data types for geoprocessing tool parameters


Command line example

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.

  • ZERO — The background is composed of cells of zero or less or NoDdata. All cells with a value greater than zero are considered a foreground value.
  • NODATA — The background is composed of NoData cells. All cells with valid values belong to the foreground.

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.

  • SIMPLIFY — The polylines will be simplified. This is the default.
  • NO_SIMPLIFY — The polylines will not be simplified.

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

Data types for geoprocessing tool parameters


Script example

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

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

ArcObjects syntax
See RasterDataToLineFeatureData.

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.