arma3:terrain:road-shapefiles-real-world-data
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
arma3:terrain:road-shapefiles-real-world-data [2017/03/06 10:32] – added more road shapefile info. snakeman | arma3:terrain:road-shapefiles-real-world-data [2024/08/02 19:07] (current) – links added. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Road Shapefiles from Real World Data ====== | + | ====== |
+ | |||
+ | [[https:// | ||
**How to use real world data road shapefiles from OpenStreetMap (OSM) in ArmA 3**. | **How to use real world data road shapefiles from OpenStreetMap (OSM) in ArmA 3**. | ||
Line 15: | Line 17: | ||
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:// | ||
Line 21: | Line 25: | ||
**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 softwares | + | We need BOTH of these software' |
+ | |||
+ | //You cannot replace OSM road features with arma3 ID/ORDER before you transform them! If you do, QGIS will fail the v.transform process.// | ||
- download road shapefiles from geofabrik as SHP (shapefiles) files for your terrain country(s) | - download road shapefiles from geofabrik as SHP (shapefiles) files for your terrain country(s) | ||
Line 28: | Line 34: | ||
- select digitizer tool (ALT-D) and select / hightlight user created feature grid | - select digitizer tool (ALT-D) and select / hightlight user created feature grid | ||
- RMB grid -> crop/ | - RMB grid -> crop/ | ||
- | - setup dialog choose feature layer -> user created features, click ok | + | - setup dialog choose feature layer -> <create new layer for feature>, click ok |
- | - hide osm road shapefile layer, now you see road shapes inside | + | - give name to your layer, good name would be cropped_roads for example, on layer projection dialog |
+ | - hide osm road shapefile layer, now you see road shapes inside | ||
- file -> export -> export vector/ | - file -> export -> export vector/ | ||
- shapefile export options -> export lines / select file -> give filename click save | - shapefile export options -> export lines / select file -> give filename click save | ||
- enable " | - enable " | ||
- | **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 41: | Line 48: | ||
- 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 |
**QGIS Transform: | **QGIS Transform: | ||
- | - open your heightmap in UTM 31N, this is just for visual reference. add raster layer -> choose your asc file | + | - open your heightmap in UTM 31N, this is just for visual reference. add raster layer -> choose your asc file. this needs to be set to UTM zone 31N. |
- add vector layer -> browse, choose your global mapper cropped and exported road shapefile, click open | - add vector layer -> browse, choose your global mapper cropped and exported road shapefile, click open | ||
- RMB roads layer -> set layer CRS -> choose WGS 84 / UTM zone 31N, click ok | - RMB roads layer -> set layer CRS -> choose WGS 84 / UTM zone 31N, click ok | ||
Line 54: | Line 61: | ||
- 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: | ||
+ | |||
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:// | + | {{ https:// |
Line 89: | Line 101: | ||
====== Remove " | ====== Remove " | ||
+ | |||
+ | 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 " | OSM shapefiles come with all kinds of backyard " | ||
Line 104: | Line 122: | ||
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 | + | 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 | ||
+ | |||
+ | 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 | ||
+ | |||
+ | Check the FCLASS or type, sort it and browse to see all listed there. Sometimes there are really odd types like " | ||
Once you're done with deleting " | Once you're done with deleting " | ||
+ | |||
+ | **ArmA 3 Specific Roads Deletion** | ||
+ | |||
+ | Delete these roads as they are mostly too excessive for arma3 terrains: | ||
+ | < | ||
+ | bridleway | ||
+ | steps | ||
+ | foot* | ||
+ | cycle* | ||
+ | path | ||
+ | pedestrian | ||
+ | track_grade* | ||
+ | *link* | ||
+ | living_street | ||
+ | service | ||
+ | unknown | ||
+ | unclassified | ||
+ | residential | ||
+ | tertiary | ||
+ | track | ||
+ | secondary | ||
+ | </ | ||
+ | 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: | ||
+ | < | ||
+ | motorway | ||
+ | trunk | ||
+ | primary | ||
+ | </ | ||
====== Simplify Road Shapefiles ====== | ====== Simplify Road Shapefiles ====== | ||
- | Most likely your OSM downloaded road shapefiles are too complex for terrain builder | + | **Simplify Road Polylines** |
+ | |||
+ | Most likely your OSM downloaded road shapefiles are too complex for terrain builder, so you // | ||
If you import too complex or " | If you import too complex or " | ||
Line 118: | Line 182: | ||
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/ | ||
Line 165: | Line 238: | ||
[[http:// | [[http:// | ||
[[http:// | [[http:// | ||
+ |
arma3/terrain/road-shapefiles-real-world-data.1488796377.txt.gz · Last modified: 2017/03/06 10:32 by snakeman