OpenStreetMap buildings: Difference between revisions
Jump to navigation
Jump to search
(Links to script repo) |
(Gable roofs image) |
||
Line 2: | Line 2: | ||
[[File:Gatewing X100 TU Delft 2.png|thumb|270px|OSM generated buildings and roads.]] | [[File:Gatewing X100 TU Delft 2.png|thumb|270px|OSM generated buildings and roads.]] | ||
[[File:Delft OpenStreetMap buildings with roof textures.png|thumb|270px|Houses with gamble roofs.]] | |||
Buildings can be mapped in [[OpenStreetMap]]. Their shapes can be turned into 3D models for use in [[FlightGear]] scenery. | Buildings can be mapped in [[OpenStreetMap]]. Their shapes can be turned into 3D models for use in [[FlightGear]] scenery. | ||
Revision as of 21:22, 7 April 2012
Work in progress This article or section will be worked on in the upcoming hours or days. See history for the latest developments. |
Buildings can be mapped in OpenStreetMap. Their shapes can be turned into 3D models for use in FlightGear scenery.
Tools
A perl script is being written to turn the OSM data into 3D models. It is available at https://gitorious.org/fgscenery/tools.
Note for Windows
Windows does not contain perl by default. You're advised to install Strawberry Perl for Windows. It is a simple installer; no need to dig into your system.
Cygwin is also advised, so "grep" can be used to get a list of building ids easily.
A single building
- Find the building in OpenStreetMap.
- Enable the "Data" overlay.
- Choose a manual area and drag a box around your building.
- Click your building, the way id will be shown. Copy this id.
- Run the following code, replacing 44338398 with your building's id:
perl bob.pl -w 44338398
- Next to this basic code, there are several options, to be added behind the basic code.
- Lat/lon location of the model's origin:
-lat 52.00141 -lon 4.36966
- Object name (not the .ac name!):
-n "Empire State Building"
- Building height (in meters):
-h 15
- Note: buildings are always sunk 5 m into the ground, in order to account for non-flat terrain.
- Create a xml file with a standard range animation:
-x
- Next to this basic code, there are several options, to be added behind the basic code.
All buildings in an area
- Download a file with all data from the area, by visiting the following link and save it somewhere on your computer. This will only include buildings (building=yes) within the specified bounding box.
http://overpass-api.de/api/xapi?way[bbox=left,bottom,right,top][building=*][@meta]
http://overpass-api.de/api/xapi?way[bbox=-74.02037,40.69704,-73.96922,40.73971][building=*][@meta]
- Get a list of wayids via
grep "<way" map.osm|cut -f2 -d\">file.txt
- Run
perl bob.pl -w $object -f map.osm
on all the ids.
External links
- Building attributes (OSM wiki)
- Roof type Library (OSM wiki)