User Tools

Site Tools


arma3:terrain:qgis-real-world-data

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
arma3:terrain:qgis-real-world-data [2017-01-05 19:32]
snakeman added detailed opentopo and terra incognita steps.
arma3:terrain:qgis-real-world-data [2017-08-28 01:06]
snakeman added refactor info.
Line 1: Line 1:
-====== ​Disclaimer WIP ======+====== ​Real World Data using QGIS ======
  
-This page is work in progress, **this is not a complete tutorial**. This is notes written down from our discord arma server #​terrain_makers channel discussion. I will try to finish this page into tutorial as soon as possible, so far I have not been successfully with my efforts ​to get real world data through QGIS into terrain builder and arma3.+How to get real world data through QGIS into terrain builder and arma3. See our main [[arma3:​terrain:​real-world-data-tutorial]] page for the main tutorial part.
  
-If you're lurking in the channel, read this page and know some new information or different way to do something; **please let me know by @Snake Man highlight in the channel**, thank you. 
  
-btw you can scroll to bottom of this page to see last update time in lower right corner.+====== Disclaimer WIP ====== 
 + 
 +This QGIS page is work in progress, **this is not a complete tutorial**. Please [[:​contact|contact]] us if you can provide any more information about QGIS real world data subject.
  
  
Line 12: Line 13:
 Goal of this work in progress page is to learn how to get real world data for: Goal of this work in progress page is to learn how to get real world data for:
  
-  * terrain +  * <del>terrain</​del>​ see [[arma3:​terrain:​heightmap-real-world-data]] 
-  * satellite texture+  * <​del>​satellite texture</​del>​ see [[arma3:​terrain:​satellite-texture-terra-incognita]]
   * satellite mask   * satellite mask
-  * roads+  * <del>roads</​del>​ see [[arma3:​terrain:​road-shapefiles-real-world-data]]
   * vegetation   * vegetation
  
Line 21: Line 22:
  
 **I do not know if all of the above is possible, terrain is but mask? vegetation? No idea yet, I'm learning one step at the time.** **I do not know if all of the above is possible, terrain is but mask? vegetation? No idea yet, I'm learning one step at the time.**
