Board index FlightGear Development Scenery

osm2city.py development

Questions and discussion about enhancing and populating the FlightGear world.

Re: osm2city.py development

Postby wlbragg » Thu Nov 17, 2016 5:32 pm

vanosten wrote in Thu Nov 17, 2016 3:13 pm:make sure also to update osm2city-data

Yes, thank you.
Last edited by wlbragg on Thu Nov 17, 2016 6:24 pm, edited 1 time in total.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby vanosten » Thu Nov 17, 2016 6:23 pm

I suggest that you run the chain of tools first on a small area before going to build a whole tile.

The *.osm files are supposed to contain the osm for the specific tile. It is either generated by dynamic download or by osmosis depending on your parameters when calling build_tiles.py. So after that you need first call download...sh to get the data.osm files generated. Unfortunately the documentation does not make it clear that download...sh needs to be called first - and there are some residuals in the naming of the other .sh files in the documentation. It is corrected now: http://osm2city.readthedocs.io/en/latest/generation.html#working-in-batch-mode. Thanks for pointing out.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 416
Joined: Sat Sep 25, 2010 5:38 pm
Location: Denmark - but I am Swiss
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

Postby wlbragg » Thu Nov 17, 2016 6:40 pm

you need first call download...sh


I think part of my issue is trying to incorporate the procedures from months ago to the newest procedures.

So far I have successfully
download.py the osm
build_tiles.py

Running buildings_w0*.sh stage is where it's failing now.

I was able to pipe the console output to file and have a much better picture of the failures and am trying to address it. Right now it is fgelev that is cascading the rest of the failure. It doesn't like the parameter ELEV_MODE=FgelevCaching. I'm pretty sure it's my fault and will try to debug without waisting anymore of your time.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby wlbragg » Thu Nov 17, 2016 7:07 pm

My failure on elevation is because the user defined parameters
Code: Select all
PREFIX = "Sedgwik"
PATH_TO_SCENERY = "/home/wayne/FGTools/scenery/kansas/output"
PATH_TO_OUTPUT = "/home/wayne/FGFS/osm2city/Sedgwick"
PATH_TO_OSM2CITY_DATA = "/home/wayne/FGFS/osm2city-data"
OSM_FILE = "buildingsa.osm"

BOUNDARY_WEST = -97.70
BOUNDARY_SOUTH = 37.47
BOUNDARY_EAST = -97.15
BOUNDARY_NORTH = 37.91

NO_ELEV = False             # -- skip elevation probing
ELEV_MODE = "FgelevCaching" # -- elev probing mode. Possible values are FgelevCaching (recommended), Manual, or Telnet
FG_ELEV = r'"/home/wayne/FGFS/install/flightgear/bin/fgelev"'

is copying over into the build directory as
Code: Select all
PREFIX = "w100n30/w097n37/1368000"
PATH_TO_SCENERY = "/home/wayne/FGTools/scenery/kansas/output"
PATH_TO_OUTPUT = "/home/wayne/FGFS/osm2city/Sedgwick"
PATH_TO_OSM2CITY_DATA = "/home/wayne/FGFS/osm2city-data"
OSM_FILE = "data.osm"

BOUNDARY_WEST = -97.000000
BOUNDARY_SOUTH = 37.000000
BOUNDARY_EAST = -96.750000
BOUNDARY_NORTH = 37.125000

NO_ELEV = False             # -- skip elevation probing
ELEV_MODE = "FgelevCaching" # -- elev probing mode. Possible values are FgelevCaching (recommended), Manual, or Telnet
FG_ELEV = r'"/home/wayne/FGFS/install/flightgear/bin/fgelev"'


Which is
OSM_FILE = "buildingsa.osm"
copies over to
OSM_FILE = "data.osm"

Apparently it needs to be
OSM_FILE = "buildingsa.osm"
copies over to
OSM_FILE = "/home/wayne/FGFS/osm2city/Sedgwick/buildingsa.osm"

Even though I am getting
WARNING:root:Unknown parameter: ELEV_MODE=FgelevCaching
If I hard code the latter, then the elevation data elev.pkl generates and all is well until I get to my next issue of
Problems loading FlightGear preferences.
Probably FG_ROOT is not properly set.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby vanosten » Thu Nov 17, 2016 7:32 pm

