Harris Geospatial / Docs Center / Using ENVI / Explore Imagery / Spatiotemporal Analysis

ENVI

Spatiotemporal Analysis

Spatiotemporal Analysis

Landsat Time Series Tutorial

Temporal Processing Examples

Analyzing spatiotemporal data is useful for deriving statistics from the data or visualizing changes in the data over time. ENVI allows you to build a series of images (called a raster series) for spatiotemporal analysis, then view the images incrementally. Spatiotemporal analysis involves the following steps:

  1. Build a Series
  2. Regrid a Series
  3. View a Series

Build a Series


Follow these steps to build a raster series file (.series), which is a text file in JSON format that references the locations of images within the series. You need to build a raster series file before you can view the series.

You can also write scripts to perform these tasks using the ENVIBuildRasterSeriesTask and ENVIBuildTimeSeriesTask routines. See the ENVIBuildRasterSeriesTask topic for an example of building a raster series from HDF5 data or NITF files that have multiple image segments.

  1. Choose one of the following options:
    • From the Toolbox, select Spatiotemporal Analysis > Build Raster Series.
    • From the menu bar, select File > New > Build Raster Series.
  2. Click the Add Raster button and select an option to import images. The choices are as follows:
    • Add by Filename: Browse to files on disk. Select multiple files at once using the Ctrl or Shift key on your keyboard.
    • Add Open Raster: Select files that are already open in an ENVI session. Click the Select All button to select all at once, or use the Ctrl key on your keyboard to select individual files.
    • Add By Filter: Browse to the folder of files to import, then enter a file filter. You can search for files using asterisk and file extension (i.e., *.tif) or a string (i.e., landsat8).
  3. Browse to the folder where you want to save the time series, and select an output filename. ENVI will create a series file in JSON format (.series). The series file should reside in the same directory as the images.
  4. If you are not performing a time-series analysis and only want to create a group of images where chronological order is not important, disable the option for Time Reference Required. For example, you may just want to know, "What data are available in this folder for my region of interest?" with no regard for their acquisition dates. Or, some datasets may not have acquisition times in their metadata, but you still want to create a series within a given folder. If you disable this option, ENVI will order the datasets in the same order that you added them to the folder.
  5. Click OK to create the series file.
  6. To restore a .series file that you previously created, click the Import Series button. The dialog lists the individual images that comprise the series. From here, you can add or delete individual images from the series using the buttons provided.

Building a Series from Files That Contain Multiple Datasets

This section applies to Multi-page TIFF, NITF with multiple image segments, Proba-V, and SkySat-1.

  1. Use the File > Open menu option to open one or more data files.
  2. From the Toolbox, select Spatiotemporal Analysis > Build Raster Series.
  3. Click the Add Raster button, then select Add Open Raster.
  4. In the File Selection dialog, use the Ctrl key to select individual datasets or image segments (NITF) from each file.
  5. Click OK, then continue with Step 3 in Build a Series.

Regrid a Series


The images that comprise a spatiotemporal series do not necessarily have to be in the same map projection or have the same spatial extent. An example is animating a time series to track a hurricane; in this case, it is not critical that the images have the exact spatial extent, projection, or resolution. However, ensuring a common projection and spatial extent allows you to perform a true spatiotemporal analysis, for example, studying the change in atmospheric pressure or a glacier's extent over time in a specific location.

Follow these steps to build a gridded raster series. You do not need to perform these steps with MODIS, NPP VIIRS, or GRIB data because they are already gridded to the same spatial reference.

You can also write a script to build a gridded raster series using the following routines: ENVIRegridRasterSeriesTask, ENVIRegridRasterSeriesByIndexTask, ENVIRegridRasterSeriesByUnionTask, and ENVIRegridRasterSeriesByIntersectionTask.

Expand the Spatiotemporal Analysis folder in the Toolbox and select a Regrid option. The following sections describe each option.

Regrid Raster Series

This tool lets you define a custom grid to which all rasters in a series will be regridded. A custom grid definition provides the information needed to georeference rasters and vectors to a common coordinate system. It does not refer to any raster or rely on any specific raster to set its extents.

A custom grid definition provides the following information:

  • Coordinate system
  • Spatial (geographic) extent
  • Pixel (cell) size
  • Rows and columns
  • Tie point pixel and map coordinates

