Pitney Bowes
MapInfo Pro™ Monthly Journal
Get on the Grid with MapInfo Pro Advanced: The Powerful Merge capability (Part 1)

MapInfo Pro Advanced is an add-on for MapInfo Pro that provides powerful raster grid creation, visualisation and analysis capabilities. The first release of this product is referred to as MapInfo Pro Raster. With the second release (scheduled to be available at the same time as MapInfo Pro v15.2) we have changed the name to MapInfo Pro Advanced. For the purposes of this article we will refer to the product as MapInfo Pro Advanced but everything pertains to the first release.

One of the hallmarks of MapInfo Pro Advanced is its ability to work with very large grid files. This article is about how the Merge capabilities can be used to merge hundreds or even thousands of files at once into a single raster grid.

For background, here are some previous articles.

Need an overview of some of the concepts behind raster grid mapping? Click here
Want to see an overview of what is in MapInfo Pro Raster? Click here
A look at the powerful grid colouring capabilities in MapInfo Pro Advanced. Click here
Details on the supported grid formats Click here

Using the Merge command

The Merge command allows you to combine hundreds or even thousands of individual raster grid files into a single large coverage. The Merge command is in the Processing group.

gallery
The processing and analysis capabilities in MapInfo Pro Advanced.

When the Merge command is chosen a panel opens up. If using this for the first time, it will appear on the right side of MapInfo Pro.

panel

Getting Started

If you have raster datasets open you will be able to choose them from the Select Rasters drop-down list. Just tick the boxes of the files you wish to merge.

What is potentially even more useful is it is possible to select the raster files you wish to merge directly from the file system. Just click the little folder icon next to the drop-down and choose your files. You can choose many files at once and you do not have to open the files in MapInfo Pro first.

Merge Options

Merge region: You can choose between a union of all datasets, a specified rectangle or only merge the data that occurs within the extent of the Map window.

Merge operator: This is important if the rasters you are merging overlap in some way. There are a number of different operations you can apply.
  • Stamp: Values of the primary grid will overwrite those of the secondary grid(s). Stamp is the default choice.
  • Minimum or Maximum: Take the lower or higher value, respectively.
  • Sum: Add the values together where the grids overlap.
  • Median or Average: Take the median or average value of the overlapping areas.
  • Average of Min and Max: The overlapping areas get an average calculated only from the minimum and maximum values.
If you are merging a set of non-overlapping files, such as often provided with elevation datasets, generally speaking there will not be any overlap and the stamp operator will be fine for this.

Compression

MapInfo Pro Advanced has a number of industry standard compression methods built into the software. These allow for very efficient data storage and high performance. The table below contains information taken from the Help file.

Lossless compression methods mean that full fidelity of the original data is maintained. A compression method that is lossy may have some changed values.

LZ4 Compression A lossless compression method that can be applied to any kind of field. The user does not need to specify a compression level. Its primary advantage over other lossless compression methods is the very high speed of encoding and decoding and the low memory and computing requirements. However, it will typically achieve lower compression ratios than other lossless methods. Because of its superior efficiency, LZ4 is widely used by operating systems and file systems.
Zip Compression A lossless compression method that can be applied to any kind of field. By specifying a compression level of 1 to 9 the user can tune the method to provide higher performance (and lower compression ratios), or lower performance (and higher compression ratios). It achieves higher compression ratios than LZ4 but this is always at the expense of encoding and decoding speed and memory consumption. This industry standard method is widely used in file compression tools.
LZMA Compression A lossless compression method that can be applied to any kind of field. By specifying a compression level of 1 to 9 the user can tune the method to provide higher performance (and lower compression ratios), or lower performance (and higher compression ratios). This method can produce higher compression ratios than LZ4 and Zip, but at considerable expense. For compression levels of 1 to 4, the method is generally fast and cheap but may not provide significantly better compression than Zip. At compression levels 5 to 9 the method significantly improves compression ratios but the cost is large in terms of time, memory consumption and computing requirements. This industry standard method is widely used in file compression tools.
PNG Compression A lossless compression method that can be applied to 'Image' fields only. The user does not need to specify a compression level. It will achieve higher compression ratios than the general lossless compression methods (LZ4, Zip, LZMA), but the encoding performance is relatively poor. It is an industry standard image compression method commonly used for internet imagery and image editing software.
JPEG Compression A lossy compression method that can be applied to 'Image' fields only. By specifying a compression level of 0 to 9 the user can control the quality of the image from highest quality (largest size) to lowest quality (smallest size). In general, it will achieve higher compression ratios than any of the lossless compression methods and the encoding and decoding performance is very good. It can only be used for single component or three component color (R, G, B, RGB or BGR). If an alpha channel is present this will be written separately using a lossless encoder. It is an industry standard image compression method commonly used for internet imagery and image editing software.

For 'Continuous' and 'Classified' grids you must select a general lossless method. For rasters that are images you can select either lossless or lossy image compression methods.

An example:

A dataset we regularly use in live demonstrations is a digital surface model from Denmark. The Danish GeoData Agency makes this data available for anyone to download. The data is 1.6 meter resolution for the whole country.

The original data consists of 653 individual ASCII grid files. The files total about 130 GB in size.

All 653 files can be merged into a single MRR format raster grid in one operation. The size of the resulting grid depends on the level of compression chosen. For example using LZMA with level 4 compression the resulting file is 29.8 GB.

And there is more...

Consider this article to be part 1. Everything in this article pertains to the first release. The second release (once again being renamed to MapInfo Pro Advanced) offers additional capabilities which will appear in a future article. A very important improvement is the ability to merge rasters with different resolution (cell sizes) into a single file. In addition, rasters can be created using a field and band structure.

Want to try MapInfo Pro Advanced?

In early November, the MapInfo Pro v15.2 free trial will be posted for download. This will include MapInfo Pro Advanced.

Article by Tom Probert, Editor of "The MapInfo Pro" journal
When not writing articles for "The MapInfo Pro" journal, Tom enjoys talking to MapInfo Pro users at conferences and events. When not working he likes to see movies with car chases, explosions and kung-fu fighting.