Sample (Map Viewer)

Available with ArcGIS Image for ArcGIS Online.

The Sample tool extracts cell values from all of the input rasters at each input feature location.

The output is a hosted table layer or a hosted feature layer.

Examples

Some example applications of this tool include the following:

  • Extract attributes for cell tower location from multiple rasters, such as land use, soil type, elevation, and distance to road.
  • Extract soil temperature at different depths for a given set of points.
  • From 30 years of monthly sea-surface temperature data, summarize at animal locations or within home ranges for a given time when an animal species was observed.

Usage notes

The Sample tool includes configurations for input layers, sample settings, and result layers.

Input layer(s)

The Input layer(s) group includes the following parameters:

  • Imagery layer(s) is used to choose the image or list of images whose values will be sampled based on the input location data.

    Any combination of rasters, such as single band, multiband, multidimensional, or multivariate, can be specified as input rasters. The structure of the output table changes when the input rasters are multidimensional. When a multiband raster is specified as one of the input rasters, 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. Use the result in the list of input rasters.

    To sample all slices from a multidimensional imagery layer, it must be the only input raster.
  • Location layer is used to choose the layer identifying positions you want to sample. The following layer types are supported:
    • Raster—Pixels containing valid values (not NoData) are used to extract the pixel values from all input rasters, and the center of the pixel is used for point locations.
    • Point—Values will be sampled at each point location.
    • Polyline or polygon—Values will be sampled at the polygon or polyline centroid. If the input raster is multidimensional, the values will be aggregated based on Statistics type.

Sample settings

The Sample settings group includes the following parameters:

  • Resampling technique specifies the resampling algorithm during the sampling process. This parameter includes the following options:
    • Nearest—Nearest neighbor, which uses the value of the closest cell to assign a value to the output cell when resampling. This is the default.
    • Bilinear—Bilinear interpolation, which determines the new value of a cell based on a weighted distance average of the four nearest input cell centers.
    • Cubic—Cubic convolution, which determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers.
  • Unique ID field specifies a field in the layer that contains a different value for each location or input feature.
  • Process as multidimensional indicates whether the input imagery layers include multidimensional data.
  • Acquisition information of location data specifies the time, depth, or other acquisition data associated with the location cells or features. This parameter is available when Process as multidimensional is enabled and includes the following subparameters:
    • Dimension—Specifies the dimension from the multidimensional input layer.
    • Start field or value—Specifies the field used to start the time range within the multidimensional input layer or enter a specific dimension value.
    • End field or value—Specifies the field used to end the time range within the multidimensional input layer or enter a specific dimension value.
    • Relative value or days before—Specifies a nonnegative number to add to the Dimension field or value to define the start of a dimension value range.
    • Relative value or days after—Specifies a nonnegative number to add to the Dimension field or value to define the end of a dimension value range.
  • Statistics type specifies the type of statistics to be calculated. This parameter is available when Process as multidimensional is enabled. Statistics type includes the following options:
    • Minimum—Finds the minimum value within the specified range.
    • Maximum—Finds the maximum value within the specified range.
    • Median—Finds the median value within the specified range.
    • Mean—Calculates the average for the specified range.
    • Sum—Calculates the sum of the variables within the specified range.
    • Majority—Finds the value that occurs most frequently.
    • Minority—Finds the value that occurs least frequently.
    • Standard Deviation—Calculates the standard deviation.
    • Percentile—Calculates a defined percentile within the specified range.
  • Percentile value specifies the percentile that will be used for sampling. This parameter is available when Process as multidimensional is enabled and Percentile is chosen as the Statistics type.

    This value can range from 0 to 100. The default is 90.

  • Buffer distance field or value specifies the distance around the location data features used for sampling multidimensional imagery layers. This parameter is available when Process as multidimensional is enabled.

Result layer

The Result layer group includes the following parameters:

  • Output name determines the name of the layer that is created and added to the map. The name must be unique. If a layer with the same name already exists in your organization, the tool will fail and you will be prompted to use a different name.
  • Output type determines the type of layer to create. The output can be either a table layer or a feature layer.
  • Output layout specifies whether sampled values appear in rows or columns in the output table. This parameter is only available when the Imagery layer(s) parameter is a multidimensional raster and contains one variable and one dimension, and each slice is a single-band raster.
  • Save in folder specifies the name of a folder in My Content where the result will be saved.

Environments

Analysis environment settings are additional parameters that affect a tool's results. You can access the tool's analysis environment settings from the Environment settings parameter group.

This tool honors the following analysis environments:

Credits

This tool consumes credits.

Use Estimate credits to calculate the number of credits that will be required to run the tool. For more information, see Understand credits for spatial analysis.

Outputs

This tool includes the following outputs:

  • A feature layer with the pixel values from the source imagery layers for each input location in the attribute table. A feature layer is created if the Output type parameter is set to Features. The feature layer will include the following fields:
    • X—Indicates the horizontal coordinate of the input point.
    • Y—Indicates the vertical coordinate of the input point.
    • Fields containing values for each raster band or source raster (the name of the raster band will be included in the field name).
      Note:

      If the input layer is multidimensional, the output will include a field for each of the specified time slices.

  • A table layer with the pixel values from the source imagery layers for each input location in the attribute table. A table layer is created if the Output type parameter is set to Table. The table layer will include the following columns:
    • X—Indicates the horizontal coordinate of the input point.
    • Y—Indicates the vertical coordinate of the input point.
    • Columns containing values for each raster band or source raster (the name of the raster band will be included in the column name).

Licensing requirements

This tool requires the following licensing and configurations:

  • Creator or GIS Professional user type
  • Publisher, Facilitator, or Administrator role, or an equivalent custom role
  • ArcGIS Image for ArcGIS Online

Resources

Use the following resources to learn more: