Board index FlightGear Development Scenery

osm2city.py development

Questions and discussion about enhancing and populating the FlightGear world.

Re: osm2city.py development

Postby powoflight » Mon Apr 15, 2019 8:54 am

I have committed a simplified version of your fix. Please test.


Perfect. Vanosten. It works .

Bernhard
powoflight
 
Posts: 212
Joined: Fri Mar 25, 2016 11:04 am
Location: LOWW
Callsign: OE-POW
Version: 2020.4
OS: win7 Ubuntu 18.04

Subway stations below the ground visible

Postby powoflight » Fri May 10, 2019 10:27 am

Dear Vanosten

In Vienna, all underground stations are generated as buildings.
They are usually under the streets.

Image

In JOSM they are represented as level -1.
Image

JOSM only Level -1 visible
Image

They are not present in F4map.
Image

I tried to remove the "buildings" with Skip. However, they will be back with
add way outer multiple 416128112
add way outer multiple 416145146
Added 4 buildings based on relations.

Code: Select all
SpawnPoolWorker-1 root INFO     Reading OSM relation data for buildings from db took 0.0294 seconds.
SpawnPoolWorker-1 root INFO     Time used in seconds for classifying nodes: 0.001710
SpawnPoolWorker-1 root INFO     Found 16 buildings out of 20 buildings with nodes to rectify
SpawnPoolWorker-1 root INFO     Time used in seconds for rectifying nodes: 0.001224
SpawnPoolWorker-1 root INFO     Number of changes for rectified nodes created: 137
SpawnPoolWorker-1 root INFO     Time used in seconds for updating lon/lat: 0.000246
SpawnPoolWorker-1 root DEBUG    SKIPPING building with osm_id=416128112
SpawnPoolWorker-1 root DEBUG    SKIPPING building with osm_id=416145146
SpawnPoolWorker-1 root INFO     Time used in seconds for processing OSM buildings: 0.002368
SpawnPoolWorker-1 root DEBUG    add way outer 103504689
SpawnPoolWorker-1 root DEBUG    add way inner 103504670
SpawnPoolWorker-1 root DEBUG    add way outer 121281339
SpawnPoolWorker-1 root DEBUG    add way outer multiple 416128112
SpawnPoolWorker-1 root DEBUG    add way outer multiple 416128137
SpawnPoolWorker-1 root DEBUG    add way outer multiple 416145146
SpawnPoolWorker-1 root DEBUG    add way outer multiple 416145155
SpawnPoolWorker-1 root INFO     Added 4 buildings based on relations.
SpawnPoolWorker-1 root INFO     Time used in seconds for processing OSM relations: 0.006392
SpawnPoolWorker-1 root INFO     Removed 0 building:parts, which are not needed due to area etc.
SpawnPoolWorker-1 root INFO     Remodelled 0 building:parts to buildings due to missing parent
SpawnPoolWorker-1 root INFO     Tested 2 building:parts
SpawnPoolWorker-1 root INFO     Handled 0 building_parents and removed 0 original buildings
SpawnPoolWorker-1 root INFO     Time used in seconds for processing building parts: 0.000202


Maybe osm2city can recognize these buildings through the level -1 in OSM and will be not create?
This would maybe the best way because there are many Undergroud Stations in Vienna.

Maybe that happens in other cities too? Unfortunately, I have no local experience for other cities.

Code: Select all
PREFIX = 'reichsbrucke'
PATH_TO_SCENERY = '/mnt/D_SSD_1TB/FG/SC/SC_HD'
PATH_TO_OUTPUT = '/mnt/D_HD/VMOrdner/OSM/A_NEW_TEST_2019/reichsbrucke'
PATH_TO_OSM2CITY_DATA = '/home/bernhard/easy-osm2city/osm2city-data'

NO_ELEV = False
FG_ELEV = '/usr/games/fgelev'

DB_HOST = 'localhost'
DB_PORT = '5432'
DB_NAME = 'wien'
DB_USER = 'gisuser'
DB_USER_PASSWORD = 'bernhard'

POINTS_ON_LINE_DISTANCE_MAX = 20
HIGHWAY_TYPE_MIN = 3
BUILDING_FORCE_EUROPEAN_INNER_CITY_STYLE = True

TEXTURES_REGIONS_EXPLICIT = "[de, gb]"
SKIP_LIST = [ 416128112, 416128137, 416145146, 416145155]


Code: Select all
bounds=16.39984_48.22314_16.40242_48.22451


Bernhard
powoflight
 
Posts: 212
Joined: Fri Mar 25, 2016 11:04 am
Location: LOWW
Callsign: OE-POW
Version: 2020.4
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby merspieler » Fri May 10, 2019 12:04 pm

To check for other cities... I've build Munich irl there are as well many underground stations.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2228
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: osm2city.py development

Postby powoflight » Fri May 10, 2019 2:11 pm

Thats good because i know a little munich and subwaystation. I will check on the weekend.
powoflight
 
Posts: 212
Joined: Fri Mar 25, 2016 11:04 am
Location: LOWW
Callsign: OE-POW
Version: 2020.4
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby vanosten » Fri May 10, 2019 3:18 pm

