Web de MiraMon

MiraMon raster formats description


MiraMon considers a raster to be any spatial representation made by dividing the space into a net of squares (called cells or pixels) into a rectangular space. So, a raster can hold satellite imagery, aerial photographs, digital elevation models (DEM), raster thematic maps (land cover classes, etc), etc. In any case, users can get information, in the metadata file, about if that kind of data refers to a global mean value for each cell (the case of radiance sensor imagery or traditional aerial cameras), to a central cell value (the usual case for elevation in DEM), to a modal value (that is, the more frequent class in that cell, like in many thematic maps), etc. Understanding the nature of the stored data in each cell involves differences in the treatment of different spatial operations (for instance, resolution changes, resampling by interpolation, etc).

The data file can be stored in several formats, both the own MiraMon formats:

  • Decompressed IMG: A binary format without a header in which pixels are placed from left to right and from top to bottom, without any separation between image rows (except in bit files); moreover, in bit files, bits of each byte are numbered (0 to 7) starting with the least significant bit, and a byte never shares pixels from two rows: each row must start at bit 0 and may contain unused bits at the end of a row (if there are any, they must take a value of 0). This format is identical to that used by Esri and Idrisi software for versions 4 and earlier.
  • Compressed IMG: A binary format with or without a header (at the end) that uses several strategies to compress data so it needs less disc space. Whatever the strategy used (classic RLE, RLE extracompressed, with indexation, etc) it always uses lossless compression (i.e. conservative), so it is always possible to go back to the decompressed format with the original characteristics (use the IMGIMG module from "Tools | File maintenance | Raster conversion and compression/decompression"). The compression used in IMG files is a variant of the Run Length Encoding, RLE. RLE is a lossless compression strategy that is very efficient for categorical images with many pixels repeated in the same row, but it doesn't work well when the image (or a part of it) displays areas without repetitions (like an aerial photography, or a DEM); in these cases, it is so inefficient that it can get to double the size of the image. A second disadvantage is that there is no way of going quickly to a certain pixel (it is necessary to decompress the image dynamically until getting the requested pixel), and this makes accessing consecutive readings slow. MiraMon uses two improvements in conventional RLE strategy to avoid these disadvantages: the first one is called extra-compressed RLE, that avoids using the RLE counter in areas without repetitions in the raster; these zones are preceded by an RLE counter with a value of zero, which conventionally indicates that next byte expresses the number of decompressed values (whatever they are byte, integer, etc) that follow; the second strategy is to generate RLE indexed files in which the offsets to the beginning of each row are added at the end of the file, any point of the raster can be accessed quickly.

    Both files, Compressed and Decompressed IMG, use .img extension and also in both cases, metadata can be fully documented with the GeM+ from the I.rel file created by MiraMon.

and formats that can be directly open with MiraMon:

  • TIFF/GeoTIFF: A binary format with header defined by Aldus/Adobe Systems. MiraMon supports 1-bit, 8-bit grayscale, 8-bit palette, 24-bit (3 bands) and multiband with more than 3 bands TIFF files. The TIFF format can be decompressed or use lossless compressions (LZW). For georeferencing MiraMon accepts both the GeoTiff format (georeference embedded in the header), the presence of a World file (.tfw or .tifw) and the specification in the MiraMon metadata files. For more information regarding the order of priorities used by MiraMon when there is more than one georeferencing source, see the TIFIMG module. It uses the extension .tiff, .tif. This format can be directly open by MiraMon for visualization, query, etc, purposes, but some modules may not support it; in that case, it should be imported with the appropriate tool of the "File | Import menu" to one of the formats that the module supports.
  • JPEG: A binary format with a header defined by the Joint Photographic Experts Group and especially useful for containing photography-like imagery in a very small file size (aerial photography, orthophotos, remote sensing images, etc). MiraMon supports JPEG files with 24 bit pixel color (natural color) or 256 grey levels. However, JPEG is, in most cases, a lossy (unconservative) format, so it is useful for images devoted to visual analysis (like orthophotos), but not for rigorous digital analysis (like the applied to obtain categorical thematic maps or DEM). It uses a .jpg (or .jpeg) extension. Metadata can be fully documented with the GeM+ from the J.rel file created by MiraMon. This format can be directly open by MiraMon for visualization, query, etc, purposes, but some modules may not support it; in that case, it should be imported with the appropriate tool of the "File | Import menu" to one of the formats that the module supports.
  • JPEG2000: A binary format with a header defined by the Joint Photographic Experts Group. MiraMon supports JPEG2000 files with 24 bit pixel color (true color), 256 grey levels as well as RGBK (which is similar to the 24 bit files but with an additional band indicating transparency) and multispectral images in which any band name and description can be used. The JPEG2000 format can be with lossy or lossless. It uses the extensions jp2, j2c (without header). A raster band selector has been implemented in JPEG2000 multispectral (of more than 3 bands) so the user can select between seeing one of the bands in gray scale or choosing 3 to make an RGB composite. This format can be directly open by MiraMon for visualization, query, etc, purposes, but some modules may not support it; in that case, it should be imported with the appropriate tool of the "File | Import menu" to one of the formats that the module supports.
  • ECW: A binary format using wavelet compression optimized for aerial and satellite imagery developed by Earth Resource Mapping/Leica Geosystems. Georeferencing can be embedded within the file. It uses the extension .ecw. The reading of ECW files of more than 3 bands has been implemented as well as the support to several spatial reference systems, including those based on ETRS89. This format can be directly open by MiraMon for visualization, query, etc, purposes, but some modules may not support it; in that case, it should be imported with the appropriate tool of the "File | Import menu" to one of the formats that the module supports.
  • MrSID: A binary format with a header defined by LizardTech, Inc. MiraMon supports MrSID files with 24 bit pixel color (true color), with 256 grey levels as well as RBGK (which is similar to the 24 bit files but with an additional band indicating transparency) and multispectral images in which any band name and description can be used. The MrSID format can use lossy or lossless. It uses a sid. extension. This format can be directly open by MiraMon for visualization, query, etc, purposes, but some modules may not support it; in that case, it should be imported with the appropriate tool of the "File | Import menu" to one of the formats that the module supports.
  • BMP: A binary format with header defined by Microsoft that stores the values of the cells sorted from left to right and from bottom to top. Usually it has no compression, although lossless compression of the RLE type can be applied. It uses the extension .bmp. Metadata can be fully documented with the GeM+ from the B.rel file created by MiraMon. This format can be directly open by MiraMon for visualization, query, etc, purposes, but some modules may not support it; in that case, it should be imported with the appropriate tool of the "File | Import menu" to one of the formats that the module supports.
  • DIB: A binary format analogous to BMP, without the file header (with BITMAPINFO, but without BITMAPFILEHEADER). This format can be directly open by MiraMon for visualization, query, etc, purposes, but some modules may not support it; in that case, it should be imported with the appropriate tool of the "File | Import menu" to one of the formats that the module supports.

