This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
HowTo: Create scenes from OpenStreetMap
Jorge Martínez edited this page Sep 20, 2019
·
3 revisions
- Go to www.openstreetmap.org
- Search for the desired place (e.g. Heidelberg)
- Select Export (green top button)
- Select Manually select a different area and define the region of interest
- Select Export (blue button below the region's coordinates)
- A file named map.osm will be downloaded in your computer
- Go to osm2world.org and download the latest build
Alternatively, get the last version from the github repository - Run the executable (
java -jar OSM2World.jar
)
Then select File > Open OSM File and once loaded File > Export OBJ File
Alternatively, use the following command:
java -jar OSM2World.jar -i map.osm -o map.obj
This will generate the 3D model files map.obj and map.obj.mtl
Note that OSM data lacks elevation data, so that the generated terrain will be flat. However, it is possible to use elevation data from the Shuttle Radar Topography Mission (SRTM) (see wiki.openstreetmap.org/wiki/SRTM). The process is as follows:
- Create a OSM2World configuration file name config.properties with the following content:
srtmDir = SRTM
- Create a folder named SRTM in the OSM2World root folder
- Run OSM2World using the configuration:
java -jar OSM2World.jar -i map.osm -o map.obj --config config.properties
This will display a message indicating what STRM files are needed:
warning: missing SRTM tile N49E008.hgt
- Download the missing SRTM files into the SRTM folder.
Recommended source: SRTMGL1 from USGS EROS Center (requires account) - Rerun OSM2World:
java -jar OSM2World.jar -i map.osm -o map.obj --config config.properties