Creating a custom grid definition requires you to know some details about the coordinate system of the current raster series and the coordinate system that it will regrid to. For example, suppose that you have a raster series that is in a UTM (WGS-84) coordinate system. You want to regrid the series to a State Plane coordinate system in units of U.S. Survey Feet. One option is to define the spatial grid based on a combination of coordinate system, spatial extent, and pixel size. With this option, you must know the latitude and longitude coordinates of the four corners of the desired spatial extent. Then convert these to State Plane coordinates, according to your specific State Plane zone. (Many conversion tools are available online.) Also convert the pixel size from meters to feet.

Follow these steps to regrid a raster series to a custom grid definition:

  1. In the Input Raster Series URI field, select a .series file for input.
  2. From the Grid Definition drop-down list, select the desired combination of grid parameters to define:
    • Coord. system + extents + pixel size
    • Coord. system + extents + img. size
    • Coord. system + pixel size + img. size + tie point
  3. Enter the values for each grid parameter as follows:
    • Coordinate System: Click the Browse button to display the Select Coordinate System dialog. See Select a Coordinate System for further instructions. Or, click the Import from dataset button to import the coordinate system of an existing dataset. If you click the Import from current view button , ENVI will try to import as many grid parameters as possible from an existing view, including the coordinate system, spatial extent, pixel size, and tie point location and coordinates.
    • Extents: Enter the spatial extent coordinates in the same units as the selected coordinate system (for example: meters, degrees, or feet).
    • Pixel Size: Enter the X and Y pixel size in the same units as the selected coordinate system (for example: meters, degrees, or feet).
    • Image Size: Enter the number of Columns and Rows in the grid.
    • Tie Point: Enter the Pixel X/Y coordinates of the upper-left pixel location in the grid. Enter the corresponding Map X/Y coordinates for this pixel location, in the same units as the selected coordinate system.
  4. Select the resampling method to use:
    • Nearest Neighbor: Uses the nearest pixel without any interpolation.
    • Bilinear: 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.
  5. In the Output Raster Series field, provide a filename and path for the output .series file.
  6. Enable the Display result option to display the result when processing is complete.
  7. Click OK to regrid the series.

Regrid Raster Series by Index

This tool creates a common grid that is based on the spatial grid parameters of a selected raster within the series. It regrids the source rasters to the common grid.

  1. In the Input Raster Series URI field, select a .series file for input.
  2. Select an optional Raster Index, which is a zero-based index corresponding to the raster you want to select. For example, the third raster in a series has a Raster Index value of 2.
  3. Select the resampling method to use:

    • Nearest Neighbor: Uses the nearest pixel without any interpolation.
    • Bilinear: 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.
  4. In the Output Raster Series field, provide a filename and path for the output .series file.
  5. Enable the Display result option to display the result when processing is complete.
  6. Click OK to regrid the series.

Regrid Raster Series by Intersection

This tool creates a common grid that is the geometric intersection of all source rasters; it regrids the source rasters to the common grid.

  1. In the Input Raster Series URI field, select a .series file for input.
  2. Select the resampling method to use:

    • Nearest Neighbor: Uses the nearest pixel without any interpolation.
    • Bilinear: 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.
  3. In the Output Raster Series field, provide a filename and path for the output .series file.
  4. Enable the Display result option to display the result when processing is complete.
  5. Click OK to regrid the series.

Regrid Raster Series by Union

This tool creates a common grid based on the geometric union of all source rasters; it regrids the source rasters to the common grid.

  1. In the Input Raster Series URI field, select a .series file for input.
  2. Select the resampling method to use:

    • Nearest Neighbor: Uses the nearest pixel without any interpolation.
    • Bilinear: 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.
  3. In the Output Raster Series field, provide a filename and path for the output .series file.
  4. Enable the Display result option to display the result when processing is complete.
  5. Click OK to regrid the series.

View a Spatiotemporal Series


You can also write a script to view a spatiotemporal series using the ENVIRasterSeriesLayer routine. Use the ENVIView::ChipToVideo method to export an animation to a video file.

  1. From the menu bar, select File > Open As > Series.
  2. Select a .series file that you created in the steps above. Click Open.
  3. See Animate a Data Series for further instructions.

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