Osm2city.py: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (+ Template:Lowercase title)
(Add note linking OSM2City download page (searching 'OSM2City' redirects here). Add 2 modern screenshots.)
Line 1: Line 1:
{{lowercase title}}{{note|To use osm2city, you need to download both the {{gitlab source|user=osm2city|repo=osm2city|text=development repository}} and the {{gitlab source|user=osm2city|repo=osm2city-data|text=texture data}} from GitLab.}}
{{lowercase title}}{{note|To use osm2city, you need to download both the {{gitlab source|user=osm2city|repo=osm2city|text=development repository}} and the {{gitlab source|user=osm2city|repo=osm2city-data|text=texture data}} from GitLab.}}
{{note|Please use the {{forum link|t=22809|title=osm2city.py development}} for discussion and support.}}
{{note|Please use the {{forum link|t=22809|title=osm2city.py development}} for discussion and support.}}
{{note|To download OSM2City output for some regions and countries see ''[[Areas_populated_with_osm2city_scenery|Areas populated with OSM2City scenery]]''.}}
{{OSM Navigation}}
{{OSM Navigation}}


Line 32: Line 33:


== Screenshots ==
== Screenshots ==
''See the [[:Category:Screenshots_of_scenery_with_OSM2City_output|Screenshots with OSM2City output]] for high-ish settings screenshots of OSM2City version 2017.2 and later.''
=== v2017.2 ===
[[File:SOTM-Mar19.jpg|thumb|left|800px|Madrid, Spain]]
[[File:Barcelona,_Spain_with_LEBL_visible_towards_top_right_quadrant_(Flightgear_2017.x).jpg|thumb|left|800px|Barcelona, Spain with road lighting visible]]
<div style="clear:both;"></div>
=== Older ===
[[File:LOWI with OSM buildings.jpg|thumb|800px|left|LOWI with OSM buildings]]
[[File:LOWI with OSM buildings.jpg|thumb|800px|left|LOWI with OSM buildings]]



Revision as of 09:20, 3 September 2020

Note  To use osm2city, you need to download both the development repository and the texture data from GitLab.
Note  Please use the osm2city.py development topic on the forum This is a link to the FlightGear forum. for discussion and support.
Note  To download OSM2City output for some regions and countries see Areas populated with OSM2City scenery.
Autogen Scenery
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/


osm2city is a set of procedural programs, which create plausible FlightGear scenery objects (buildings, roads, power lines, piers, platforms etc.) based on OpenStreetMap This is a link to a Wikipedia article (OSM) data.

  • 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.

Programs and feature areas

osm2city contains the following programs to generate scenery objects based on OSM data:

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).
roads.py
Generates different types of roads and railways incl. texturing and automatically calculated bridges.
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.
piers.py
Generates piers and boats.
platforms.py
Generates railway platforms.

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).

Issues and feature requests

Please register issues and feature requests in the repository as issues and label them accordingly.

Screenshots

See the Screenshots with OSM2City output for high-ish settings screenshots of OSM2City version 2017.2 and later.

v2017.2

Madrid, Spain
Barcelona, Spain with road lighting visible

Older

LOWI with OSM buildings
Example of piers.py output
osm2city placed wind turbines at Rød Sand 2 in Denmark.
osm2city generated pylons with cables, street with bridge over railway with overhead cables.
osm2city generated buildings and roads with light effects at night


Related content

Documentation

Wiki articles

Forum topics

Source code