An extensive number of other raster formats can also be incorporated into MiraMon, via import, as the aforementioned with direct opening, and currently the E00 raster, RST (Idrisi32), HDF, LAN/GIS (Erdas 7.4), CEOS (Landsat), NDF (Landsat), JPEG2000 (Sentinel), SPOT, GRD (Surfer), PGM/PPM, CTL (Grad) and RF (Zebra). For more information refer the Import option in the "File" menu.

The 10 subformats accepted by MiraMon for the own IMG format (compressed or decompressed) are in the following table; all them, except bit, can be compressed:

subformat
bits per pixel
bytes per pixel
type of value
whole values (for integer numbers) or maximum and minimum values and number of significant figures (for real numbers)
examples of use
bit
1
1/8
integer
[0,1]
Mask image
byte
8
1
integer
[0,255]
Thematic cartography up to 256 categories, aerial or satellite imagery (black and white or color) up to 256 grey levels or 256 colors
integer
16
2
integer
[-32768, 32767]
Thematic cartography of more than 256 categories, several types of DTM, aerial or satellite imagery (black and white or color) of more than 256 grey levels or 256 colors
unsigned integer
16
2
integer
[0, 65535]
Same as "integer", but without negative values and more possible positive values
unsigned integer-RLE
16
2
integer
[0, 65535]
Compressed version of the flat binary format, which by default is generated indexed for faster access speed
long
32
4
integer
[-2147483648, 2147483647]
Thematic cartography with links to databases
real
32
4
real
(~-3.4E+38, ~3.4E+38)
Several types of DEM that need single real precision (6 guaranteed significant figures) as temperature maps with tenth degree accuracy
double
64
8
real
(~-1.7E+308, ~1.7E+308)
Several types of DEM that need double real precision (15 guaranteed significant figures). In practice, double format is only used to intermediate calculations in which you need too much precision, and not for final layers

MiraMon allows to visualize:

  • 24 bit pixel color or 16 million colors, combining 3 bands from one or several images (compressed or not, byte, integer, etc.) such as JPEG, JPEG2000, MrSID or BMP.
  • Using semi-transparency in any case.
  • Using semi-transparency in any case.
  • Defining the type assignment from the pixel values to the palette values choosing from options: direct assignment of integers (1 to 1 correspondence between pixel values and the values of the palette), direct integers with displacement of origin, linear scaling or logarithmic scaling.
  • Modifying the range of values to display.

As of version 4.0, MiraMon accepts multiband in the same raster file consisting of "n" value files (.img, .jpg, .jp2, .j2c, .sid, etc. extensions) and a metadata file which incorporates not only georeferencing but also default symbolization, relationships between tables and other metadata such as spatial and thematic quality indicators, etc (.rel extension).

As of version 5.5, MiraMon incorporates the possibility of opening several raster files in a single session (multiraster) without limiting the scope of other open layers. They can be opened directly from any of the formats described above and many others using the import option.

