Osm2city.py: Difference between revisions

Jump to navigation Jump to search
706 bytes removed ,  18 February 2017
no edit summary
No edit summary
No edit summary
Line 3: Line 3:


== Overview ==
== Overview ==
osm2city is a set of procedural programs, which create plausible FlightGear scenery objects (buildings, roads, power lines, piers, platforms etc.) based on OpenStreetMap (OSM) data.
''osm2city'' is a set of procedural programs, which create plausible FlightGear scenery objects (buildings, roads, power lines, piers, platforms etc.) based on OpenStreetMap (OSM) data.


* The development [https://gitlab.com/fg-radi/osm2city repository] is hosted on gitlab.
* The development [https://gitlab.com/fg-radi/osm2city repository] is hosted on gitlab.
Line 10: Line 10:
* Written in Python 3.5, developed on Linux. It should also run on Windows and Mac OSX, however most testing is done on Linux.
* Written in Python 3.5, developed on Linux. It should also run on Windows and Mac OSX, however most testing is done on Linux.


== Features ==
== Programs and Feature Areas ==
* reads buildings from OSM. Honors height and level tags, reads relations ('buildings with holes')
''osm2city'' contains the following programs to generate scenery objects based on OSM data:
* reads existing .stg, won't place OSM building if there's a static model nearby
 
* reads pre-calculated terrain elevation: places buildings at correct elevation
* '''buildings.py''': generates buildings honoring OSM height and level tags as well as reads relations ('buildings with holes'). Includes lightmaps, complex sloped roofs (using Olivier Teboul's implementation of the straight skeleton algorithm), obstruction lights on tall buildings. Texturing of roofs and facades based on a texture manager, which find matching texture for given building (number of levels, modern/old building, etc).
* simplify/automate elevation probing by using fgelev
* '''roads.py''': generates different types of roads and railways incl. texturing and automatically calculated bridges.
* LOD animation based on building height and area (see below)
* '''pylons.py''': generates pylons and cables between them for power lines, aerial ways, railway overhead lines as well as street-lamps, wind turbines and storage tanks.
* cluster a number of buildings into a single .ac files. Clusters overlap to alleviate sharp LOD borders
* '''piers.py''': generates piers and boats.
* complex sloped roof generation (using Olivier Teboul's implementation of the straight skeleton algorithm)
* '''platforms.py''': generates railway platforms.
* texture manager: DB of facade/roof textures
 
:* ~10 different, hi-res facade textures, some roof textures
All generated objects are added as static or shared objects to FlightGear scenery with correct elevation read on the fly from existing FlightGear scenery. Tagging and topology in OSM are respected as far as possible and complemented with some heuristics (given the developer team's origin mostly inspired by how stuff looks in Europe).
:* find matching texture for given building (number of levels, modern/old building, etc)
:* find matching roof texture for given facade texture
* basic lightmap support
* obstruction lights on tall buildings
* command line interface and parameters file (thanks to forum user vanosten)
* shows statistics on processed buildings
* writes .ac, .xml, .stg


== Planned Features ==
== Planned Features ==
(in random order)
(in random order)
* more complex facade generation. Currently, all sides get same texture  {{not done}}
* Rembrandt lighting
* Rembrandt lighting {{not done}}
* put a piece of matching ground texture around buildings ('garden')
* put a piece of matching ground texture around buildings ('garden') {{progressbar|10}}
* put shared models if/where OSM indicates so: gas stations...
* put shared models if/where OSM indicates so: gas stations... {{not done}}
* place buildings at plausible places in areas, where OSM coverage is low
* geometry cleanup, simplify too complex buildings {{done}}
* use region specific models for detached and row houses
* use residential/industrial/commercial tags/areas. ATM, all is residential. {{not done}}
* performance improvements for generation and usage
* geometry cleanup, simplify too complex buildings {{done}}
* Batch processing of greater areas including downloads {{done}}
* use more LOD levels, write them to different .ac so users can easily reduce building density, therefore improve performance {{progressbar|50}}
:* put large buildings into one ac, sort/rate buildings by stand-out-ness {{done}}
:* then ship light/med/full .stg {{not done}}
* mid-term: develop this into a city-engine that procedurally generates a city based on OSM roads. {{not done}}
:* read, drape, texture roads and railways {{progressbar|70}}
:* texture road intersections  {{not done}}
:* illuminate roads {{not done}}
:* procedural bridges  {{progressbar|50}}
:* place shared models along roads if no OSM data available {{not done}}
* long-term: integrate into FG to do all this on the fly. {{not done}}


== Contributing ==
== Contributing ==
648

edits

Navigation menu