An overview of raster types

Introduction

In ArcGIS Image Server, raster type defines properties and metadata about one or more rasters. A raster type can be defined based on-

How rasters are georeferenced?
What processing should be applied to the rasters?
Spatial reference systems to be used.
Pixel-sizes of rasters.
Footprint of rasters.

There are a large number of raster types available and different organizations have standards on how they store or manage raster data, which translates into the definition of a new raster type. Many image products are a combination of specifically formatted pixel data with the properties and metadata stored in some standard. Such image products translate very well into raster types.

In ArcGIS Image Server, when a raster is added to an image service it is added by a process specific to the raster type. This process is carried out such that the raster properties and metadata are converted to ArcGIS Image Server standards. A number of standard raster types are directly supported; however, developers can create new custom raster type definitions or modify existing raster type definitions.

The Image Service Editor allows you to import raster datasets into an image service definition. The raster type provides the Image Service Editor with raster process definition files that contain essential image information, georeferencing information, processing instruction, and metadata.

In ArcGIS Image Server, a raster dataset is defined in a raster process definition. A raster process definition is stored as an XML file with a .RPDef extension, and fully defines all the properties of a raster dataset. In the Image Service Editor, the Raster Properties dialog box can be used to view the content of the raster process definition.

Creating a custom raster type involves creating code to generate a raster process definition for each raster dataset added. In the Service Editor, when a user selects the Add Rasters button, a list of available raster types is displayed. Each raster type is associated with a raster process definition generator (or RPDef generator). The RPDef generator has a defined set of processing steps that involve:

You specifying the source for the rasters, either as files, directory, or some other source
You specifying optional parameters that may be required to add the data in the required form
The generator creates a list of all sources and a raster process definition for each source item
Providing the list to Image Service Editor where the raster process definitions (RPDef) are imported into the image service definition.

Parts of a raster process definition file

The raster process definition (RPDef) file contains all the information ArcGIS Image Server needs about a raster dataset. The table below briefly describes commonly used properties of a raster process definition file. For more XML information, the schema is available at <ImageServerHome>/Developer Kit/XML/RPDef.XSD.

The raster process definition consists of the following parts:

Information about who created the RPDef file and when the file was created.
A name given as reference to the raster dataset that is easily identifiable by the user and not necessarily unique.
The spatial reference system of the raster dataset. Each raster dataset must be associated with a spatial reference system which is defined by an ESRI .prj string.
The range of pixel sizes that are contained within the raster dataset.
Pixel information, including details such as the pixel type, number of bands, and bit depth of the raster after any processing that might be performed.
Default parameters for transparency and seamline feathering.
Nadir coordinatesif knownare the coordinates from which the image was taken from. They are used to enable the Viewpoint functionality.
Status information about the raster process definition which can be used to indicate if the raster process generator had problems in creating the raster dataset or if Image Service Editor had problems validating it.
Metadata about the raster. The RPDef generator defines what metadata is included. The metadata within this node is transmitted to the client application as part of the raster metadata. Metadata from this, as well as other nodes, can be extracted as specific raster attributes to be used for ordering imagery when using the Order by attribute mosaic method.
The footprint or extents of the usable pixels in the raster. Within the raster process definition this is defined as using GML in the spatial reference system of the Raster. When loaded into the image service definition, it is converted to a shape in the spatial reference system of the image service.
The seamline for the raster that will be used when the Seamline mosaic method is used. As with the footprint, this is defined using GML in the spatial reference system of the raster and converted to a shape in the spatial reference system of the service when added to a service.
Process chain to be applied to the pixels as they are accessed (dataset-level processes are applied after the particular raster is processed through its own set of raster-level processes, defined below).
RastersThis contains a list of geographically, co-located rasters that make up the raster dataset. For each raster the following are defined:
-An ID thats unique across the RPDef.
-Pointer to the raster source where the pixels are stored with an optional source layer name as some rasters may contain multiple pixel blocks.
-Pixel-size range that defines at what pixel sizes the raster becomes visible.
-Properties of the raster such as the NoData value, Derivation method, Derivation process, and SkipGroupProcess (explained in the table below).
-Processes to be applied to the particular raster.
-Format information pertaining to the raster. These parameters are only for reference and are not generally used to directly read the rasters except if the raster itself does not contain this information. For example, when reading a TIF file the number of columns and rows in the image will be extracted directly form the TIF header, but when reading a RAW image the information stored in the Format Info is used to access the image as there is not standard header for RAW.

 

