Polyline To Raster (Conversion) (ArcInfo only) |
|
Release 9.2
Last modified April 2, 2008 |
![]() ![]() ![]() Print all topics in : "Tools" |
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
Any shapefile, coverage, or geodatabase feature class containing polyline features can be converted to a raster dataset.
If the input field contains floating-point values, the output raster will be floating point; if the input field contains integer values, the output raster will be integer; and if the input field contains string values, the output raster will contain an integer value field and a string field.
Polyline To Raster is a complement to the Raster To Polyline tool, which converts a raster to a feature dataset.
Polyline To Raster is a new implementation of the Feature To Raster tool. It provides greater user control over the assignment of cell values when more than one feature is present in the output cell.
The output cell size is the size of each pixel in the output raster dataset.
The following environments affect this tool: current workspace, scratch workspace, output coordinate system, output extent, output has Z values, Z resolution, output CONFIG keyword, output spatial grid 1,2,3, output XY domain, output Z domain, pyramid, compression, and tile size.
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.
|
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 |
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.
|
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 |
# 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()