Viewing Imagery in a different light


Imagery is the most commonly requested basemap of all the Esri base maps available. It provides the spatial context for your authoritative data that vector base maps cannot. Many questions can be easily answered by visually inspecting the imagery, for example how far is that tree away from the power line? or is that a new swimming pool that does not have a building permit?

There is though more to imagery though than visually inspecting in the Red, Green and Blue visual spectrum. Many of today’s satellites capture information in the Yellow, Near Infrared and Far Infrared portions of the electromagnetic spectrum. In fact the latest World View satellite has 16 bands. So how can this extra analytical data be accessed in a web service?

Image services provide an underutilised feature called functions. These are algorithms that can be applied to an image service on-the-fly to reveal hidden information in the imagery. When an image service published, it is not just the visible band that can be published but all bands from a satellite image can be made available. In its simplest form a function can swap these bands being used to display. For example from Red, Green, Blue to Infrared, Red, Green. Another common analysis is Vegetation health through an NDVI analysis. The difference in chlorophyll reluctance and absorbance of plants in the Infrared and Red portion of the spectrum.  The best part about using functions is that they are only calculated on the portion of image shown on the screen at the resolution displayed and no new image is created, just an interpretation of the image, all performed server side on-the-fly and then sent to the client. There are some very good examples on the Amazon Landsat 8 demonstrator site found at http://www.esri.com/landing-pages/software/landsat/unlock-earths-secrets

So how are functions created? Well they are a component of an image service, defined as a Raster Function Template, that can be accessed through the REST end point. By default there are no functions on an image service so they need to be added to the service. There are three stages to applying a function to an image service.

It is first necessary to create a function template and this is done through ArcMap.

  1. In ArcMap, with an image loaded, open the Image Analysis window (click Window > Image Analysis).
  2. Select the image layer in the Image Analysis window and click the Add Function 2016-02-03_8-36-15 button.
    1. The Raster Function Editor window opens containing a default function chain. The Identity function exists when there is no other function. Once you add a function, the Identity function disappears as it is no longer necessary
  3. Right-click the Identity function, click Insert and then click the function you want to add. A full list of functions is available at http://arcg.is/1RPzg1W
  4. When you add a function, it is inserted above the function you clicked.
  5. Modify its settings and click OK the image is updated to reflect the function.

With the function added to the image it is now possible to save it as a template for a raster function on an image service.There are several locations where you have access to a function chain, such as:

  • On the Function tab on the Layer Properties dialog box.
  • On the Raster Function Editor opened from the Image Analysis window.

In both these locations you can export the function chain to a template.

  1. Access the function chain.
  2. Right click the first item (2016-02-03_8-36-39) under the 2016-02-03_8-37-03 Function Chain and click Export as Template
    1. The function chain opens in the Raster Function Template Editor
  3. This template must be edited so you can apply it using other raster data, because in its current state, it is set up to work with the data in the function chain from which it was exported. For example, you need to set or clear some variables, such as the input raster datasets. Full details can be found at http://arcg.is/2095WZ2
  4. Click OK on the Raster Function Properties dialog box to save the changes to the variables.
  5. Click File > Save to save the raster function template

Now to apply the function to your image service.

  1.  If the image service is published and running, stop it.
  2. Access the image service properties.
  3. From the left menu of the Service Editor dialog box, click Function.
  4. Click the Manage button to open the Manage Raster Function Templates dialog box.
  5. Add one or more .rft.xml files you created earlier to the list.
  6. Optionally, choose a raster function template to apply by default by selecting it in the Default drop-down menu.
  7. Click OK to close the dialog boxes.
  8. Re-publish the image service.

You can now access the different capabilities of the image service from your web browser. The following rest endpoint easily show the various raster functions in the RasterFunction Infos: tag

http://landsat2.arcgis.com/arcgis/rest/services/LandsatGLS/PS/ImageServer

Try the raster functions. They reduce the need for additional image services.

Gordon

 

 

Got something to say?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s