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.
See the following examples:
Result = ENVISpatialGridRaster(Input_Raster [, Keywords=value])
This routine returns a reference to an ENVIRaster.
Specify an input ENVIRaster. If you are working with two or more source rasters, you must run the ENVISpatialGridRaster function separately for each raster.
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.
Specify an ENVIGridDefinition object that defines the pixel size, rows and columns, and coordinate system of the desired spatial reference.
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.
ENVI 5.3, Service Pack 1
Documented the dehydrated form of this virtual raster
Added Dehydrate and Hydrate methods