ESRI banner

Creating a raster format

In ArcGIS Image Server additional raster formats can be added by implementing an ArcGIS custom raster format dynamic link libraries (DLL). Since ArcGIS Image Server framework is designed to work with all ArcObject rasters (including user defined custom raster formats) this new format added to ArcGIS will be accessible by ArcGIS Image Server through ArcObjects via raster data objects (RDO).  Currently AORaster does not support reduced resolution layers.

AG_Globe An overview of adding a custom raster format into ArcGIS framework

Based on the DLL technology, raster functionality in ArcGIS has been designed and implemented to provide flexibility in extending ArcGIS in reading and writing raster formats that are not supported out of the box. In other words, users can customize their own raster format for ArcGIS by creating a customized format DLL and then plugging this DLL into ArcGIS. After proper configuration, raster data in this format will be supported in ArcGIS as other default raster formats.

Logical Structure

ArcGIS is built in a component object model (COM)-based environment. The raster functionality in ArcGIS is supported through RDO, which provides unified data access, management, and display functionality to various raster data formats. ArcMap, ArcCatalog, or any upper level application makes calls to RasterLayer, Raster, RasterDataset, or other COM objects; the calls are sent to the ERDAS libraries; then a corresponding format DLL will be linked; and, finally, this linked format DLL handles pixel reading or writing of this particular format. For better understanding of the overall picture, the following figure depicts the roles that RDO and the format DLLs play in ArcGIS:

 

With this unified structure, RDO and the upper level applications access raster data in the same manner. The differences among the various raster formats will be handled by each individual format DLL.

For more details on implementing a custom raster DLL in ArcGIS refer to http://edndoc.esri.com/arcobjects/9.0/ArcGISDevHelp/TechnicalDocuments/Rasters/CustomRasterFormat.htm, where you can find detailed API documentation and samples.

AG_Globe Using RAW as a raster format

Many raster formats can be simulated using the RAW raster format. Prior to creating a new raster format a developer should research if the format can not be specified using RAW. If so may be advantageous to create a raster type that creates a raster process definition including a fully defined RAW raster format. The following is a definition of the nodes within the Format Info section for RPDef generator that are used when \raster\formatname is set as RAW.

Node

Type

Default

Description

NCols

Int

0

Number of columns of pixels in this raster.

NRows

Int

0

Number of rows of pixels in this raster.

SkipBytes

Int

0

Skip bytes from the start of the file.

PixelType

String

Byte

The data-type representing a band. As 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, and CFloat64:Complex 64-bit Floating-point.

BitDepth

Int

8

Number of bits used by a pixel band.

NBands

Int

1

Number of bands in the Raster.

Interleave

String

BIP

Interleave of pixels: BIPBand interleaved by pixel, BILBand niterleaved line, and BSQBand sequential.

ColorSpace

String

1

Colorspace that defines the relationship between the bands of the pixel. As 0:Grayscale, 1:RGB, 2:CMYK, 3:YCbCr, 4:YUV, 5:LHS, 6:YCCK, 7:Palette, and 255:Unknown.

TileSize

Int

0

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

ByteOrder

String

LSB

Byte layout for mulit-byte pixel data. As LSB:LSB first and MSB:MSB first.

TreatAsFloat

Bool

False

If set to True then the raster will be assumed to be a Float and handled as such.

ApplyOffsetScale

Bool

False

If set to True the value will be multiplied by 214, which is how floats are handled as signed ints within ArcGIS Image Server.

FloatOffset

Float

0

Offset to be applied. By default 0.

FloatScale

Float

214

Scale to be applied. By default 214.

ApplyConvert

String

None

Defines if the pixels should be converted on reading. As None, int16to32:16-bit Int to 32-bit Int, and uint16to32:16-bit UInt to 32-bit Uint.