Can you please check, whether usually there is a height or building:levels key? I am just not so sure whether all buildings / building:parts etc. should go away, when level is -1. Sometimes The base of a building could be in level -1, but then the rest be over the surface - I just do not know.

According to taginfo ca. 34k buildings have the key "level". See also https://wiki.openstreetmap.org/wiki/Key%3Alevel.

I just want to be pretty sure that the logic implemented also works outside of a German speaking city centre.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

Postby merspieler » Fri May 10, 2019 3:37 pm

Sydney has as well a few underground stations in the city center and I've generated an australian scenery... see the avail scenery wiki page
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2228
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: osm2city.py development

Postby powoflight » Fri May 10, 2019 3:50 pm

Hi merspieler

Have found more in Munich too.
One example. Send pictures later.
fgfs --aircraft=ufo --lat=48.149094 --lon=11.549168 --altitude=2036.00 --heading=274.3


Dear Vanosten

I will check the building:levels key . I understand that we have to investigate the logic in OSM about levels.
Maybe there is no logic? But in F4map it works well. ..
I need some days to check that things. Anyway we need more examples and i agree ,we should analyze it slowly.
powoflight
 
Posts: 212
Joined: Fri Mar 25, 2016 11:04 am
Location: LOWW
Callsign: OE-POW
Version: 2020.4
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby vanosten » Fri May 10, 2019 7:58 pm

building:levels or levels is different from level. Stuff is subtle in OSM.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

Postby powoflight » Mon May 13, 2019 12:47 pm

Dear Vanosten

Can you give infos like sql queries how to find
According to taginfo ca. 34k buildings have the key "level".


buildings with key "level" .

Thanks
Last edited by powoflight on Mon May 13, 2019 1:21 pm, edited 1 time in total.
powoflight
 
Posts: 212
Joined: Fri Mar 25, 2016 11:04 am
Location: LOWW
Callsign: OE-POW
Version: 2020.4
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby powoflight » Mon May 13, 2019 12:54 pm

Munich and subway stations.


Image

Image

and JOSM with only level -1

Image

In Vienna i have found subway station on the Bridge (Reichsbrücke) they have Level 0 and Level 1 in JOSM.
In reality they are are "below" the bridge or better saying in the Bridge (not seen from the outside).
powoflight
 
Posts: 212
Joined: Fri Mar 25, 2016 11:04 am
Location: LOWW
Callsign: OE-POW
Version: 2020.4
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby powoflight » Tue May 14, 2019 10:54 am

Sydney has as well a few underground stations in the city center and I've generated an australian scenery... see the avail scenery wiki page


I checked Sydney. The few underground stations are always below big buildings and not beneath any road. So luckily everything is alright
powoflight
 
Posts: 212
Joined: Fri Mar 25, 2016 11:04 am
Location: LOWW
Callsign: OE-POW
Version: 2020.4
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby merspieler » Tue May 14, 2019 11:19 am

um... no! St. James and Museum Station are underneath Hyde Park https://www.openstreetmap.org/#map=17/- ... /151.21125
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2228
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: osm2city.py development

Postby powoflight » Wed May 15, 2019 10:20 am

um... no! St. James and Museum Station are underneath Hyde Park https://www.openstreetmap.org/#map=17/- ... /151.21125


Interesting
In osm2city Museum Station is visible but not St. James.

Neither of the 2 Stations have Level 0 or Level -1
Checked in JOSM with activating Filter: (Level=0 or Level=-1)

But as i look at the important tags:

===========================================
Museum Station (visible) has tag in JOSM:

Building: train_station
layer: -2
location: underground
name: Museum Station
tunnel: yes

===========================================
St. James Station has tags in JOSM:

Building: train_station
building:levels -1
layer: -1
location: underground
tunnel: yes

===========================================
Subway Station In Munich (OSM2city visible): id 98 999 753

area: yes
Building:part yes
layer: -1
level: -1
tunnel: yes

===========================================
wien Reichsbrücke (OSM2city visible): id 416 087 606

area: yes
Building:part yes
indoor: corridor
level: 0

===========================================
wien subway station (OSM2city visible): id 416 128 112

area: yes
Building:part yes
indoor: corridor
level: -1
tunnel: yes

It would be helpful if someone sees a correlation between this samples
powoflight
 
Posts: 212
Joined: Fri Mar 25, 2016 11:04 am
Location: LOWW
Callsign: OE-POW
Version: 2020.4
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby vanosten » Mon Jun 10, 2019 10:02 am

I have pushed a new version, which should solve two of the problems discussed above:

Let me know if you find issues. I only tested at Nymphenburgerstrasse in Munich.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

Postby vanosten » Sun Jun 16, 2019 4:14 pm

I have pushed a performance improvement (using GEOS/Shapely PreparedGeometry) for the land-use part. It trades a bit better performance with a bit more memory consumption. On my old laptop the North-Easter tile of Munich went fro 4 hours to 3 hours processing (no building generation).

While this is better, it is IMO not good. I still consider that the way out of this is migrating the heavy processing from Python to C++. I still have a bit of hope in Cython, but as far as I can see given the specific processing not too much can be gained.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 2 guests