Osm2city.py: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
[[File:LOWI with OSM buildings.jpg|thumb|LOWI with OSM buildings]] | [[File:LOWI with OSM buildings.jpg|thumb|LOWI with OSM buildings]] | ||
== 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. | |||
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. | ||
* Please use the forum thread [http://forum.flightgear.org/viewtopic.php?f=5&t=22809 osm2city.py development] for discussion and support. | |||
* Documentation regarding installation and usage can be found on [http://osm2city.readthedocs.io/en/latest/index.html osm2citiy's Read The Docs site]. | |||
* 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 == | == Features == | ||
Line 100: | Line 48: | ||
:* place shared models along roads if no OSM data available {{not done}} | :* 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}} | * long-term: integrate into FG to do all this on the fly. {{not done}} | ||
== Contributing == | == Contributing == | ||
You know some Python? Or you're keen on writing docs? Contact the team on the FG forum. | You know some Python? Or you're keen on writing docs? Contact the team on the FG forum. | ||
None of the above? Take [[Howto:Create_textures_from_photos|pictures]] of buildings where you live and [[Osm2city.py Textures|create textures]]! | None of the above? Take [[Howto:Create_textures_from_photos|pictures]] of buildings where you live and [[Osm2city.py Textures|create textures]]! We are especially interested in south-east Asian style architecture, as a future default airport for FlightGear might be Hong Kong Kai Tak (VHXX). | ||
== Related content == | == Related content == | ||
=== Wiki articles === | === Wiki articles === | ||
* [[Areas populated with osm2city scenery]] | * [[Areas populated with osm2city scenery]] | ||
=== Forum topics === | === Forum topics === | ||
Line 183: | Line 63: | ||
* [http://forum.flightgear.org/viewtopic.php?f=38&t=8837 <nowiki>[</nowiki>Proposal<nowiki>]</nowiki> Autogen Cities using PixelCity] | * [http://forum.flightgear.org/viewtopic.php?f=38&t=8837 <nowiki>[</nowiki>Proposal<nowiki>]</nowiki> Autogen Cities using PixelCity] | ||
* [http://forum.flightgear.org/viewtopic.php?f=5&t=17598 Procedural buildings in OSM before part of Scenery] | * [http://forum.flightgear.org/viewtopic.php?f=5&t=17598 Procedural buildings in OSM before part of Scenery] | ||
[[Category:Scenery software]] | [[Category:Scenery software]] |
Revision as of 07:23, 18 February 2017
Started in | 11/2013 |
---|---|
Description | Improved autogen support for FlightGear using OSM data |
Contributor(s) | radi, vanosten, Soitanen, portreekid |
Status | Under active development as of 02/2016 |
Topic branches: | |
$FG_SRC | https://gitlab.com/osm2city/osm2city/ |
fgdata | https://gitlab.com/osm2city/osm2city-data/ |
OpenStreetMap use in FlightGear |
---|
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.
- The development repository is hosted on gitlab.
- Please use the forum thread osm2city.py development for discussion and support.
- Documentation regarding installation and usage can be found on osm2citiy's Read The Docs site.
- 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
- reads buildings from OSM. Honors height and level tags, reads relations ('buildings with holes')
- 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
- simplify/automate elevation probing by using fgelev
- LOD animation based on building height and area (see below)
- cluster a number of buildings into a single .ac files. Clusters overlap to alleviate sharp LOD borders
- complex sloped roof generation (using Olivier Teboul's implementation of the straight skeleton algorithm)
- texture manager: DB of facade/roof textures
- ~10 different, hi-res facade textures, some roof textures
- 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
(in random order)
- more complex facade generation. Currently, all sides get same texture Not done
- Rembrandt lighting Not done
- put a piece of matching ground texture around buildings ('garden')
- put shared models if/where OSM indicates so: gas stations... Not done
- geometry cleanup, simplify too complex buildings Done
- use residential/industrial/commercial tags/areas. ATM, all is residential. Not done
- 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
- mid-term: develop this into a city-engine that procedurally generates a city based on OSM roads. Not done
Contributing
You know some Python? Or you're keen on writing docs? Contact the team on the FG forum. None of the above? Take pictures of buildings where you live and create textures! We are especially interested in south-east Asian style architecture, as a future default airport for FlightGear might be Hong Kong Kai Tak (VHXX).