Table of Contents
How to Extract 3D Models from OpenStreetMaps?
Sometimes it is necessary and useful to extract 3D models such as building from Google Earth, Google Maps, or even better: OpenStreetMaps. It is possible to draw buildings manually, but it will take a lot of time, especially if you are trying to model a part of a city which have an excessive number of buildings. So, with the help a few simple tools, you can save a lot of time while getting satisfying and neat results.
However, Google's 3D data is proprietary and computer generated. So, ripping 3D data from Google is kind of a hack and the results are generally messy. Also, tools that extract 3D models only work in the Windows environment. On the other hand, OpenStreetMap is built by community, open data and it stores the accurate 3D data as Google does. Since OpenStreetMap's data is free to use and tools that process the data works on different operating systems, it more convenient to use OpenStreetMap instead of the Google Earth/Maps. In addition, results from OpenStreetMap is cleaner and more organized. — Barkin Simsek 2017/11/26 15:15
Here are the three easy steps:
1) Export a .map file from OpenStreetMap
OpenStreetMap provides a simple web interface where you can search for specific places and view the map:
For this example, I will focus on the city of São Paulo in Brazil. You can focus on the desired area by using the search bar or moving manually around the map, like in Google Earth/Maps:
After you are focused on the desired area, just click the green “Export” button at the top of the page. Before exporting the .map file, make sure that the desired area is completely in the export region:
Then click on the blue “Export” button to download the .map file. If you get an error like shown below, try to resize and move the map a little bit and try to export again. Sometimes, this error is caused by trying to download too many buildings at a time.
2) Convert the OpenStreetMap .map file to an OBJ model with OSM2World
OSM2World is a free Java program for converting OpenStreetMap data into 3D models.
After exporting the .map file from www.openstreetmap.org please download the latest build of OSM2World software from here (“OSM2World-latest-bin.zip” file). Unzip the downloaded file and you will see a bunch of different files in the exported folder:
You should run “OSM2World.jar” file in order to run the program. If you get an error while you try to run the program, please read the note below the article.
If you succeed to run the program, you will a black screen like this:
Open the .map file in the OSM2World software with File > Open and you will see the 3D model in the program. You can zoom in/out and play with it in the OSM2World software:
Finally, export the whole 3D design from the program via File > Export OBJ File
3) Import the OBJ model into your favorite 3D modeling application and delete extraneous geometry
Open your favorite 3D modeling application and import the OBJ file and that's it!
Autodesk Fusion 360
Or Adobe Photoshop
Or any other application you like!
After importing the OBJ file into the 3D modeling application and cleaning the unnecessary geometry, you can 3D print the city, create an animation based on the city model, or do anything that involves in the 3D city model.
Note: For this tutorial, please make sure that your computer (yes, you need to be using a computer instead of a smartphone, tablet, etc.) have Java Runtime Environment in version 1.6 or higher. It is necessary to run the OSM2World software.
If your computer doesn't have Java, here are the instructions to install Java
For Windows: https://java.com/en/download/help/windows_manual_download.xml
For Mac: https://java.com/en/download/help/mac_install.xml
For Linux: https://java.com/en/download/help/linux_install.xml
Original source for the tutorial: https://www.reddit.com/r/CitiesSkylinesModding/comments/46qw3m/tutorial_on_how_to_extract_3d_models_from_google/