Please read the docs. It also states that you need to set FG_ROOT (http://osm2city.readthedocs.io/en/latest/installation.html#pre-requisites).

Data.osm is not copied over. It is generated into the sub-folders by running download...sh.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 416
Joined: Sat Sep 25, 2010 5:38 pm
Location: Denmark - but I am Swiss
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

Postby wlbragg » Thu Nov 17, 2016 7:57 pm

Please read the docs. It also states that you need to set FG_ROOT

Thank you!
I apologize for not starting at the docs and working my way through it. The only reason I didn't is I had a previous "extensive" installation I was trying to adapt. Too many things have subtle changes since the last time I use it. Not to mention the disparity between the docs and the gazillions of different OS configurations possible.

Again I apologize for the distractions.

However,
Data.osm is not copied over. It is generated into the sub-folders by running download...sh.

I don't have a download....sh

With the steps I used, the "subfolders" were not created at the time I did the download.py. They were created by build_tiles.py

I used download.py to obtain my .osm data. I did not use the -d flag in build_tiles.py
All download.py does is download the .osm data that I assumed was referred to in the params.ini.

Now I am confused?

Please re-read my user defined params.ini VS the generated params.ini that is generated and placed into the "subfolders".
ie:
Code: Select all
  -f: the relative path to the main params.ini file, which is the template copied to all sub-directories.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby wlbragg » Thu Nov 17, 2016 9:59 pm

Code: Select all
No such file or directory: 'w100n30/w097n37/1368000/buildingsa.osm'

Clearly it is looking for the .osm file to be in the subfolders, could you please (if you know) point me to the file and line number that copies or creates these .osm files in the subfolders when not using the -d flag?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby wlbragg » Fri Nov 18, 2016 6:13 pm

Data.osm is not copied over. It is generated into the sub-folders by running download...sh.


OK, I see the download...sh file that was generated. I also read
Call the generated scripts starting with download_xxxxx.sh.


The reason for the confusion is I had already downloaded the osm data with download.py (like I used to do). Maybe I am confusing batch processing with some other method (which is what I must have used before). The current steps are different from the way I used to do it, thus the confusion.

I had an existing structure of osm data downloaded by county for the state of Kansas. Each one of those county folders had 1 or more osm files (I guess at the time there were issues with size). All I used to have to do was re-run download.py to update and then I think it was one other command that did the rest. At that point I had a data set ready to link FG to.

So after looking at this again with fresh eyes I think I see the path forward. Sorry for the dumb questions. Hopefully I am past the curve. Thanks for the help.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby wlbragg » Fri Nov 18, 2016 9:50 pm

All is working, again thank you! Buildings are really nice.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby wlbragg » Wed Nov 23, 2016 12:08 am

What would cause only part of a building to be created in a tile? Below the entire building is encircled in the green circle, yet the portion enclosed in the red circle failed to be created on the tile. What should I look at or adjust to get it to build?
Image
Also I rebuilt a small housing track that I previously built and it only built about 1/8th of the buildings that were in that area. I am pretty sure it downloaded all the buildings though I haven't verified that. Again, is there a particular setting or parameter I should check?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby pommesschranke » Wed Nov 23, 2016 10:39 am

how long did you wait?
sometimes FG waits very long before loading all buildings :-(
pommesschranke
 
Posts: 1104
Joined: Sat Apr 27, 2013 7:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Lubuntu 18.04

Re: osm2city.py development

Postby wlbragg » Wed Nov 23, 2016 11:05 am

how long did you wait?

I don't think it is that. The one example I showed is one whole building as opposed to two buildings. It's like it cut off half the building (if that is even possible)?

The second example I referred to is an are that is not dense with buildings. When it does take a long time to load buildings, will it skip every other building in a small area? It' really isn't skipping "every other building" but that is the best way to describe it. It's more like a LOD param or something else that might need to be adjusted?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby pommesschranke » Wed Nov 23, 2016 12:09 pm

wlbragg wrote in Wed Nov 23, 2016 11:05 am:The one example I showed is one whole building as opposed to two buildings.


in OSM it is 3 buildings:

http://www.openstreetmap.org/way/93019351
pommesschranke
 
Posts: 1104
Joined: Sat Apr 27, 2013 7:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Lubuntu 18.04

Re: osm2city.py development

Postby wlbragg » Wed Nov 23, 2016 5:07 pm

in OSM it is 3 buildings:

Interesting, I was going by
https://osmbuildings.org/?lat=37.65303&lon=-97.42842&zoom=17.4&rotation=0&tilt=30
which looks like it is one building.

So any idea why the two wings aren't showing?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby saul » Wed Nov 23, 2016 10:43 pm

Hi guys,

I have used the last version of osm2city on Quito, Ecuador. The city itself is located at around 2800m and surrounded by mountains. The old airport "SEQU" is in the middle of the city, so there are many osm buildings and roads around it. I want yo share a short video that I made of a night landing in SEQU:

saul
 
Posts: 38
Joined: Tue Nov 26, 2013 9:57 pm

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: Google [Bot] and 1 guest