The documentation file I.rel that always goes with the data file (or files) is specific to MiraMon. It is a flat text file in Windows INI format, formed by sections and keys. This file can be edited with any text processor (NOTEPAD, EDIT, etc); however, because of its complexity, it is recommended to make documentation using Universal Geospatial Metadata Manager (GeM+). In each section there are key words followed by an equal sign and a value or chain of characters. These key words allow you to define the information that the metadata has to contain.

Currently, the main supported sections in the metadata I.rel files are:

  • [VERSIO] -> Section that describes the version and subversion of the REL file.
  • [METADADES] -> Section that describes the general characteristics of the metadata, such as the language or languages in which the metadata is defined, the creation date, the character set, or the unique identifier of the file.
  • [METADADES:ORGANISME_#] -> Section describing the metadata publisher. The # symbol is the number of the participating organization.
  • [IDENTIFICATION] -> Section that describes the title of open raster, etc.
  • [OVERVIEW] -> Section that describes, among other things, the date the base was created, the date of updating, a summary as well as data of the coordinator, promoter, publisher and distributor of the base.
  • [OVERVIEW:ORGANISME_#] -> Section that describes, among others, data of the coordinating organization, promoter, publisher and base distributor. The # symbol is the number of the participating organization. The first to appear is always the number 1 and the later ones carry consecutive numbers.
  • [OVERVIEW:ASPECTES_TECNICS] -> Section that describes, among other things, the type of file, the data model, the type of object, the number of objects, the number of rows and columns as well as some commentaries.
  • [OVERVIEW:ASPECTES_TECNICS:PLAT_INSTR_INFO] -> Section that describes the characteristics of the platform and the sensor.
  • [SPATIAL_REFERENCE_SYSTEM:HORIZONTAL] -> Section that indicates the type of horizontal reference system (cartographic or local) and its description, units, projection, datum and ellipsoid, etc.
  • [SPATIAL_REFERENCE_SYSTEM:HORIZONTAL:QUALITY] -> Section that describes the quality of the horizontal reference system (with indicators such as positional exactitude - RMS in X, RMS in Y, RMS in the adjustment of the ground control points, etc).
  • [EXTENT] -> Section that describes, among other things, the extension of the base (scope coordinates) as well as extreme pixels (external edge and pixel centers).
  • [QUALITY:LINEAGE:PROCESS_#] -> Sections that describe the different processes carried out in the base (radiometric correction, geometric correction, mosaicking between layers, transformation of raster formats, for example from CEOS to IMG, etc.), and which entity has carried out the process and when. The symbol # is the number of the processes carried out in the base and indicates the order in which they were carried out. The first process always corresponds to number 1 and the next processes take consecutive numbers.
  • [ATTRIBUTE_DATA] -> Section that describes the attributes of the data in the base (units of the base values, value assigned to NODATA, number of bands, etc).
  • [ATTRIBUTE_DATA:NOM_CAMP] -> Section that describes generic characteristics of the band, for example name, description or the range of the band spectrum by definition, minimum and maximum value of the data in the image, etc.
  • [ATTRIBUTE_DATA:NOM_CAMP:BAND] -> Section that indicates the particular characteristics of a band in the base, for instance, the minimum and maximum radiance, minimum and maximum wavelength, scaling coefficients, etc.
  • [COLOR_TEXT:] -> Section that indicates the raster display features, for example the definition of the palette to open by default, the treatment of the variable, semitransparency, color of NODATA values, the minimum and maximum display scale, etc.
  • [VISU_LLEGENDA:] -> Section that indicates the display characteristics of the legend with respect to the number and description of categories, etc.
  • The order of the sections can be any within the file. Also, the order of the keys within each section.

An example of the I.rel file format can be consulted by opening with Windows Notebook the file that provides the raster metadata corresponding to the Digital Model of Elevations every 200 m that is distributed with the Preferred Collections of Catalonia, MDE200m_ICC_AsterI.rel. A more complete description can be found in the help of the Universal Geospatial Metadata Manager.

For versions before the 4.0 MiraMon version, raster formats were inspired by the Idrisi binary format for raster files (and they were compatible with this format with some restrictions). They were formed by two files: a values file (img extension) and a documentation file, which had the georeference (doc extension). For the versions before version 4.0, the only possible format was the monoband (which could be decompressed, compressed or extracompressed -RLE-).

Old documentation files that came with raster files were also flat text files, editable with any text processor, although they only included a minimum description of the layer, such as the descriptive title, data type, file type, number of rows and columns, horizontal reference system and units, extension, positioning errors, etc., in a much briefer way compared with the current documentation file. Moreover, there was no possibility of documenting multiband images in only one metadata file or establishing relations between fields and tables, which GeM+ allows.

For more information about the formats and contents of the old documentation files and the new metadata files, you can consult Metadata file format and table relations file format.