arma3:terrain:qgis-real-world-data-tutorial
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| arma3:terrain:qgis-real-world-data-tutorial [2019/02/11 02:57] – added new update from ross. snakeman | arma3:terrain:qgis-real-world-data-tutorial [2024/08/02 18:53] (current) – links added. snakeman | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== QGIS Real World Data Tutorial ====== | + | ====== | 
| - | ArmA 3 QGIS Real World Data Tutorial | + | [[https:// | 
| + | |||
| + | **ArmA 3 QGIS Real World Data Tutorial** by Ross | ||
| This process has often been described using Global Mapper, but I wanted to detail the equivalent steps within the open source (free) GIS app - QGIS. | This process has often been described using Global Mapper, but I wanted to detail the equivalent steps within the open source (free) GIS app - QGIS. | ||
| Line 7: | Line 9: | ||
| The goal was to achieve an export satellite image and heightmap with the same or better quality than would be possible with Global Mapper. | The goal was to achieve an export satellite image and heightmap with the same or better quality than would be possible with Global Mapper. | ||
| - | The is my second revision of this process as I recently discovered that due to an update to GDAL (**2.4.0**) one of the key steps in the original tutorial using ' | + | I've used GDAL command lines where possible, which simplifies | 
| - | So I reworked the process by getting a bit more under the hood, and using GDAL command line where possible, this also simplifies the process a little and reduced even further processing on the data. | + | The following software | 
| - | + | ||
| - | This tutorial used the following software: | + | |
| **[[https:// | **[[https:// | ||
| Line 54: | Line 54: | ||
| ===== Heightmap: ===== | ===== Heightmap: ===== | ||
| + | |||
| + | This tutorial covers single raster heightmap as per the kind you will find on [[https:// | ||
| **Drag and drop your heightmap ' | **Drag and drop your heightmap ' | ||
| - | This tutorial covers single raster heightmap as per the kind you will find on opentopo [[http://opentopo.sdsc.edu/ | + | If you do use opentopo | 
| **Set QGIS to appropriate CRS for location of your HM** | **Set QGIS to appropriate CRS for location of your HM** | ||
| Line 66: | Line 68: | ||
| Select the CRS to match your real world data, in this example its ‘**WGS 84 UTM zone 20N**’ because the terrain is from the Montserrat in the Caribbean. See also [[https:// | Select the CRS to match your real world data, in this example its ‘**WGS 84 UTM zone 20N**’ because the terrain is from the Montserrat in the Caribbean. See also [[https:// | ||
| - | This will ensure your QGIS project space works appropriately with any other data you want to add - eg road shapefiles etc. Terrain Builder will only use UTM 31N but we'll get to that later. | + | This will ensure your QGIS project space works appropriately with any other data you want to add - eg road shapefiles etc. Terrain Builder will only use **UTM 31N** but we'll get to that later. | 
| {{https:// | {{https:// | ||
| Line 106: | Line 108: | ||
| {{https:// | {{https:// | ||
| - | After the last **left mouse click** from the step above, the tool is still waiting to plot more points, so to finalise | + | After the last **left mouse click** from the step above, the tool is still waiting to plot more points, so to finalize | 
| {{https:// | {{https:// | ||
| Line 113: | Line 115: | ||
| {{https:// | {{https:// | ||
| + | |||
| + | Save the above edits to the shapefile by clicking on the layer & selecting ‘**Toggle Editing**’ | ||
| **Obtain extents from square feature** | **Obtain extents from square feature** | ||
| Line 143: | Line 147: | ||
| import os\\ | import os\\ | ||
| - | os.system(r%%''' | + | os.system(r%%''' | 
| Some explanation of the key parameters: | Some explanation of the key parameters: | ||
| Line 178: | Line 182: | ||
| ==== For single tile export ==== | ==== For single tile export ==== | ||
| - | **Load in just the ' | + | **Load in just the ' | 
| {{https:// | {{https:// | ||
| Line 289: | Line 293: | ||
| And list them out for safe keeping - | And list them out for safe keeping - | ||
| - | TL -  Extent: (576787.687480, | + | **TL -  Extent**: (576787.687480, | 
| - | TR -  Extent: (587027.687480, | + | **TR -  Extent**: (587027.687480, | 
| - | BL -  Extent: (576787.687480, | + | **BL -  Extent**: (576787.687480, | 
| - | BR - Extent: (587027.687480, | + | **BR - Extent**: (587027.687480, | 
| **Run GDAL command for each quarter to set cell size and CRS and clip to shapefile square extents** | **Run GDAL command for each quarter to set cell size and CRS and clip to shapefile square extents** | ||
| Line 302: | Line 306: | ||
| ===== Loading your assets into Terrain Builder ===== | ===== Loading your assets into Terrain Builder ===== | ||
| + | I would recommend saving copies of any files to be used in **Terrain Builder** into a separate terrain project folder. This will prevent your source project files being adversely affected, and potentially no longer working within **QGIS** - particularly relevant to those changes mentioned below. | ||
| **Heightmap (.asc) edits** | **Heightmap (.asc) edits** | ||
| - | Open your **asc** in notepad and change the following to ensure it loads in Terrain builder: | + | Open your **asc** in notepad and change the following to ensure it loads in **Terrain builder**: | 
| {{https:// | {{https:// | ||
| Line 311: | Line 316: | ||
| Save to a new asc, whilst maintaining the original for use in your QGIS project space | Save to a new asc, whilst maintaining the original for use in your QGIS project space | ||
| - | Before loading the asc file into Terrain Builder, delete the .prj file. Otherwise it will not import into TB. | + | Before loading the asc file into **Terrain Builder**, delete the .prj file. Otherwise it will not import into TB. | 
| {{https:// | {{https:// | ||
| Line 318: | Line 323: | ||
| - | Before loading the satellite image into Terrrain | + | Before loading the satellite image into Terrain | 
| {{https:// | {{https:// | ||
| Line 336: | Line 341: | ||
| ===== Preparing Road Shapefile ===== | ===== Preparing Road Shapefile ===== | ||
| - | **Load | + | **Load | 
| + | |||
| + | In this example I got a good dataset from - [[https:// | ||
| {{https:// | {{https:// | ||
| Line 345: | Line 352: | ||
| {{https:// | {{https:// | ||
| - | Save features from clip to new shapefile -  selecting | + | Save features from clip to new shapefile -  selecting | 
| Top Menu - **Layer** > **Save As** | Top Menu - **Layer** > **Save As** | ||
| Line 461: | Line 468: | ||
| {{https:// | {{https:// | ||
| + | ===== 3D Preview using Qgis2threejs ===== | ||
| + | |||
| + | If you want to see an instant 3d preview of your terrain within QGIS you can with the amazing plugin **Qgis2threejs** | ||
| + | |||
| + | First install it: | ||
| + | |||
| + | Top menu > **Plugins** > **Manage and Install Plugins** | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | RMB on the Merged layer and select **Zoom to Layer** | ||
| + | |||
| + | Then select both the **Merged** raster, and the original source heightmap - deselect all other layers | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | Start the Qgis2threejs plugin - Top Menu > **Web** > **Qgis2threejs** > **Qgis2threejs Exporter** | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | Select source heightmap and nothing else | ||
| + | |||
| + | RMB on heightmap > **Properties** | ||
| + | |||
| + | Set the **Resampling** level to **6** | ||
| + | |||
| + | Set **Resolution** to **400%** | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | Enjoy browsing around your terrain in 3D: | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | You can also export your terrain to a browser interface if you want - **File** > **Export to web** | ||
| - | **Coming Soon:** | ||
| - | * Assisted image classification - for creation of mask | ||
| - | * 3d preview using Qgis2threejs | ||
arma3/terrain/qgis-real-world-data-tutorial.1549853858.txt.gz · Last modified: 2019/02/11 02:57 by snakeman
                
                