Tutorials: Sentinel-2 Time Series Analysis Tutorial, Landsat Time Series Tutorial, Temporal Processing Examples

You can build a series of images (called a raster series) for spatiotemporal analysis, then view the images incrementally. Use the steps below 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, which is described in the following sections.

You can also write scripts to build a series using the BuildRasterSeries task or BuildTimeSeries task. See the BuildRasterSeries task topic for an example of building a raster series from HDF5 data or NITF files that have multiple image segments.

Build a Series


  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.

Build 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 Data 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 tasks: RegridRasterSeries, RegridRasterSeriesByIndex, RegridRasterSeriesByUnion, and RegridRasterSeriesByIntersection.

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. The available fields will vary, depending on the Grid Definition you select:
    • Coordinate System: Specify the coordinate system using one of the following:

      • Click the Browse button to open the Select Coordinate System dialog. See Select Coordinate Systems for further instructions.
      • Click the Import from dataset button to import the coordinate system of an existing dataset.
      • Click the Import from current view button to have ENVI 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.
      • Click the Calculate Union/Intersection button to open the Calculate from a Group of Rasters dialog. In the dialog, select Intersection to include only the extent where the rasters overlap, or select Union to include the extent encompassed by all of the rasters.

      • With an input raster in the view, click the Draw Bounding Box button , then click and drag the cursor to define a box outlining the extent of the layer stack.
    • 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 (default): 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 check box to display the output in the view when processing is complete. Otherwise, if the check box is disabled, the result can be loaded from the Data Manager.
  7. To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow next to the OK button and select Save Parameter Values, then specify the location and filename to save to. Note that some parameter types, such as rasters, vectors, and ROIs, will not be saved with the file. To apply the saved task settings, click the down arrow and select Restore Parameter Values, then select the file where you previously stored your settings.

  8. To run the process in the background, click the down arrow next to the OK button and select Run Task in the Background. If an ENVI Server has been set up on the network, the Run Task on remote ENVI Server name is also available. The ENVI Server Job Console will show the progress of the job and will provide a link to display the result when processing is complete. See ENVI Servers for more information.

  9. 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 check box to display the output in the view when processing is complete. Otherwise, if the check box is disabled, the result can be loaded from the Data Manager.
  6. To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow next to the OK button and select Save Parameter Values, then specify the location and filename to save to. Note that some parameter types, such as rasters, vectors, and ROIs, will not be saved with the file. To apply the saved task settings, click the down arrow and select Restore Parameter Values, then select the file where you previously stored your settings.

  7. To run the process in the background, click the down arrow next to the OK button and select Run Task in the Background. If an ENVI Server has been set up on the network, the Run Task on remote ENVI Server name is also available. The ENVI Server Job Console will show the progress of the job and will provide a link to display the result when processing is complete. See ENVI Servers for more information.

  8. 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 check box to display the output in the view when processing is complete. Otherwise, if the check box is disabled, the result can be loaded from the Data Manager.
  5. To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow next to the OK button and select Save Parameter Values, then specify the location and filename to save to. Note that some parameter types, such as rasters, vectors, and ROIs, will not be saved with the file. To apply the saved task settings, click the down arrow and select Restore Parameter Values, then select the file where you previously stored your settings.

  6. To run the process in the background, click the down arrow next to the OK button and select Run Task in the Background. If an ENVI Server has been set up on the network, the Run Task on remote ENVI Server name is also available. The ENVI Server Job Console will show the progress of the job and will provide a link to display the result when processing is complete. See ENVI Servers for more information.

  7. 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 check box to display the output in the view when processing is complete. Otherwise, if the check box is disabled, the result can be loaded from the Data Manager.
  5. To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow next to the OK button and select Save Parameter Values, then specify the location and filename to save to. Note that some parameter types, such as rasters, vectors, and ROIs, will not be saved with the file. To apply the saved task settings, click the down arrow and select Restore Parameter Values, then select the file where you previously stored your settings.

  6. To run the process in the background, click the down arrow next to the OK button and select Run Task in the Background. If an ENVI Server has been set up on the network, the Run Task on remote ENVI Server name is also available. The ENVI Server Job Console will show the progress of the job and will provide a link to display the result when processing is complete. See ENVI Servers for more information.

  7. 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 Raster Series and NITF Image Segments for full instructions.

See Also


Working with Temporal Cubes