Jump to content

Search the Community

Showing results for tags 'qgis'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter
  • Mercurious Brotherhood +2347063372861's +2347063372861>> I WANT TO JOIN OCCULT FOR MONEY RITUAL
  • 123betcasino01's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 5 results

  1. Having posted a previous tutorial regarding working with Terra Incognita and QGIS to manage satellite imagery ready for use in Terrain Builder - I have since discovered that due to an update to GDAL (2.4.0) one of the key steps in that tutorial using 'Clip Raster by Mask Layer' no longer works perfectly! So I reworked the tutorial 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. 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. 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 following software versions were used for this tutorial: QGIS v3.4.3 Terra Incognita v245 I have referenced Terra Incognita because I felt it was the easiest way to obtain satellite data in the oziexplorer map format - see this tutorial for help using Terra Incognita. Don't worry about getting the perfect square sat image using Terra Incognita, just grab slightly bigger area than you will actually use for this project - QGIS steps below will cut to the perfect square. First an overview of the steps required: For Heightmap: Load heightmap into QGIS (drag and drop) Set QGIS to appropriate CRS for location of your HM Create shapefile & generate perfect square using Advanced Digitizing panel Obtain extents from square feature Run 2 GDAL commands First to set cell size, CRS and then clip to shapefile square extents Second to convert to .asc file For Satellite image For single tile export Load in just the '.map' files generated from Terra Incognita into QGIS Merge rasters Obtain extents from square feature gdalwarp command will set cell size, CRS and then clip to shapefile square extents For 4 tile export (large projects 40960 size and above) Load in just the '.map' files generated from Terra Incognita into QGIS Merge Rasters Create grid – 2 x 2 Feature (using square generated above - heightmap step) Move each quarter to its own shapefile layer Obtain extents from each quarter feature Run gdalwarp command for each quarter to set cell size and CRS and clip to shapefile square extents And now detailed steps for: Heightmap This tutorial covers single raster heightmap as per the kind you will find on opentopo here, I will detail steps for heightmaps spread across muliptle rasters in another update. as they will require additional steps likely including Merge / Build Virtual Raster commands. This section does not cover any re scaling of heightmap, which I would recommend against anyway. Remember Grid size x Cell size should = the same size (meters) as your source heightmap selection. Drag and drop your heightmap '.asc' into QGIS If you do use opentopo for source of Heightmap, make sure extract both the .asc and .prj files before proceeding with below. They should both be in the zip file from opentopo. Set QGIS to appropriate CRS for location of your HM Clicking on the CRS section bottom right within QGIS – will bring up the Project Properties for CRS 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 UTM projection. 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. Create shapefile & generate square feature using Advanced Digitizing panel Top menu – Layer > Create Layer > New Shapefile Layer Save to project folder location Change Geometry type to ‘Polygon’ Match CRS so it is the same as that just configured in above step Right click on your shapefile in layers window & select ‘Toggle Editing’ From menu – View → Toolbars → Advanced Digitizing Toolbar Select ‘Add Polygon Feature’ Select Enable advanced digitizing tools To create a perfect square, left mouse click for your top left starting point, move your mouse to the right a little, then press ‘d’ on keyboard, type in the exact width (distance) required (in this example ‘20480’) then immediately press Enter – be careful not to move the mouse before pressing Enter or it will mess up the number. Press left mouse click and you will have drawn your first horizontal line which turns red. By default this tool snaps to 90 degree angles, making it easy to draw your lines. Now to draw the vertical line start moving mouse your down, press ‘d’ again and type in same figure as above, press Enter and another left mouse click, repeat the process for the last 2 lines of the square. See a short video example using the Advanced Digitizing tool: After the last left mouse click from the step above, the tool is still waiting to plot more points, so to finalise the square do a right mouse click This will then bring up an attributes dialogue – just type any number and Enter Save the above edits to the shapefile by clicking on the layer & selecting ‘Toggle Editing’ Obtain extents from square feature Activate the toolbox if it is not already available Start typing 'vector' in Processing Toolbox search bar, and you will see 'Vector information' Double click it and make sure your square input layer is selected - then just click Run You will only need to copy the Extent figures, which we will use within the GDAL commands in the next step Run the first GDAL command which will - set CRS, cell size and then clip to shapefile square extents From menu - Plugins > Python Console Click 'Show Editor' The blank window on the right is where you will paste GDAL commands Now you are ready to edit the command below to match your data - sections in bold are the parts to edit: import os os.system(r'''gdalwarp -t_srs EPSG:32620 -wo SOURCE_EXTRA=1000 -tr 5.0 5.0 -srcnodata "-9999" -r cubic -ot Float32 -of GTiff -te 576787.687480 1841104.815839 597267.687480 1861584.815839 D:/Arma/Heightmaps/Opentopo/output_srtm.asc D:/Arma/QGIS/Montserrat/converted.tif''') Some explanation of the key parameters within above command: -t_srs EPSG:32620 CRS to match where the heightmap is from in the world. -tr 5.0 5.0 The desired resolution of your heightmap, match with Cell size set within your Mapframe properties in Terrain Builder: -te 576787.687480 1841104.815839 597267.687480 1861584.815839 The 4 long figures represent the extents of your square, and should be replaced with your own figures obtained in previous step. Input path: D:/Arma/Heightmaps/Opentopo/output_srtm.asc Output path: D:/Arma/QGIS/Montserrat/converted.tif Update the paths to match where you've stored your source heightmap, and where you want the output tif saved to. You will have to wrap your paths with quotation marks "..path.." if it contains any blanks (spaces), or just remove blanks entirely to avoid the confusion. Run second GDAL command - converting tif from above step to a Terrain Builder friendly .asc Remember to change the paths in below command to match where your files are located import os os.system(r'''gdal_translate -of AAIGrid D:/Arma/QGIS/Montserrat/converted.tif D:/Arma/QGIS/Montserrat/final.asc''') Satellite image For single tile export Load in just the .map files into QGIS Merge Rasters Top Menu - Raster → Miscellaneous → Merge Select all your .map files as input layers change Output data type to ‘Byte’ as the default is ‘Float32’. Select ‘Save to File’ under Merged – as the default is to a temporary file. Obtain extents from square feature You should already have this from working on heightmap above 576787.687480 1841104.815839 597267.687480 1861584.815839 Run GDAL command import os os.system(r'''gdalwarp -t_srs EPSG:32620 -wo SOURCE_EXTRA=1000 -tr 1.0 1.0 -r cubic -of BMP -te 576787.687480 1841104.815839 597267.687480 1861584.815839 D:/Arma/QGIS/Montserrat/merged.tif D:/Arma/QGIS/Montserrat/mont.bmp''') Some explanation of the key parameters: -t_srs EPSG:32620 Sets the CRS -tr 1.0 1.0 Sets the resolution of your satellite image to 1mtr per pixel - which is recommended. Make sure it matches your settings within Terrain Builder. -te 576787.687480 1841104.815839 597267.687480 1861584.815839 Clips to shapefile square extents For 4 tile export Detailing additional steps required for a 4 tile export – which would suit those terrains that are 40960px x 40960px and higher. Load in just the .map files into QGIS Merge rasters - same as above (single tile export) Create grid – 2 x 2 Feature You will need to have created the square shapefile first – see above steps Top Menu – View → Panels → Processing Toolbox Processing Toolbox Menu – Vector Creation > Create Grid Set Grid type to ‘Rectangle (polygon)’ & the Horizontal & Vertical to half the distance of your main square Set it to save new grid feature to .shp file After clicking 'Use Layer Extent' Select the shapefile layer for your square After clicking Run, your original square will then be Covered with a new grid of 4 tiles – perfect quarters of your original square Move each quarter to its own shapefile layer Because you will need to export each quarter separately for use in Terrain Builder, we will move each quarter onto its own shapefile layer. Click Select Features - And select the first quarter: Top Menu – Edit > Copy Features Then… Edit → Paste Features As → New Vector Layer Save shapefile layer to something obvious I’ve used ‘TL’ for top left. Repeat for the remaining quarters and you’ll have something like below, ‘Grid’ can be deleted. You will then have 4 tiles which we can use to gather each quarters extents Obtain extents from each quarter feature Copy extents to clipboard And list them out for safe keeping TL - Extent: (576787.687480, 1851344.815839) - (587027.687480, 1861584.815839) TR - Extent: (587027.687480, 1851344.815839) - (597267.687480, 1861584.815839) BL - Extent: (576787.687480, 1841104.815839) - (587027.687480, 1851344.815839) BR - Extent: (587027.687480, 1841104.815839) - (597267.687480, 1851344.815839) Run GDAL command for each quarter to set cell size and CRS and clip to shapefile square extents import os os.system(r'''gdalwarp -t_srs EPSG:32620 -wo SOURCE_EXTRA=1000 -tr 1.0 1.0 -r cubic -of BMP -te 576787.687480 1841104.815839 597267.687480 1861584.815839 D:/Arma/QGIS/Montserrat/merged.tif D:/Arma/QGIS/Montserrat/TR.bmp''') 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 Open your asc in notepad and change the following to ensure it loads in Terrain builder: ncols 4096 nrows 4096 xllcorner 576787.687479999964 yllcorner 1841104.815839000046 cellsize 5.000000000000 NODATA_value -9999 ncols 4096 nrows 4096 xllcorner 200000 yllcorner 0 cellsize 5.000000000000 NODATA_value -9999.0 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. Satellite image Before loading the satellite image into Terrrain Builder delete the .bmp.aux file Managing the project assets within QGIS Save your QGIS project so that you can return to export further data at a later date. Layers can be tidied up to hold the essentials ready for the next time you want to re-run GDAL commands, or export anything else like road shapefiles or mask layers etc. Road shapefile creation Load into QGIS (drag and drop) road shapefile In this example I got a good dataset from - https://data.humdata.org/ Clip vector to square shape Top Menu - Vector > Geoprocessing Tools > Clip Save features from clip to new shapefile - selecting correct CRS UTM-20 Top Menu - Layer > Save As Set road shapefile to CRS - 31N RMB on road shapefile > Set CRS > Set Layer CRS Set QGIS project CRS to UTM- 31N (bottom right corner): Collect extents from your square shapefile: Extent: (576787.687480, 1841104.815839) - (597267.687480, 1861584.815839) The first two values will be used in the v.transform step below. v.transform on road shapefile using calculated extents from square shapefile Your heightmap asc must adhere to Terrain Builders required values of easting 200000 and northing 0 Your road shapefile also needs to line up to the same values - we will use v.transform to achieve this So taking the extent values we grabbed in previous step - We will do the following calculations to bring these values to (200000 and 0): Easting: 576787.687480 - 376787.68748 = 200000 Northing: 1841104.815839 - 1841104.815839 = 0 -376787.68748 -1841104.815839 Having figured out the correct figures plug them into the v.transform process Drag and Drop into QGIS your heightmap asc - the one you are able to load into Terrain builder - already adjusted to (200000, 0) Set CRS on above asc to UTM - 31N Right click on asc in Layers > Zoom to Layer In Layers panel drag the asc below your transformed road shapefile - so you can see the roads layered above the asc Your roads should now be perfectly aligned above your heightmap Setting ID and ORDER fields RMB on transformed shapefile layer > Toggle Editing RMB on transformed shapefile layer > Open Attribute Table Click Delete field - select all fields and press OK New Field - Name 'ID' - length 0 New Field - Name 'ORDER' - length 0 Toggle - Multi Edit mode ID - Enter 0 - click Update All Select ORDER from drop down - Enter 1 - click Update all Click - Switch to table view and check that ID column all show as '0' and ORDER all show as '1' Click Save RMB on transformed road shapefile - Toggle Editing to save the changes Switching to Terrain Builder - Load your road shapefile Top menu - File > Import > Shapes Click OK Perfectly overlaid within Terrain builder: 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 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 Start the Qgis2threejs plugin - Top Menu > Web > Qgis2threejs > Qgis2threejs Exporter Select source heightmap and nothing else RMB on heightmap > Properties Set the Resampling level to 6 Set Resolution to 400% Enjoy browsing around your terrain in 3D: 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 Above tutorial is also available on Github - https://github.com/rossoe/Arma3_QGIS
  2. Downloaded a Map 40x40km from Terra Incognita.... My Question is How to import this .Map ( Saved As OziExplorer from Terra Incognita) into Qgis. Thank you. - I followed this tutorial > https://pmc.editing.wiki/doku.php?id=arma3:terrain:satellite-texture-terra-incognita
  3. Dear all, Those of you who have tried importing roads from real data might have experienced the pain. There are multiple tutorials out there, but most of them give bits and pieces and it's hard to understand the exact workflow that needs to be followed. FYI, reference is mainly from these tutorials: Terrain Processor PMC Editing Software that you'll need: Terrain Builder Global Mapper QGIS SAS Planet Photoshop / Gimp Some of these software are not free, however there are trial versions that you may consider using. Let's get started. SETTING UP TERRAIN BUILDER & EXPORTING THE REFERENCE HEIGHT MAP Fire up Terrain Builder. Click on "Mapframes > Add mapframe": Leave the default Zone 31N selected and click OK: Set the name of the Mapframe, the output root folder (in your P drive), Easting to 200000 and Northing to 0: Click on the "Samplers tab" and choose your map size. I've set everything to have a map size of 10,240Km: Click on the "Processing" tab: Then click on "Rebuild Terrain": Confirm, and you will now have an empty terrain layer in Terrain Builder. We are going to export it so that we will be able to use it as a reference, further down in the tutorial: We're going to save it as reference-terrain.asc. DOWNLOADING ROADS There are multiple ways that you can get the roads shapefiles from Open Street Map. You can go on the https://www.openstreetmap.org/ website and export a specific area if you'd like, but we're going to download the data from http://download.geofabrik.de/ Head there, and select the country of your interest. In our case, we're going to need the data from Afghanistan: Download the .shp.zip format, and unpack it somewhere on your drive. SELECTING A PRECISE AREA Open Global Mapper and start a new project by selecting "Load Default Data": Click on Find address: Enter the name / coordinates of the area you're interested in (in this case Feyzabad, the map I'm currently working on): Click to center map on result: Let's now add some visual reference by clicking on the icon to connect to online data: Select "World Imagery" and click on "Connect": Use the zoom tool to zoom on your area. You can now enable the Control Center from the menu: So you can enable / disable the layers to view either the world imagery or the countries default data. We are now going to select our precise area of interest. Click on the "Create rectangle/Square area" tool: Draw an area (doesn't need to be precise) on the terrain where you want your area to be. In the menu that pops up when you release the mouse button, enter the name of your reference area (I've called it "border"): We can now better move the selection to your area of interest. Click on the Digitizer Tool: Select your area, then on the move tool: This allows you to move your area of interest around: Once you're satisfied with the position, we're going to adjust this area to be a perfect square in terms of meters. Right click on the area and select "Vertex Editing > Edit Feature Vertices": In the menu that pops up, we're going to change all of the vertices distances so that they reflect our map size, i.e. 10,240m. To do so, click on the first vertex, then on the "Edit Length" button, and enter the value 10240 meters: Once you're done, you will have a perfect square of 10,240m x 10,240m (look at the "Length" column): Click on "Copy to clipboard" to be able to access these references later: These are my coordinates: Idx,Longitude,Latitude,Length,Total Length,Heading 1,70° 30' 01.1798" E,37° 09' 41.4202" N,10.24 km,---,90.0° 2,70° 36' 56.2072" E,37° 09' 41.4496" N,10.24 km,10.24 km,180.0° 3,70° 36' 56.2072" E,37° 04' 09.2811" N,10.24 km,20.48 km,270.0° 4,70° 30' 01.6831" E,37° 04' 09.3107" N,10.24 km,30.72 km,0.0° 5,70° 30' 01.6831" E,37° 09' 41.4793" N,---,40.96 km,--- Use a converter tool to convert these coordinates in UTM. I used this online converter tool to do so: http://home.hiwaay.net/~taylorc/toolbox/geography/geoutm.html The result of my conversion is to have the following 4 points: top left 37.0692447463377,70.5003277260268 UTM: 4103606.716118635,633376.3161381673 top right 37.0692447463377,70.6156131229525 UTM: 4103774.7515539424,643625.6939804782 bottom left 37.1615056060246,70.5003277260268 UTM: 4113842.6755561405,633214.540454661 bottom right 37.1615056060246,70.6156131229525 UTM: 4114010.864559334,643451.4784080114 Note that the UTM zone of my area is 42N. Now it's time to import the roads downloaded from Geofabrik. For the purpose of this tutorial (importing roads) we're only interested in the gis.osm_roads_free_1.* files: Import the gis.osm_roads_free_1.shp file to Global Mapper (a simple drag & drop will do), and you will see the roads surrounding your selection: Now we need to convert the project to use UTM. Click on "Configure": In the resulting popup, set the Projection to UTM (the correct zone should already be set for you, if not just use the one that resulted from your computations here above): You might see your areas tilting a bit. Now, let's crop the roads to our area of interest. With the Digitizer Tool active, and only the roads and your border layer visible, select your border, and right click to select "CROP - Crop Loaded Features to Selected Area(s)": Ensure that you consider only lines and that you create a new layer: Name your layer: Verify that the projection of your new layer is correct: and then click on OK. You can now hide the layer with the full roads, and if you visualize only the newly created "roads_clipped" layer and the border you'll see only the roads you're interested in: We can now export those clipped roads: Export them as "shapefile": Specify your destination file for your lines (in my case, roads_exported.shp) and that "Generate Projection" is selected. PREPARING ROADS FOR IMPORT Open up QGIS. Open the options: Ensure that your projection is set to WGS 84 / UTM zone 31N by default: Click on OK and start a new project. Now import (drag & drop will suffice): The reference height map that you exported here above from terrain builder (reference-terrain.asc). The roads_exported.shp that you exported from Global Mapper. Right click on roads_exported and select "Zoom to Layer": You will see: Ensure that both layers are set to the proper CRS: right click on both layers, select "Set Layer CRS" and select "WGS 84 / UTM Zone 31N": Do this for both layers. If you don't see roads anymore, just right click on the layer, "Zoom to Layer" again. Now it's time that we move the roads to the appropriate place, which is Easting 200000 and Northing 0, as per the data we entered when creating our Mapframe in Terrain Builder. let's compute how much our roads are off, in terms of UTM: Our top left corner UTM coordinates are (see computations above): 4103606.716118635, 633376.3161381673 We need to make them become: 0, 200000 Hence we need to shift the coordinates: X shift: 200000 - 633376.3161381673 = -433376,3161381673 Y shift: 0 - 4103606.716118635 = -4103606,716118635 Bring up the Processing Toolbox with CTRL+ALT+T, and search for the v.transform algorithm. Once it appears, double-click on it, which will bring up the dialog. Enter the shifting values that we just computed: Clic on "Run". This will create a new layer "Transformed". Right-click on this layer, and select "Zoom to Layer". You will see: The black square is our reference-terrain level, so the roads are now in the right position for Terrain Builder. Great! However, you can notice that the roads are slightly rotated in comparison to the reference terrain. We can fix that by applying some rotation. I'm going to choose -1 and apply it with v.tramsform again: This results in roads being rotated but also shifted southwards: Right click on the upper "Transformed" layer and select "Toggle Editing": Now use the Move Tool to move your roads so that they are fully contained in the black area (the reference terrain): Repeat if necessary. When you're done, we can export those roads to be used in Terrain Builder. Right-click in the uppermost "Transformed" layer, and select "Save as:" Export the layer as ESRI Shapefile (ensure that the proper CRS is set, which should be the default): Here I've saved the file as roads_final.shp. We now need to set the appropriates attributes for roads. In the resulting excel-like table, toggle editing mode: Click to create a new field: Create a new numerical field called ID: Now we need to populate this field. Click on "Open field calculator": and fill the data to look like this: The ID field needs to contain the roads reference as specified in your roadslib.cfg file of your terrain project. Basically, we are populating the newly created ID field based on the values contained in the fclass field by using this expression: CASE WHEN fclass is 'primary' THEN 1 WHEN fclass is 'secondary' THEN 2 WHEN fclass is 'tertiary' THEN 3 WHEN fclass is 'residential' THEN 4 WHEN fclass is 'service' THEN 4 ELSE 5 END Click on OK. You ID field will now be properly populated: Now let's remove the unneeded fields. Click on the delete field icon: Select all the fields except the newly created ID: Click OK. Save Edits: Quit the Attributes Table and If prompted, save the layer. PREPARING THE SATELLITE IMAGE Open SAS Planet, and click to enter a selection area by coordinates: Enter the coordinates as exported by Global Mapper: This will bring up the selection manager. Select "Bing Maps - satellite" (or your preferred satellite source) and then click on the first zoom level that has a resolution higher than your terrain size (in this case, you can see that with zoom level of 18 the resulting image size is greater than 10,240 x 10,240): Click on "Start" to download the tiles: Once the process is finished, click to select the last area: Move to the "Stitch" tab: Ensure to select the same Map source (in this case, "Bing Maps - satellite") and level of zoom (here, 18), select where to save your file and click on "Start". This will save your satellite image as a single JPG file. Open up this image in Photoshop (or other editor of choice) and change the size of the satellite image to match the size of your terrain (you will have to un-tick "Constrain Proportions"), in this case 10240: Save your resulting satellite image as a BMP file. Do not save it in other formats, as those might take significantly longer when imported in Terrain Builder (we're talking about hours in comparison to few seconds). IMPORTING EVERYTHING BACK IN TERRAIN BUILDER Back in Terrain Builder, import the newly created satellite image: Now import your roads (roads_final.shp): When prompted, leave unchanged: And there you have it. Enjoy your freshly imported roads: And if you select them and open up the Database Properties: You are going to see the correct road ids: Many thanks to the various tutorial writers that originally helped me, and to W4lly63 for his great support. Best, _SCAR.
  4. All, I've created roads and other shapefiles in QGIS with the purpose of importing them in TB: However, when I "Import > Shapes..." from TB, I see an import dialog (in the worst scenario, TB crashes) but then I don't see my roads. Yes, "View Shapes" is active and as you can see from the image the Easting is 200000 and 0 North (and so is the terrain in TB). ...Any ideas?
  5. Dear all, Until this day, I've added polygons and shapefiles directly in Terrain Builder. This is ok for smaller terrains, but definitely not for the ones I'm doing now. Now, for the past two weeks I've been trying to add OSM data to my terrains. I've followed these two main tutorials: Terrain Processor PMC Editing I appreciate the efforts, but I've tried everything I could and these simply are too incomplete to successfully finalize a map. For instance: In TB maps need to be of a power-of-two size, such as 10240. It is rather unclear how you can ensure that your satellite map is of this size. One solution is to select a square size in Terra Incognita, but then the coordinates you specify will not match exactly the ones of the map that will be downloaded (you can try this yourself, just save a square map selection from Terra Incognita as OziExplorer and then open it up in QGIS: the area will extend the coordinates you first entered). This means that if you use your reference coordinates you entered in Terra Incognita, they will be off for all of your other downloads. All the tutorials specify WSG 84 / UTM Zone 31N, however all of the downloads from Terrra Incognita, OSM and even OpenTopography are in WSG 84. It is far from clear when these conversions should happen, and how. Most of the times I end up having portions of data in completely different areas of QGIS even if they all are in the same Coordinate System, after following instructions. Once you export a reference height-map from Terrain Builder for a 10,240 sized terrain, the coordinates will extend from 200,000 - 210,240E and from 0 - 10,240N. All the tutorial specify to move the roads & other OSM data by switching the WSG to Zone 31N, but the scale is always off. I was able to move the elements but then they covered a tiny little portion of the destination area. When should the scaling happen? One of my areas is in Afghanistan, which is in UTM Zone 42N. Tutorials say you should use this when importing the data, but they also state that in Terrain Builder it MUST be UTM Zone 31N. This is so confusing and it doesn't help understanding what to do. This is such a pity. My best option is still to go ahead and draw 1,000+ roads and 700 polygons for forest areas BY HAND. Doesn't sound like a "best option". Hence: has some kind soul posted somewhere a precise how-to example workflow with screenshots or videos, so that it can be really clear what it must be done, in what order, etc? I'm pretty familiar with terrain building (latest map Kastellorizo is currently #1 on Steam's workshop), would love to contribute more and help back; however, I'd love to have someone finally dissolve clearly what is a good WORKFLOW to make all of this happen seamlessly. ....Pretty please? :) _SCAR.
×