Happy #MapInfoMonday
Today, we will dive into the beautiful world of raster grids in MapInfo Pro.
Christopher Enckell from the Municipality of Falkenberg in Sweden asked me a particular question:
How can I create an elevation model in a single MRR file to use in MapInfo Pro for our entire municipality? We have been given the data from a new nationwide laser scan of Sweden. I have been given this data as txt files with X, Y, and Z values and as MapInfo TAB Files with points.
This is what Christopher is looking for:
The data - Christopher shared a couple of files - represent the actual digital elevation model with a point for each meter.
I tried using a few of the interpolation models, but they will typically use the extent of the point data to determine the position of the cells. This most often results in the point not being at the center of the grid cell.
Luckily, I have some great colleagues who know even more about these various raster grid formats and the capability of MapInfo Pro Raster than I do. I reached out to @Anshul Goel. Anshul took one look at the text files and TAB files and told me that the text files are in fact XYZ Grids. For MapInfo Pro to pick up this format, I just had to rename the files from TXT to XYZ.
The trick here, Anshulk said, is to not use any of the interpolation tools in MapInfo Pro. The text files are in fact grid files already, we just need to make MapInfo Pro recognize these.
I renamed the files and selected the two sample files as input files using the Browse button next to the Input File list in the Merge panel.
The XYZ files didn't come with any projection information so for the first file, I selected, MapInfo Pro asked me for the projection. It then applied this projection to the other file too. This process does take a while as it needs to inspect each XYZ file for its extent when creating the TAB file. YOu can find some more details from Christopher on time further down.
I hit the Process button and the process started. After less than 2 and a half minutes, the process had finished the result MRR was shown.
I shared these instructions with Christopher Enckell and off he went. Two days later he got back to me: "That was perfect! Thank you"
I asked for some more details that I could use in this article and he shared this:
The municipality of Falkenberg covers 1,150 square kilometers and is covered by 236 files as you can see below.
The entire process took 10 hours. 3.5 hours were spent on creating the TAB files for the XYZ files. The remaining 6.5 hours were spent on creating the merged MRR. I let it run the process overnight and in the morning it was done. It ran on an HP Workstation with 4 cores.
Each XYZ file had a size of 170MB. This results in a total size of 40GB for the 236 files. Each XYZ covers an area of 2.5 by 2.5 km. The total coverage for the area including the sea is 1,475 square kilometers which equals 1,475,000,000 input points.
The final MRR was a lot smaller in size: only 3.23 GB.
Christopher also wanted me to highlight the benefit of the MRR format: Small in size and very performant. He can open this MRR from his network in 2 seconds, and it zooms and pans instantly in MapInfo Pro.
Christopher also shared this more detailed image from the final digital elevation model: Next to the small water dam, you can see a peat pit area where they have been digging out peat in earlier days.