- 
- 
-====== Real World Terrain Data to ArmA 3 ====== 
- 
-**HOWTO get real world terrain data into ArmA 3** 
- 
- 
- 
-====== Terrain Heightmap ====== 
- 
-**ALOS World 3D - 30m data from opentopo.sdsc.edu** 
- 
-Go to [[http://​opentopo.sdsc.edu/​lidar?​format=sd|opentopo.sdsc.edu]] website, click Global Data tab, click satellite data -> "ALOS World 3D - 30m". Now you should see world map with red boxes marking the areas for available data. 
- 
-Use mouse wheel (middle button) to zoom in / out of the globe map, LMB and drag to move the map. 
- 
-Once you have zoomed enough in to a smallish area, click "​select a region"​ button in left side of the globe map screen. Mouse cursor changes to a cross now and you can drag a box to select region. Below you can see the data selection coordinates. 
- 
-In coordinates box, if you choose to do so, you can tick "​manually enter selection coordinates"​ box and then manually type in lat/lon coordinates. This is the only sure way to grab perfect square power of two data selection. 
- 
-Once you are satisfied with your selection, scroll down to data output formats. Choose "Arc ASCII Grid" from the drop down. 
- 
-On visualization untick "​Generate hillshade images from DEMs" box. 
- 
-Finally on job description box "Enter your e-mail address"​ just type in whatever asdf@aol.com some fake email address, unless you specifically want them to email you of course. At some point if you try to get huge amount of data that there is long waiting period while site is processing it, perhaps its good way to add your own email here so you get notification when the download is ready. But for normal small size data selections, there is no need for real email. 
- 
-When fake email is in, click submit. 
- 
-Once processing is done you get "​Raster Job Report"​ page which has your download. On "​Download compressed raster results:"​ click the "​rasters_alos.tar.gz"​ downloadable file to... you know, download. 
- 
-This download is always the same file name so **please be careful and unpack this file into a directory**,​ use winrar RMB "​extract to rasters_alos/"​ and then **rename the directory to some good name which you recognize** because the terrain Asc ASCII Grid file inside is also named just "​output_alos.asc"​ every time you download new data. This way you never overwrite your existing terrain data downloads. 
- 
-You should be able to import the tar gunzip (.gz) file into QGIS, however you should unpack it first like explained above. You can save the heightmap from QGIS into TIF file format and then read the tif with L3DT. L3DT can then save the heightmap as ASCII grid or XYZ. 
  
  
Line 77: Line 45:
 ====== OpenStreetMap ====== ====== OpenStreetMap ======
  
-Once you have terrain loaded in QGIS, you can get streets / roads to show transparent on top of it.+Once you have terrain loaded in QGIS, you can get streets / roads to show transparent on top of it. This is just an image, not actual road shapefiles, see [[arma3:​terrain:​road-shapefiles-real-world-data|Road Shapefiles Real World Data]] how to download roads.
  
 Use web -> openlayers plugin -> openstreetmap -> openstreetmap (heh yes twice). Use web -> openlayers plugin -> openstreetmap -> openstreetmap (heh yes twice).
Line 86: Line 54:
  
 You can click the X button in layer panel on each layer to turn them on/off. You can click the X button in layer panel on each layer to turn them on/off.
 +
 +You should download [[http://​download.geofabrik.de/​|OSM shapefiles from geofabrik.de]] instead.
  
  
Line 98: Line 68:
 Hydrra: Yeah, The plugin provides both sat image and street map. just make sure to separate the layer groups so it's easier to keep track of. Hydrra: Yeah, The plugin provides both sat image and street map. just make sure to separate the layer groups so it's easier to keep track of.
  
 +You should download [[arma3:​terrain:​satellite-texture-terra-incognita|Satellite Texture with Terra Incognita]] instead.
  
-====== Convert Geodetic .ASC ====== 
  
-Terrain Processor should be able to convert geodetic .ASC heightmap into something that terrain builder would read. I have not managed to get it to work, terrain processor always does (Not Responding) freeze, meaning my file and/or settings were wrong.+====== QGIS Print Composer ======
  
-Source [[https://​community.bistudio.com/​wiki/​Terrain_Processor:​_Tutorial#​Heightmap|bis wiki terrain processor tutorial: heightmap]].+Print Composer will save an image of your current view.
  
 +Open it by Project -> new print composer, or use CTRL-P
  
-====== Terra Incognita ======+Make it a square pare size, for example 100mm x 100mm.
  
-Terra Incognita should be able to download high resolution satellite textures for you.+Select layout -> add map, drag a box around the white area.
  
-Source **SOURCEFORGE.NET - be warned!** [[https://​sourceforge.net/​p/​terraincognita2/​wiki/​Home/​|sourceforge.net/​p/​terraincognita2]].+The view should look like your current QGIS main view, hide/show layers to get the view you want like google satellite.
  
-If you browse ​to [[https://​sourceforge.net/​projects/​terraincognita2/​files/​|sourceforge.net/​projects/​terraincognita2/​files/​]] you'll find ZIP files in there like the moment of writing this tutorial "​TerraIncognita241_net4.zip",​ this is a portable version, meaning you do not have to use the stupid terra incognita .bat installer which forces install dir to your desktop.+Item properties -> extents, no idea what to do with those :)
  
-IceAlso in TerraIncognita zoom right in so it says 1m\px or something right at top of your screen, then export your image as OziExplorer,​ import that to GM and it will place it exact over your height map+FinCenturionyou need to know now exactly how large of a chunk you need. and the coordinates / extents of this data. I have changed up everything to match arma worldspace by using the methods in my [[arma3:​terrain:​qgis-reproject-transform-tutorial|QGIS Reproject & Transform Tutorial]].
  
-Select ​map source ​-> maps.google.com -> google satellite map.+FinCenturion:​ but you need lower left corner x,y and upper right corner x,y coords\\ 
 +FinCenturion:​ if you have more data than you will need you can of course use an area that is in power of two - so you can keep the horizontal scale 1:1 with real life\\ 
 +FinCenturion:​ say you want to do a 4096 x 4096 m map, and your lower corner is in the (fictive) coords of x 1000 and y 1000 - > exents 1000, 1000 and 5096 and 5096\\ 
 +FinCenturion:​ if that made any sense :smile:
  
-Ice: if you don't have any map source ​the .dll may be blocked. So you have to unblock it like you would with the x-cams one+To save the image use composer ​-> export as image
  
-Use mouse wheel to zoom in / out of the globe map, LMB drag to move the globe map. 
  
-Once you have found a nice area you want to save as satellite texture, use menu selection -> rectangle selection, now you did not see any difference in your mouse cursor but you can LMB drag a box in the globe map. This is your selected area.+====== Export Highres Satellite using QGIS ======
  
-Apparently there is no way to make perfect square, power of two selection as you are doing it freehand, if anyone knows a way please let us know.+**A simple guide for exporting high resolution satellite maps using QGIS** by pooface
  
-You can move the selection if you LMB inside the red rectangle and drag. If you LMB drag outside the rectangle you will make a new selection losing the old one.+Install openweb layers for QGIS
  
-Please be careful when making a selection, try to visualize how large it is, you can easily make larger than 40960 x 40960 resolution images ​which has been the largest we have been able to import into photoshopIt is easy to just choose "cool looking area" and then it turns out to be 200k x 200k resolution, yikes! :)+Set your CRS (Coordinate Reference System) in QGIS of which you already know the coordinates of your map extents.
  
-When you are readyuse mouse wheel to zoom IN until the header says (1m/px) resolution. Now use file -> save map -> oziexplorer map, to save your selected satellite texture.+To make this possiblefirst find your real world location via the openweb layers plugin in QGISand give yourself an approximate field of view. The extents do not need to be exact, but it helps print composer.
  
-Once downloading there is no abort button, you just have to close terra incognita if you wish to abort your download.+In toolbar of QGIS find Project -> new print composer (CTRL-P) 
 +This will open a new window. 
 +  - add new map button on left side (white paper icon with a green "​+"​) 
 +  - draw a generic rectangle
  
-Terra Incognita doesn'​t appear to have any kind of save project feature, but on restart it does open the last location you had on previous session.+On left side infobar inside composer find:
  
-You can use QGIS (or Global Mapper) to open oziexplorer .map files.+  - Item properties tab 
 +   - under extents, set your coordinate extents based on the CRS you are using (in QGIS at the bottom right) 
 +   - under Main properties, change from Cache (default) to Render 
 +  - Go back to Composition tab and under Resize page to content, click Resize page 
 +  - You should be looking at a preview of your final satellite export framed nicely.
  
-QGIS layer -> add layers -> add raster layer, choose pcraster .map and select your terra incognita saved oziexplorer .map file. appears in QGIS main view OK.+Now you may export:
  
 +In the toolbar of the print composer window, under Composer: export as image
  
-====== Print Composer ======+  - set page widgth and height in pixels. 
 +  - Depending on how you plan to import into terrain builder, set these accordingly 
 +example:​\\ 
 +I want my satellite image to be 0.5 meters / pixel.\\ 
 +My terrain is 8192 meters by 8192 meters.\\ 
 +Therefore, I want my page width and page height to both be 16384 pixels. 
 +  - Save and then wait for export. ​ If you are exporting images of these large sizes, it MAY take a WHILE! 
 +  - Check your exported image after print composer finishes processing. Often times (for reasons I'm not sure) it may leave holes in your image, in which case I suggest re-exporting.
  
-Print Composer will save an image of your current view.+If you wish to reimport this to QGIS to guide your shapefile creation, you must include a .wld file of the same name as the image you just created.
  
-Open it by Project -> new print composer, or use CTRL-P 
  
-Make it a square pare size, for example 100mm x 100mm.+====== QGIS Refactor Fields ======
  
-Select layout -> add map, drag a box around ​the white area.+OSM place names data sometimes comes with different order for the fields, this will break up PMC OSM Places CSV2HPP tool. You can fix this in QGIS by using "​Refactor fields"​ plugin.
  
-The view should look like your current QGIS main viewhide/show layers to get the view you want like google satellite.+In processing toolbox search for "​refactor fields"​open it. Now you can reorder ​the fields mapping dialog list, so if you need to swap "​name"​ and "​type"​ fields, just click one and use the arrow keys to move up or down.
  
-Item properties -> extents, no idea what to do with those :)+When reorder is OK then just click run button and it creates refactored layer with the new reordered fields.
  
-FinCenturion:​ you need to know now exactly how large of a chunk you need. and the coordinates / extents of this data. I have changed up everything to match arma worldspace by using the methods in my [[arma3:​terrain:​qgis-reproject-transform-tutorial|QGIS Reproject & Transform Tutorial]]. 
  
-FinCenturion:​ but you need lower left corner x,y and upper right corner x,y coords\\ +====== Misc Notes ======
-FinCenturion:​ if you have more data than you will need you can of course use an area that is in power of two - so you can keep the horizontal scale 1:1 with real life\\ +
-FinCenturion:​ say you want to do a 4096 x 4096 m map, and your lower corner is in the (fictive) coords of x 1000 and y 1000 - > exents 1000, 1000 and 5096 and 5096\\ +
-FinCenturion:​ if that made any sense :smile:+
  
-To save the image use composer ​-> export ​as image+**QGIS** 
 + 
 +[4:09 PM] NigeyS: oo reproject and transform... yeah thats gonna give me a headache\\ 
 +[4:19 PM] FinCenturion:​ for image export purposes you dont need to reproject and transform\\ 
 +[4:19 PM] FinCenturion:​ but if you wish to use shapefiles straight up in TP or TB you do\\ 
 +[4:20 PM] NigeyS: atm i just need to get it into photoshop for the layer mask\\ 
 +[4:21 PM] FinCenturion:​ to use print composer ​make  a new print composer, then under the composition tab in the workspace make sure the page is square, i use 1000x1000mm\\ 
 +[4:22 PM] FinCenturion:​ then use the add map function from the layout drop down box\\ 
 +[4:22 PM] FinCenturion:​ scale the newly added map to cover the white sheet\\ 
 +[4:22 PM] FinCenturion:​ then click on your new map, go to the item proprties tab on the right again\\ 
 +[4:23 PM] FinCenturion:​ use the Extents to get the correct display\\ 
 +[4:23 PM] FinCenturion:​ so you basically need to know pretty exact coords of your map\\ 
 +[4:24 PM] FinCenturion:​ that is why sometimes it's better to have all your shape data reprojected to arma 3 TB worldspace\\ 
 +[4:24 PM] FinCenturion:​ anyhoo, then you use the export image button and set a file name, then final resolution\\ 
 +[4:25 PM] FinCenturion:​ it's a bit of a bother at first but QGIS is a massive help once you get used to it\\ 
 +[4:26 PM] NigeyS: that'​ll help thanks, i have all the co-ords etc
  
  
Line 168: Line 166:
  
 Snake Man: ok when you choose area of terrain you want to download, do you just get "​bulk"​ data with large amounts of room to maneuver or do you get square power of two exact size for arma3 use like 10km x 10km? Snake Man: ok when you choose area of terrain you want to download, do you just get "​bulk"​ data with large amounts of room to maneuver or do you get square power of two exact size for arma3 use like 10km x 10km?
 +
 +Answer: for global mapper you just get bulk data and cut it there, no idea if this is possible in QGIS...
arma3/terrain/qgis-real-world-data.txt · Last modified: 2018-07-26 20:10 by snakeman