User Tools

Site Tools


arma3:terrain:road-shapefiles-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
arma3:terrain:road-shapefiles-real-world-data [2017-03-12 19:05]
snakeman added note about v.transform process.
arma3:terrain:road-shapefiles-real-world-data [2019-01-28 18:46] (current)
snakeman added juarez road reduction crash details.
Line 15: Line 15:
  
 OSM includes roads but also many other features, they even have buildings and vegetation areas. Although no idea how to use the building information with terrain builder or other tools. OSM includes roads but also many other features, they even have buildings and vegetation areas. Although no idea how to use the building information with terrain builder or other tools.
 +
 +If you cannot find country from geofabrik, try [[http://​extract.bbbike.org/​|extract.bbbike.org]] instead.
  
  
Line 21: Line 23:
 **OSM Roads Using Global Mapper and QGIS** **OSM Roads Using Global Mapper and QGIS**
  
-Yes unfortunately at our current knowledge level we need BOTH of these software'​s to achieve OSM roads in terrain builder. If you know how to do this alone in either software please [[:​contact|contact us]]. :(+We need BOTH of these software'​s to achieve OSM roads in terrain builder ​because global mapper v18 does not shift road shapefiles properly (v15 does apparently). If you know how to do this alone in either software please [[:​contact|contact us]]. :(
  
 //You cannot replace OSM road features with arma3 ID/ORDER before you transform them! If you do, QGIS will fail the v.transform process.// //You cannot replace OSM road features with arma3 ID/ORDER before you transform them! If you do, QGIS will fail the v.transform process.//
Line 37: Line 39:
   - enable "​generate projection (prj) file for each exported shp file, untick rest, click ok   - enable "​generate projection (prj) file for each exported shp file, untick rest, click ok
  
-**DOES NOT WORK!:**+**DOES NOT WORK IN V18!:**
   - file -> unload all (CTRL-U)   - file -> unload all (CTRL-U)
   - open data files -> select the shp file you just exported   - open data files -> select the shp file you just exported
Line 44: Line 46:
   - specify offset dialog insert the X/longitude and Y/latitude values matching to your terrain coordinates (see below), click ok   - specify offset dialog insert the X/longitude and Y/latitude values matching to your terrain coordinates (see below), click ok
  
-What does not work? Well the coordinates jump to some crazy large number 3999999999999900 something like that, I have no idea why and what I do wrong in that part. Read below how to transform roads in QGIS instead.+What does not work in v18? Well the coordinates jump to some crazy large number 3999999999999900 something like that, I have no idea why and what I do wrong in that part. Read below how to transform roads in QGIS instead ​(or use older global mapper like v15 which should work).
  
 **QGIS Transform:​** **QGIS Transform:​**
Line 57: Line 59:
   - select transformed layer, RMB -> zoom to layer, now you see roads aligning perfectly with your heightmap, congrats!   - select transformed layer, RMB -> zoom to layer, now you see roads aligning perfectly with your heightmap, congrats!
   - transformed layer RMB -> save as -> browse, this is your final road shape file name to be used in terrain builder, click ok   - transformed layer RMB -> save as -> browse, this is your final road shape file name to be used in terrain builder, click ok
 +
 +**Global Mapper ID / ORDER**
 +
 +  - Fix shapefile attributes for ID and ORDER with [[arma3:​terrain:​road-shapefiles-real-world-data#​id_and_order]] tutorial.
 +
 All done! :-) All done! :-)
  
 Enjoy your real world data openstreetmap roads in terrain builder :-) Enjoy your real world data openstreetmap roads in terrain builder :-)
  
-{{ http://​pmc.editing.wiki/​images/​Terrain-Builder-Global-Mapper-QGIS-Shapefile-Roads.png }}+{{ https://​pmc.editing.wiki/​images/​Terrain-Builder-Global-Mapper-QGIS-Shapefile-Roads.png }}
  
  
Line 92: Line 99:
  
 ====== Remove "​Bad"​ Roads ====== ====== Remove "​Bad"​ Roads ======
 +
 +ArmA 3 crashes if you have more than roughly 9000 roads / features in the roads.shp shapefile. This is not precise number as it also depends on your other terrain properties, highest we have had in-game is 9,198 and lowest that caused crash was 4,941 so its not exact science. This is only issue for those large terrains or well, terrains that have large number of roads in the shapefile.
 +
 +Note: for example plain deserts (heightmap) of iraq easily allows OSM road features of 9000 but the rugged mountains (heightmap) of afghanistan crashes for less then 5000. So use your own judgement with all these gazillion variables when you track down the amount of roads your terrain can handle.
 +
 +Mexico juarez 81km terrain had 7469 road features which caused virtual blocks crash. After global mapper 6m combine 4056 it still crashed. Finally after I cleanly reduced the features by deleting FCLASS roads to number I didn't write down (damn) and then 6m combine down to 1139 the crash was avoided.
  
 OSM shapefiles come with all kinds of backyard "​path"​ roads etc, you might want if not have to remove some of these. OSM shapefiles come with all kinds of backyard "​path"​ roads etc, you might want if not have to remove some of these.
Line 107: Line 120:
 Now you can click select all and delete selected buttons to delete all these search matches. Now you can click select all and delete selected buttons to delete all these search matches.
  
-You can search more by just typing ​in new search ​string ​to compare value field and clicking new search ​button.+Move the search vector data window away from normal global mapper view and orient the road features so you can see them. For those pimps with triple screen setup this is awesome but its doable even with single screen. 
 + 
 +You can see the selected roads highlighed ​in yellow. 
 + 
 +While you click to delete roads, monitor the cropped_roads layer for feature count, once it reached 9000 or below you can stop because that is the rough limit arma3 crashes. 
 + 
 +Once you have searched roads, you can search ​to return all roads, because every search ​is only searching what is listed currently. 
 + 
 +Check the FCLASS or type, sort it and browse to see all listed there. Sometimes there are really odd types like "​yes"​.
  
 Once you're done with deleting "​bad"​ roads, simply export your roads by file -> export -> export vector/​lidar format, as usual. Once you're done with deleting "​bad"​ roads, simply export your roads by file -> export -> export vector/​lidar format, as usual.
 +
 +**ArmA 3 Specific Roads Deletion**
 +
 +Delete these roads as they are mostly too excessive for arma3 terrains:
 +<​code>​
 +bridleway
 +steps
 +foot*
 +cycle*
 +path
 +pedestrian
 +track_grade*
 +*link*
 +living_street
 +service
 +unknown
 +unclassified
 +residential
 +tertiary
 +track
 +secondary
 +</​code>​
 +track* takes too many roads from ukraine luhansk, from 17k to 380 heh.
 +
 +tertiary has lot of country roads in ukraine.
 +
 +residential has those nice city roads, depends on your terrain if you need to delete these.
 +
 +Anything below 9000 OSM features in roads.shp should work in arma3.
 +
 +List of important features for arma3 gameplay:
 +<​code>​
 +motorway
 +trunk
 +primary
 +</​code>​
  
  
 ====== Simplify Road Shapefiles ====== ====== Simplify Road Shapefiles ======
  
-Most likely your OSM downloaded road shapefiles are too complex for terrain builder ​/ arma3, so you need to simplify them. Meaning there are way too many vertices in the polylines which can be reduced.+**Simplify Road Polylines** 
 + 
 +Most likely your OSM downloaded road shapefiles are too complex for terrain builder, so you //​might// ​need to simplify them. Meaning there are way too many vertices in the polylines which can be reduced. **Note 2018-03-02 update:** arma3 loads any OSM poly line shape file just fine, there is no need to simplify for arma3'​s sake, PMC has done hundred terrains with various size and quality OSM road poly lines and all of them have been working great.
  
 If you import too complex or "​large"​ road shapefiles to terrain builder it will start to stutter and freezes up. If you import too complex or "​large"​ road shapefiles to terrain builder it will start to stutter and freezes up.
Line 121: Line 180:
  
 From enter simplification threshold dialog, use horizontal threshold 10 and vertical threshold elevation (meters) 0.2 for good results. From enter simplification threshold dialog, use horizontal threshold 10 and vertical threshold elevation (meters) 0.2 for good results.
 +
 +
 +====== Combine Road Features ======
 +
 +USA Los Angels 40km terrain openstreetmap.org road polylines even after "bad roads" reduction were over 17,000 features which is like ten thousand over the limit. They need to be reduced. Please note that this was some very odd issue on these specific OSM shapes because normal roads / streets were split up to hundreds of small features when it should have been one feature.
 +
 +I have not experienced such splitting up of polylines in other terrains in this scale.
 +
 +Select all roads -> RMB in the viewport -> crop/​combine/​split functions -> combine. Then use about 6 meter value, should work fine (we used also 20m but that might be too large). In select combine options menu let it be default (combine any overlapping and everything else ticked).
  
  
arma3/terrain/road-shapefiles-real-world-data.1489345519.txt.gz · Last modified: 2017-03-12 19:05 by snakeman