Harris Geospatial / Docs Center / ENVI API / Data Control / ENVISpatialGridRaster

ENVI

ENVISpatialGridRaster

ENVISpatialGridRaster

This function constructs an ENVIRaster from a source raster that has been reprojected and resampled to a grid with a standard spatial reference, a pre-defined pixel size, and the same number of rows and columns.

Rasters that share a common spatial grid are often used for spatiotemporal analysis, for example, studying the change in atmospheric pressure or a glacier's extent over time in a specific location.

This routine is designed for use with two or more images with different projections. MODIS Level-3 gridded products do not need this routine; the images already are gridded to the same spatial reference. Even when you run processes like RPC orthorectification or GLT reprojection on a series of images (for spatiotemporal analysis), the results may not necessarily be in a common spatial grid. Instrument drift over time may result in a slight shift of pixels over a given geographic coordinate. Reprojecting these images to a spatial grid will ensure accurate spatial extents.

If the spatial grid extends beyond the boundaries of an input raster, those pixels will have values of 0.

The result is a virtual raster, which has some additional considerations with regard to methods and properties. See Virtual Rasters for more information.

Example


See the following examples:

Syntax


Result = ENVISpatialGridRaster(Input_Raster [, Keywords=value])

Return Value


This routine returns a reference to an ENVIRaster.

Arguments


Input_Raster

Specify an input ENVIRaster. If you are working with two or more source rasters, you must run the ENVISpatialGridRaster function separately for each raster.

Methods


This virtual raster inherits methods and properties from ENVIRaster; however the following methods will override the ENVIRaster methods:

Dehydrate

Hydrate

Keywords


ERROR

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.

GRID_DEFINITION (optional)

Specify an ENVIGridDefinition object that defines the pixel size, rows and columns, and coordinate system of the desired spatial reference.

RESAMPLING (optional)

Specify the resampling method to use when creating the spatial grid:

  • Nearest Neighbor: Uses the nearest pixel without any interpolation.
  • Bilinear (default): Performs a linear interpolation using four pixels to resample.
  • Cubic Convolution: Uses 16 pixels to approximate the sinc function using cubic polynomials to resample the image.

Version History


ENVI 5.2

Introduced

ENVI 5.3, Service Pack 1

Documented the dehydrated form of this virtual raster

ENVI 5.4

Added Dehydrate and Hydrate methods

See Also


ENVIRaster, ENVIRegridRasterTask, ENVIRasterSeries, ENVIRasterSeriesLayer, ENVIBuildRasterSeriesTask, ENVIBuildTimeSeriesTask


This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
© 2017 Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation