[Qgis-user] large DEM not loading tiles correctly

Andrew Harfoot ajph at geodata.soton.ac.uk
Thu Oct 6 04:55:46 PDT 2022


Hi Michael,

Here are some instructions to do exactly what you are asking that I 
recently wrote for someone else (you are not alone!):

The ESRI ASCII grid format is supported by QGIS, and will load as a 
raster if you drag an .asc file over the map canvas. The further 
complication with the gridded dataset is that it is split into 10km 
tiles rather than being a single national layer, so needs to be merged 
before moving on to the next steps. This is fairly straightforward using 
the following steps:

1. Unzip the downloaded data. You'll notice that the 10km tile files are 
also zipped, and each placed in a 100km square folder: 
hp\hp40_OST50GRID_20220506.zip

2. Move the zip files out of their 100km square folders to make it 
easier to process them all at once. This can be done through File 
Explorer by searching in the folder below the 100km square folders for *.zip

You should get 2858 results. Select all of these files using Ctrl + A 
and then drag them into the data folder - they will be moved out of 
their individual 100km square folders

3. Unzip all the zip files. I don't think that the built in Windows zip 
functionality can do this in one go though. I use the open source 7zip 
software which allows a bunch of zip files to be selected in File 
Explorer and then from the right click menu, 'Extract Here' can be 
chosen. You should now see a .asc file in the folder for each 10km grid 
square, eg: HP40.asc. This is the grid data.

4. Merge the 10km tiles together. This is done in QGIS using the Merge 
tool from the Processing toolbox (or Raster > Miscellaneous > Merge...). 
In the Input layers section, click the ellipsis button to open the file 
selector, and use the 'Add File(s)...' button to add the .asc files (if 
you sort by file type you can select them as a block).


Fill out the rest of the Merge tool dialog like this:


Clicking Run will start the process, which may take some time, but on 
completion you should have a single national terrain dataset!


Cheers,

Andy


On 28/09/2022 12:32, Michael.Dodd via Qgis-user wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
> I am trying to put together the 50m uk DEM e.g. 
> https://www.data.gov.uk/dataset/835cf20a-8feb-4394-8b30-dcfe840ac13d/os-terrain-50-dtm 
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.data.gov.uk%2Fdataset%2F835cf20a-8feb-4394-8b30-dcfe840ac13d%2Fos-terrain-50-dtm&data=05%7C01%7Cajph%40geodata.soton.ac.uk%7C969a389b311348dc9ca508daa1452261%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637999615544988116%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SJ5%2Fi079IPc9aBN9OHDgnKDMUVj0gyBQr3YNMxA%2FtfU%3D&reserved=0> 
> but it often does not work.  The data are supplied as thousands of 
> small tiles that takes ages to unpack and put into a folder to get 
> into qgis, however when you try to load the tiles some work and others 
> don’t and even the ones that do work and display fine sometimes don’t 
> merge to form large tiles and sometimes will form virtual rasters but 
> not merged files.  Basically it is a mess.  I suspect others have done 
> this successfully so any suggestions?
>
> It is particularly odd that some of the tiles will merge and others 
> won’t and that some won’t display if you ask it to load hundreds at a 
> time but if you just add them in a few at a time then they will load 
> and display (in addition to the hundreds already loaded). This 
> suggests various bugs assuming the original data are not in a whole 
> variety of slightly different formats (should all be .asc)
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user


-- 
Andy Harfoot

Skype: gdi_ajph
Teams:ajph at soton.ac.uk

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

www.geodata.soton.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221006/269045fc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FeogaPATSB0l8aJO.png
Type: image/png
Size: 11255 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221006/269045fc/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dYpBoT0d8JAR0qE2.png
Type: image/png
Size: 29581 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221006/269045fc/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eETZGtotVgCO1tHL.png
Type: image/png
Size: 38972 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221006/269045fc/attachment-0005.png>


More information about the Qgis-user mailing list