Raster to Point (Conversion)

License Level:BasicStandardAdvanced

Summary

Converts a raster dataset to point features.

Usage

Syntax

RasterToPoint_conversion (in_raster, out_point_features, {raster_field})
ParameterExplanationData Type
in_raster

The input raster dataset.

The raster can be integer or floating-point type.

Raster Layer
out_point_features

The output feature class that will contain the converted points.

Feature Class
raster_field
(Optional)

The field to assign values from the cells in the input raster to the points in the output dataset.

It can be an integer, floating point, or string field.

Field

Code Sample

RasterToPoint example (Python window)

Converts a raster dataset to point features.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.RasterToPoint_conversion("source.img", "c:/output/source.shp", "VALUE")
RasterToPoint example (stand-alone script)

Converts a raster dataset to point features.

# Name: RasterToPoint_Ex_02.py
# Description: Converts a raster dataset to point features.
# Requirements: None

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Set local variables
inRaster = "source.img"
outPoint = "c:/output/source.shp"
field = "VALUE"

# Execute RasterToPoint
arcpy.RasterToPoint_conversion(inRaster, outPoint, field)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
3/3/2014