In the 17.03 user interface we currently only generate virtual rasters (MVR) from the "Warp" tool and from the "Virtual Raster" tool. The latter is used to combine multiple source rasters into a multi-banded raster - it is not a merge. The main purpose is to provide some extra flexibility when rendering.
In the future we will generate MVR files from other tools - Resample, Reproject, Clip, Merge, Align, Combine, Calculator and others like Classify and Filter. The code already supports these operations in an MVR but we have provided no documentation or support, and it ought to be considered "in beta".
So to do a "merge" operation (like I described in an earlier post) with an MVR today requires you to write the XML file by hand. I am currently writing a series of articles on writing XML files to access the new raster rendering engine and I will finish those soon. After that, I plan to write a series of articles on virtual rasters and I will post some example XML files. Here is an MVR that I sent to Andrei recently that merges three DTM rasters (Global, UK and LiDAR) and reprojects everything into the popular visualisation CRS (EPSG 3857) so it plays nice with Bing Maps. To display this MVR in MapInfo you just load it like you would any other raster.
<?xml version="1.0" encoding="UTF-8"?>
<VirtualRaster>
<Cache2File>False</Cache2File>
<Raster>
<Name>DTM</Name>
<OpenOnDemand>False</OpenOnDemand>
<OpenBaseSupport>False</OpenBaseSupport>
<File>Data\SRTMV2_30as_LandOnly.mrr</File>
<File>Data\UK_OS_Terrain_50m_Euro.mrr</File>
<File>Data\WalesLiDARDTM.mrr</File>
</Raster>
<RasterOperationList Name = "MergeDTM">
<Merge>
<RasterInfo>
<Name>DTM</Name>
<UnderviewMapSize>32,32</UnderviewMapSize>
<UnderviewTileSize>256,256</UnderviewTileSize>
<BaseMapSize>32,32</BaseMapSize>
<BaseTileSize>1024,1024</BaseTileSize>
<OverviewMapSize>32,32</OverviewMapSize>
<OverviewTileSize>1024,1024</OverviewTileSize>
<CoordinateSystem>CoordSys Earth Projection 10,157,"m",0</CoordinateSystem>
<FieldInfo>
<Name>DTM</Name>
<Type>Continuous</Type>
<Compression>LZMA,9</Compression>
<OverviewCellCoverage>Coverage_Any</OverviewCellCoverage>
<ValidFlagPerBand>False</ValidFlagPerBand>
<Transform>
<Type>Simple</Type>
<Origin>Measure(0,1),Measure(0,1)</Origin>
<CellSize>Measure(30,1),Measure(30,1)</CellSize>
</Transform>
<BandInfo>
<Name>DTM</Name>
<DataType>REAL4</DataType>
<StoreDataType>REAL4</StoreDataType>
<RestrictDecimals>False</RestrictDecimals>
<Clip>False</Clip>
<Transform>False</Transform>
<PredEncode>False</PredEncode>
<PredEncodeType>None</PredEncodeType>
<NullValueType>Mask</NullValueType>
<DiscreteValue>False</DiscreteValue>
</BandInfo>
</FieldInfo>
</RasterInfo>
<InterpolationNearest>False</InterpolationNearest>
<UnderviewInterpolation>Cubic</UnderviewInterpolation>
<Layer>
<Raster Name = "DTM" Field = "0" Band = "0"/>
</Layer>
</Merge>
</RasterOperationList>
<RasterInfo>
<FieldInfo>
<BandInfo>
<Name>DTM</Name>
<Operation Name = "MergeDTM" PrimaryRaster = "True"/>
</BandInfo>
</FieldInfo>
</RasterInfo>
</VirtualRaster>
This is what it looks like - here we see the 30 arc-second resolution global raster.
Then if I zoom into the Wales coastline you can see the higher resolution 50 metre UK data. You can also see the 30 arc-second raster poking out underneath along the coastline as square edges.
Then zoom in further to find the DTM generated from LiDAR data which is 2 metre resolution. You can see the boundary between the 50m raster and the 2m raster. This 2m raster is actually a DSM - it has all the trees and culture in it.
The MVR file and the images are attached.
------------------------------
Sam Roberts
Engineer, MapInfo Pro Advanced (Raster)
Australia
------------------------------
Original Message:
Sent: 07-03-2019 11:28
From: Chris Jenkins
Subject: Elevation data on Mapping Data on data.gov.uk
Hi @Dave Townend, Peter is on annual leave, I believe @Sam Roberts is in the office but is on Australian time. I imagine he will get back to your once he is in the office.
------------------------------
Chris Jenkins
Pitney Bowes Software Ltd
HENLEY-ON-THAMES
Original Message:
Sent: 07-03-2019 07:38
From: Dave Townend
Subject: Elevation data on Mapping Data on data.gov.uk
Hi @Peter Møller any update on this? It would be very useful and timely.
@Sam Roberts do you have any pointers on the MVR virtual raster feature? Is this now default format if I merge multi-res rasters? I've just upgrade to 17.0.3 so keen to try this out.
------------------------------
Dave Townend
Wireless Research
BT Group plc
London
Original Message:
Sent: 05-20-2019 02:53
From: Peter Horsbøll Møller
Subject: Elevation data on Mapping Data on data.gov.uk
Thanks Chris, and yes I'll add the capability to create tab files for the ASCII files when I have a few minutes to spare :-)
------------------------------
Peter Horsbøll Møller
Pitney Bowes
Original Message:
Sent: 05-17-2019 05:59
From: Chris Jenkins
Subject: Elevation data on Mapping Data on data.gov.uk
Hi John, I agree it is lovely! Very interesting to be able to pan and zoom into inspect any features at that level of detail anywhere in the country. It was approximately 21500 ascii files contained in around 260 folders. I did the tedious task of managing this manually whilst a certain Danish MapInfo Pro expert @Peter Møller was building a little application using the raster API (which ships with MIP Advanced) to merge these automatically. It needs some tweaking but it helped do the final merge. Would you see such a tool as being useful in MapInfo Pro Advanced? I am of the opinion that a tool that can search for the .asc files in multiple folders and then merge them would be a great addition.
------------------------------
Chris Jenkins
Pitney Bowes Software Ltd
HENLEY-ON-THAMES
Original Message:
Sent: 05-17-2019 05:17
From: John Ievers
Subject: Elevation data on Mapping Data on data.gov.uk
Lovely!
How many files did you have to handle?
Have you found a way of handling thousands of files for merging?
------------------------------
John Ievers
CDR Group
Hope Valley, United Kingdom
Original Message:
Sent: 05-16-2019 12:47
From: Chris Jenkins
Subject: Elevation data on Mapping Data on data.gov.uk
I have been ploughing through the open data on the https://data.gov.uk/ website recently. I started downloading open lidar data for Wales, 25cm through to 2m DSM and DTM's are avilable. I have used MIP Advanced to stitch all of this together, it's compressed it into a 16Gb DTM. As you can see in the map below, the data capture was for flooding purposes and focuses on the coast and river network, however as a result lots of urban areas have also been captured.
Out of interest I started inspecting my local area and found that I have been cycling through an Iron Age Hill Fort without ever noticing it. In the map as you can see below is an extremely clear kidney bean shaped feature, using Slope and Curvature maps derived from the DTM the feature becomes even more evident. I soon started noticing these all over the place. It's very revealing of the turbulent History of the area and the need for fortification against invaders of the past.
It is very easy to see the ear/kidney bean shape fortification mound when viewing the slope map.
This feature is called Mynedd Y Castell and dates back to c800 BC - 84AD according to www.ancientmonuments.uk
Detailed information on the data capture can be found here.
Contains Natural Resources Wales information © Natural Resources Wales and Database Right. All rights Reserved.
------------------------------
Chris Jenkins
Pitney Bowes Software Ltd
HENLEY-ON-THAMES
------------------------------