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

Polyline To Raster (Conversion) (ArcInfo only)

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

Print all topics in : "Tools"


Related Topics

NOTE: This tool is available with an ArcView or ArcEditor license, if the Spatial Analyst extension or the 3D Analyst extension is installed.


Converts polyline features to a raster dataset.

Learn more about how the Polyline to Raster tool works


Usage tips

Command line syntax
An overview of the Command Line window
PolylineToRaster_conversion <in_features> <value_field> <out_raster_dataset> {MAXIMUM_LENGTH | MAXIMUM_COMBINED_LENGTH} {priority_field} {cellsize}

Parameter Explanation Data Type
<in_features>

The polyline input feature dataset to be converted to a raster.

Feature Layer
<value_field>

The field used to assign values to the output raster. It can be any field of the input feature dataset's attribute table.

Field
<out_raster_dataset>

The output raster dataset to be created.

When you're not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for a GRID file format.

Raster Dataset
{MAXIMUM_LENGTH | MAXIMUM_COMBINED_LENGTH}

The method to determine how the cell will be assigned a value when more than one feature falls within a cell.

  • MAXIMUM_LENGTH — The feature with the longest length that covers the cell will determine the value to assign to the cell.
  • MAXIMUM_COMBINED_LENGTH — If there is more than one feature in a cell with the same value, the lengths of these features will be combined. The combined feature with the longest length within the cell will determine the value to assign to the cell.

String
{priority_field}

This field is used when a feature should take preference over another feature with the same attribute.

Field
{cellsize}

The cell size from which the output raster dataset will be created.

Analysis Cell Size
Data types for geoprocessing tool parameters


Command line example

PolylineToRaster c:\data\myPlines.shp myField myRaster MAXIMUM_LENGTH NONE 5.2

Scripting syntax
About getting started with writing geoprocessing scripts
PolylineToRaster_conversion (in_features, value_field, out_raster_dataset, cell_assignment, priority_field, cellsize)

Parameter Explanation Data Type
in_features (Required)

The polyline input feature dataset to be converted to a raster.

Feature Layer
value_field (Required)

The field used to assign values to the output raster. It can be any field of the input feature dataset's attribute table.

Field
out_raster_dataset (Required)

The output raster dataset to be created.

When you're not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for a GRID file format.

Raster Dataset
cell_assignment (Optional)

The method to determine how the cell will be assigned a value when more than one feature falls within a cell.

  • MAXIMUM_LENGTH — The feature with the longest length that covers the cell will determine the value to assign to the cell.
  • MAXIMUM_COMBINED_LENGTH — If there is more than one feature in a cell with the same value, the lengths of these features will be combined. The combined feature with the longest length within the cell will determine the value to assign to the cell.

String
priority_field (Optional)

This field is used when a feature should take preference over another feature with the same attribute.

Field
cellsize (Optional)

The cell size from which the output raster dataset will be created.

Analysis Cell Size

Data types for geoprocessing tool parameters


Script example

# PolyllineToRaster_conversion_sample.py
# Description: 
#   Converts polyline features to a raster.
# Requirements: None
# Author: ESRI
# Date: Oct 20, 2005
# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

try:
    # Set local variables
    InFeatures = "C:/data/myPlines.shp"
    OutRaster = "C:/data/out_raster"

    # Process: PolylineToRaster
    gp.PolylineToRaster_conversion(InFeatures, "myField", OutRaster, "MAXIMUM_LENGTH", "priorFld","1")

except:
    # Print error message if an error occurs
    gp.GetMessages()

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