OpenStreetMap buildings: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Created page with "{{WIP}} thumb|270px|OSM generated buildings and roads. Buildings can be mapped in OpenStreetMap. Their shapes can be turned into 3D mod...")
 
mNo edit summary
Line 23: Line 23:
:::: <code>-h 15</code>
:::: <code>-h 15</code>
:::: '''Note:''' buildings are always sunk 5 m into the ground, in order to account for non-flat terrain.
:::: '''Note:''' buildings are always sunk 5 m into the ground, in order to account for non-flat terrain.
== All buildings in an area ==
# Download a file with all data from the area, by visiting the following link:
#: <code><nowiki>http://api.openstreetmap.org/api/0.6/map?bbox=left,bottom,right,top</nowiki></code>
#: <code><nowiki>http://api.openstreetmap.org/api/0.6/map?bbox=-74.02037,40.69704,-73.96922,40.73971</nowiki></code>
# Filter out the buildings, by filtering for <code><tag k="building" v="yes"/></code>.


[[Category:Scenery enhancement]]
[[Category:Scenery enhancement]]

Revision as of 18:49, 16 March 2012

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.
OSM generated buildings and roads.

Buildings can be mapped in OpenStreetMap. Their shapes can be turned into 3D models for use in FlightGear scenery.

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.

A single building

  1. Find the building in OpenStreetMap.
  2. Enable the "Data" overlay.
  3. Choose a manual area and drag a box around your building.
  4. Click your building, the way id will be shown. Copy this id.
  5. 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 "Empite 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.

All buildings in an area

  1. Download a file with all data from the area, by visiting the following link:
    http://api.openstreetmap.org/api/0.6/map?bbox=left,bottom,right,top
    http://api.openstreetmap.org/api/0.6/map?bbox=-74.02037,40.69704,-73.96922,40.73971
  2. Filter out the buildings, by filtering for <tag k="building" v="yes"/>.