Extract Multi Values to Points (Spatial Analyst)

Available with Spatial Analyst license.

Summary

Extracts cell values at locations specified in a point feature class from one or more rasters and records the values to the attribute table of the point feature class.

Usage

  • This tool modifies the input point features and may change its internal feature ID, which may be named ObjectID, FID, or OID. It is recommended that you include a unique ID field in the attribute table before performing the analysis.

  • Cell values will be extracted from all input rasters at each location. A new field containing the cell values for each input raster will be appended to the input point feature class.

  • Additional attributes from the input raster table, if any, will not be appended to the input point features.

  • The input rasters will not be resampled honoring the analysis environment. Instead, the cell values will be extracted from all input rasters in their original resolution and spatial reference by projecting the input locations to the raster's spatial reference from which values are extracted.

    However, the analysis environment is applied to the input locations.

  • Locations that extract values from NoData cells in the input raster will be given a <null> value in the output table. For shapefiles, because null fields are not supported, NoData cells are instead represented in the table with a value of -9999.

  • The shapefile format has limitations on the maximum length of a field name; it is 10 characters. As a result, any fields that are appended to the attribute table of an input shapefile will have their names truncated and made unique by default. This may make it difficult to distinguish between the fields, particularly if the names are long or very similar. In this case, it is recommended that you copy the input shapefile to a file geodatabase and use the feature class for the analysis.

  • If the Input point features (in_point_features in Python) values are defined using an XY event layer, the underlying event table is directly updated. The tool will fail if the underlying table is read-only.

  • If the Input point features value is a point feature class with no spatial index, a warning will be issued. To improve tool performance for an input with a large number of points, create a spatial index. See the Add Spatial Index tool for more information.

  • The tool will fail to execute with multipoint features. To perform analysis with multipoint features, convert them to single point features before using them in the extraction tool. See processing multipoint data for more information.

  • Any combination of rasters (single band or multiband) can be specified for the Input rasters (in_rasters in Python) parameter.

  • When a multiband raster is specified as one of the Input Rasters (in_rasters in Python) values, all of the bands in that input will be used.

    To process a selection of bands from an input multiband raster, first create a raster dataset composed of those particular bands using the Composite Bands tool. Then use the result in the list of input rasters.

  • When the input is a multiband raster, a field will be added for all bands with a b1_, b2_, …bn prefix added to the name of the output field denoting the band number.

  • Output field names are created from the name of the input raster by default; otherwise, you can specify a unique name for each field to store raster values.

  • The Bilinear interpolation of values at point locations (bilinear_interpolate_values in Python) parameter specifies whether interpolation will be used to obtain the values from the raster. The default option is to extract the exact cell value at the input locations. To extract interpolated values using the bilinear method, check this parameter (bilinear_interpolate_values = "BILINEAR" in Python).

  • If a feature is specified in the Mask environment, an internal raster is created using the minimum cell size of the input rasters. During extraction, the internal mask raster is again resampled to the cell size of each input raster.

  • See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

Parameters

LabelExplanationData Type
Input point features

The input point features to which raster values will be added.

Feature Layer
Input rasters

The input raster (or rasters) values that will be extracted based on the input point feature location.

Optionally, you can supply the name for the field to store the raster value. By default, a unique field name will be created based on the input raster dataset name.

Extract Values
Bilinear interpolation of values at point locations
(Optional)

Specifies whether interpolation will be used.

  • Unchecked—No interpolation will be applied; the value of the cell center will be used. This is the default.
  • Checked—The value of the cell will be calculated from the adjacent cells with valid values using bilinear interpolation. NoData values will be ignored in the interpolation unless all adjacent cells are NoData.
Boolean

Derived Output

LabelExplanationData Type
Updated point features

The updated point features.

Feature Class

ExtractMultiValuesToPoints(in_point_features, in_rasters, {bilinear_interpolate_values})
NameExplanationData Type
in_point_features

The input point features to which raster values will be added.

Feature Layer
in_rasters
[Raster, {Output Field Name}]

The input raster (or rasters) values that will be extracted based on the input point feature location.

Optionally, you can supply the name for the field to store the raster value. By default, a unique field name will be created based on the input raster dataset name.

Extract Values
bilinear_interpolate_values
(Optional)

Specifies whether interpolation will be used.

  • NONENo interpolation will be applied; the value of the cell center will be used. This is the default.
  • BILINEARThe value of the cell will be calculated from the adjacent cells with valid values using bilinear interpolation. NoData values will be ignored in the interpolation unless all adjacent cells are NoData.
Boolean

Derived Output

NameExplanationData Type
out_point_features

The updated point features.

Feature Class

Code sample

ExtractMultiValuesToPoints example 1 (Python window)

Extract the cell values from multiple rasters to attributes in a point shapefile feature class.

import arcpy
from arcpy.sa import *
from arcpy import env 
env.workspace = "c:/sapyexamples/data"
ExtractMultiValuesToPoints("observers.shp", [["elevation", "ELEV"], 
                           ["costraster", "COST"], ["flowdir", "DIR"]], "NONE")
ExtractMultiValuesToPoints example 2 (stand-alone script)

Extract the cell values from multiple rasters to attributes in a point shapefile feature class using interpolation.

# Name: ExtractMultiValuesToPoints_Ex_02.py
# Description: Extracts the cells of multiple rasters as attributes in
#    an output point feature class.  This example takes a multiband IMG
#    and two GRID files as input.
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

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

# Set local variables
inPointFeatures = "poi.shp"
inRasterList = [["doqq.img", "doqqval"], ["redstd", "focalstd"], 
                ["redmin", "focalmin"]]

# Execute ExtractValuesToPoints
ExtractMultiValuesToPoints(inPointFeatures, inRasterList, "BILINEAR")

Licensing information

  • Basic: Requires Spatial Analyst
  • Standard: Requires Spatial Analyst
  • Advanced: Requires Spatial Analyst

Related topics