Information

Properties

Type

Required

Description

Version

String

No

Version of the RPDef document.

Raster Type ID

String

No

Name of the RPDef generator component that created this RPDef.

Raster Dataset Properties

Description

Type

Required

Description

Spatial Reference System

String

No

Spatial reference system to be used for the service. This Spatial reference system will be used for all internal searches and will be used for all derived tiles. It should be defined such that no coordinate system boundaries exist within the extents of the required image service.

Raster Name

String

Yes

A non-unique, friendly name that identifies this raster process definition.

Lower Pixel Size

Float

Yes

The smallest value among the actual pixel sizes of all raster items.

Higher Pixel Size

Float

Yes

The largest value among the maximum allowable pixel sizes of all raster items.

Bands

Int

Yes

Number of bands in the raster process dataset.

Pixel Type

String

Yes

The data-type representing a band.

 

Byte: Unsigned 8-bit Integer
UInt16: Unsigned 16-bit Integer
Int16: Signed 16-bit Integer
UInt32: Unsigned 32-bit Integer
Int32: Signed 32-bit Integer
Float32: 32-bit Floating-point
Float64: 64-bit Floating-point
CInt16: Complex 16-bit Integer
CInt32: Complex 32-bit Integer
CFloat32: Complex 32-bit Floating-point
CFloat64: Complex 64-bit Floating-point
Elevation: Elevation

Bit Depth

Int

Yes

Number of bits used by a pixel band.

Color space

String

No

Color space that defines the relationship between the bands of the pixel.

Footprint Polygon

GmlPolygon

Yes

A polygon shape that defines the extent of the raster process definition. The vertices of the polygon must be defined in the clockwise direction.

Seamline Polygon

GmlPolygon

No

A polygon shape that defines the mosaic line. The vertices of the polygon must be defined in the clockwise direction.

Feather Width

Int

No

Defines the value of the feather width.

Feather Width Unit

String

No

Defines the unit in which feather width is specified.

 

Pixel
Meter

Seamline Type

String

No

Defines if the feather is inside or around the seamline.

Inside
Around

No Data Value

Pixel

No

The NoData value specifies how no measurement values are denoted.

Transparency

Bool

No

Defines whether NoData values are to be treated as transparent.

Process Chain

XML

No

Process chain that will be appended to each raster's chain.

Status ID

String

No

Status ID of the last operation performed on the RPDef.

Status Message

Memo

No

Status message of the last operation performed on the RPDef.

Raster Properties

Description

Type

Required

Description

Raster ID

String

Yes

Unique identifier for the raster defined here.

Description

String

No

A brief description of this raster item.

Raster Source

String

Yes

Full source of the raster data defined by this raster.

Source Index

String

No

Source-dependent index to the raster source.

Enabled

Bool

No

Indicate whether this raster is enabled. Disabled rasters are invisible and are not used by the image server for mosaic generation.

Pixel Size

Float

Yes

The actual pixel size of the raster.

Min. Pixel Size

Float

Yes

The minimum pixel size value valid for this raster.

Max. Pixel Size

Float

Yes

The maximum pixel size value valid for this raster.

Format

String

Yes

Defines the raster format module to use for reading the raster source.

 

AORaster
TIFF
GDAL
RAW

No Data Value

Pixel

No

The NoData value specifies how no measurement values are denoted. If undefined then as per raster.

Process Chain

XML

No

Process chain for the raster item.

Derivation Method

String

No

