MRR
Multi-Resolution Raster (MRR), MapInfo Pro's raster data format, is a unifying format that handles all types of data and provides capabilities to improve the user experience when visualizing and processing raster data.
Spectrum Spatial Support
Spectrum Spatial provides the following support for MRR via a TAB file:
- render MRR rasters as maps and tiles using the Mapping Service and Tiling Service that have the same visual styling as in desktop products such as MapInfo Pro
- query a cell value using the existing functions MI_GridValueAt or MI_GridValueAtPixel in the Feature Service (see Raster / Grid Functions in the MapInfo SQL Language Reference Guide)
- get legends for maps with MRR (continuous and classified MRR only)
- Alpha channel is supported only for image being rendered as RGBA.
-
Note: We recommend copying all MRR companion files (.ghx and .pprc) along with the .mrr file to the same directory to avoid any instability. These files should be generated using MapInfo Pro Raster 1.0 or later. If these files are not copied then the first query or rendering request will take a significant amount of time to process.
MRR files should have statistics and overviews created before they are used in Spectrum Spatial to ensure optimal performance.
If Spectrum Spatial throws an error related to raster resource initialization or reading a .ghx file, it is possible that format of companion file is no longer supported. These should be regenerated using MapInfo Pro Raster 1.0 or later. For raster files, the query of the cell value is limited to the single band value persisted in the .ghx file. You cannot specify the field or band to retrieve through the API.
Spectrum Spatial supports the reading of a cell value at base level (resolution 0).
The cells which are not present or contain null value will be rendered as transparent in spatial irrespective of ghx settings. This will work with or without ghx.
This support is provided on Windows and the following Linux environments:
- Oracle Linux 6.5 and 7.1
- CentOS 6.4 and 7.1
- Ubuntu 14.04
A sample MRR named map, table, and layer are included in the repository, under the /Samples folder.
Notes:
- On Linux machines, GCC version 4.9 and LIBC to version 2.17 are required for MRR files. See Configuring a Linux Machine for MRR in the Spectrum Spatial Administration Guide for instructions.
- On Linux, all files (.TAB, .ghx, and .pprc) must share the same case as the MRR file name. You must either modify the file names to have the same case or regenerate them, otherwise Spectrum Spatial will throw an error.
- Anti-aliasing does not currently work for MRR.
- Open native handles for MRR are cached to improve performance. When rendering or querying an MRR file, the handle is opened and cached. The same handle is used for subsequent requests. If there is a change in GHX file then it will not be reflected until handles are not closed. See Clearing MRR Cache for more information on manual closure. If the time period between subsequent requests is large, the handle becomes ready for automatic closure. In addition, when the server is stopped the cache is invalidated and all handles are closed before JVM exits.
Benefits of MRR
The MRR file format offers the following key benefits:
- Extremely large raster/grid datasets - The MRR format has been designed to address the difficulty of handling extremely large datasets by providing multiple optimizations to minimize storage requirements and provide efficient ways of accessing data in extremely large files. It has also been designed to deliver an enhanced visualization experience by using tiling and by maintaining a data pyramid to enable efficient data visualization at any given scale.
- Unified data - The MRR format is capable of storing all types of raster/grid data in common use, and it removes the distinction between numeric or classified data and colored imagery.
- Sparse data - Sometimes raster/grid datasets can be extremely large but only sparsely populated with valid data. An example of such a dataset is a LiDAR survey which follows along a pipeline for several 100 km but is only 100 m wide. In cases such as these, the MRR format does not store values for the regions containing no data, but still remains flexible enough to add additional data to the source file any time. This allows extremely sparse datasets to be stored efficiently on disk, be rapidly accessed and easily updated.
Capabilities of MRR
The MRR file format has the following capabilities:
- Removes virtually all restrictions on the size of raster datasets.
- Extends the concept of a raster from a simple 2D array of cells to an extensible sparse matrix of tiles.
- Contains a binary data pyramid enabling data access at any scale.
- Achieves efficient storage using lossless and lossy compression techniques via industry standard compression codecs.
- Supports the temporal dimension, allowing data to be accumulated and accessed by time.
- Supports image data, thematic data (of virtually unlimited size) and continuous and discrete data.
- Supports a wide and extensible number of data types including complex numbers.
- Stores one or more multi-banded fields.
- Supports local registration and cell size for each field.
- Contained within a single file on disk.