P: Primary: a base raster.
PI: Raster overview internal: an internal overview of a primary raster.
PE: Raster overview external: an external overview of a primary raster.
D: Derived raster: a high-resolution raster derived by processing a primary raster.
DE: Derived raster external overview: an external overview of a derived raster.
T: Derived tile: a high-resolution tile of a service.
S: Service overview: a low-resolution overview tile of a service.

Derivation Process

XML

No

An XML (file or embedded) that defines the derivation process.

Skip Group Process

Bool

No

Flag specifying if this item's raster group process chain is skipped or applied. Service Editor, for instance, sets all derived rasters with this flag set to ensure that no raster group process chain is applied.

Format Info

Description

Type

Required

Description

Format Info

XML

No

Following are info fields. They are not used for stats, but not reading the image except if the image format is RAW.

Number of Columns

Int

No

Number of columns of pixels in this raster.

Number of Rows

Int

No

Number of rows of pixels in this raster.

Skip Bytes (Header)

Int

No

Skip bytes from the start of the file.

Pixel Type

String

Yes

The data-type representing a band.

 

Byte: Unsigned 8-bit Integer
UInt16: Unsigned 16-bit Integer
Int16: Signed 16-bit Integer
UInt32: Unsigned 32-bit Integer
Int32: Signed 32-bit Integer
Float32: 32-bit Floating-point
Float64: 64-bit Floating-point
CInt16: Complex 16-bit Integer
CInt32: Complex 32-bit Integer
CFloat32: Complex 32-bit Floating-point
CFloat64: Complex 64-bit Floating-point

Bit-depth

Int

Yes

Number of bits used by a pixel band.

Bands

Int

No

Number of bands in the raster.

Band Interleave

String

No

Interleave of pixels.

 

BIP
BIL
BSQ

Color space

String

No

Color space that defines the relationship between the bands of the pixel.

 

0: Grayscale
1: RGB
2: CMYK
3: YCbCr
4: YUV
5: LHS
6: YCCK
7: Palette
255: Unknown

Tile Size

Int

No

If the raster is tiled defines the tile size (assumed square). 0 if not tiled.

Compression Method

String

No

Compression method.

Compression Quality

Float

No

Compression quality.

Bands

XML

No

Bands.

ByteOrder

String

No

Byte layout for multi-byte pixel data.

 

LSB:LSB first
MSB:MSB first

Is Elevation Data

Bool

No

 

Apply Offset-Scale

Bool

No

 

Float Offset

Float

No

 

Float Scale

Float

No

 

Apply Conversion

String

No

None
int16to32:16-bit Int to 32-bit Int
uint16to32:16-bit UInt to 32-bit UInt

Adding raster process definition files to an image service

The RPDef schema and documentation is made available with ArcGIS Image Server. Users and developers have the option of creating RPDefs for a set of available raster datasets using any method they consider appropriate for existing systems. Part of ArcGIS Image Server’s extensibility is its ability to ingest these externally created RPDef files.

The recommended method of doing this is to use an existing raster type that most resembles the raster dataset you wish to import, use the RPDefs created by the image service as a template, analyze the content of the RPDef defined above, and modify as required. Then use the raster process definition files raster type, in the Image Service Editor, to add these to a service definition. Here are the steps:

1.Click the Add Raster button image001 from the Image Service Editor toolbar. You will see a list of raster types from which to choose.

       image002

2. Double-click raster process definition files; which will open the following dialog box

       image004

3.Select a file or pick a folder containing multiple raster files.
4.Click OK. Any raster dataset that failed to get added to the image service definition is be listed like this:

       image005

5.In order to see a detailed status message for any item in the list simply click on the item and click the Details button.

        image006

6.After adding rasters, ArcMap will display the footprint.

        image007

If creating the RPDefs externally doesn't suit your needs, this SDK provides a set of functions that enable a developer to create a new custom raster type that can be added to Image Service Editor. Once created, it will appear as an additional raster type when using the Add Raster feature in the Image Service Editor. The following sections will provide details of how to create a custom raster type that implements your own RPDef generator.