Board index FlightGear Development Scenery

osm2city.py development

Questions and discussion about enhancing and populating the FlightGear world.

Re: osm2city.py development

Postby vanosten » Wed May 27, 2020 5:12 pm

Michat wrote in Tue May 26, 2020 6:06 pm:Negative. That texture, my humble edition of the atlas_facades bitmap is not in osm2city master. Is just a testing edition attempting to remove green and blue roofs. Things that I was able to achieve. However, today I've notice that, if we look at the picture provided by Miguel, there are a few tall buildings facades that are covered with "roof colors". So as user VTNS said we should to split it out, or just in this case find and change those tall buildings definition-relation with the target segment map of the atlas facades texture to mach an entired satisfactory result for all the buildings. ( out of my scope )

So I encourage FG users to test, report and suggest for any improvement needed.

29.92 Thank you.


I am aware of the changed texture. When I have time I will compare facade by facade and make a decision, whether to keep your change and submit it to both osm2city-data and FGData, so it makes it to the upcoming LTS version.

As I have written above: the glass and grass roofs I have corrected the right way. If you still see the problem with newly generated scenery, then report with picture, osm_id and coordinates. I can look into that.

It is very tedious and close to impossible to correct an existing scenery. The way to work with problems is by correcting the code and regenerate.

On the development list the plans for the LTS version 2020.2 were released. There is not enough time to make the necessary corrections with a totally new scheme of textures. So I plan to do it for the next version again. Once I have that clear and done a proof of concept, I would be glad if people could join to create good facade textures.
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 Michat » Wed May 27, 2020 8:10 pm

Thank you for your info and work on this complexity.
User avatar
Michat
 
Posts: 1226
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: osm2city.py development

Postby vanosten » Mon Jun 01, 2020 11:37 am

Michat wrote in Fri May 15, 2020 5:31 pm:I've edited the atlas_facades.png removing water colors on roof., Sun reflecting on a skyscrapper, dark black building tops, adding some new colors here and there.

We have test it out with user Miguel with positive feedback.

Is time for you to test it and tell me your opinion with sharing screenshots..

The edition has been made with Inkscape, the skill used allows to change colors easily. So if you spot any mistake just report a picture, so we can improved it.


Where can I download the file? The file in the post is *.jpg.
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 Michat » Mon Jun 01, 2020 6:09 pm

Go to the previous page. I've updated the texture to .png.
Don't forget to rename it to it's original name.

Thank you.
User avatar
Michat
 
Posts: 1226
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: osm2city.py development

Postby vanosten » Fri Jun 05, 2020 7:31 am

Thanks. The dimensions are wrong and some of the roof textures do not anymore correspond to the definition in the data. Therefore, I will not include it. Sorry,
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 » Fri Jun 05, 2020 11:49 am

I have changed some code around overlap detection between oms2city buildings and static/shared objects in FG scenery. I know there have been reports about the overlap check not working. I would be glad to get such stuff reported with lon/lat, picture, nearest airport and if possible the name of the FG object and/or the OSM ID (the more information you give me, the more time I get investigating the issue instead of finding info myself).

I added a parameter to visualise the overlap check. DEBUG_PLOT_BLOCKED_AREAS_DIFFERENTIATED = True creates a PDF in the working directory.
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 » Sat Jun 06, 2020 11:53 am

By publishing parameter "AREA" I have made a little trick official for those of you who might generate different sceneries: parameter files are just regular Python code, and therefore you can do scripting in them. See https://osm2city.readthedocs.io/en/late ... er-setting.
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 07, 2020 1:38 pm

I have a bit reluctantly added parameters OVERLAP_CHECK_EXCLUDE_AREAS_BUILDINGS and OVERLAP_CHECK_EXCLUDE_AREAS_ROADS to allow for fake exclude areas in case of problems with convex hulls of static entries like around PHNL. This stuff should really only be used if nothing else helps. You can see a visualisation (see also ca. 2 posts above how to get these pictures) in the manual: https://osm2city.readthedocs.io/en/late ... -and-roads

This concludes any attempt from my side to resolve clashes between osm2city and static or shared scenery objects.

(I guess that the static objects at PHNL were converted from another source and not properly to start with.)
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 D-ECHO » Sat Jun 13, 2020 11:54 am

While trying to run osm2city, roads.py crashes with the following error message:
Code: Select all
SpawnPoolWorker-3 root INFO     Merged 9 ways
SpawnPoolWorker-3 root ERROR    Exception occurred while processing tile 2205130.
Traceback (most recent call last):
  File "/home/delta/FGSC-DEV/osm2city/build_tiles.py", line 155, in process_scenery_tile
    the_stg_entries, file_lock)
  File "/home/delta/FGSC-DEV/osm2city/osm2city/roads.py", line 1391, in process_roads
    roads.process(transform, extended_blocked_areas, lit_areas, water_areas, stats)  # does the heavy lifting incl. clustering
  File "/home/delta/FGSC-DEV/osm2city/osm2city/roads.py", line 538, in process
    self._create_linear_objects()
  File "/home/delta/FGSC-DEV/osm2city/osm2city/roads.py", line 1105, in _create_linear_objects
    self.G.add_linear_object_edge(obj)
  File "/home/delta/FGSC-DEV/osm2city/osm2city/utils/graph.py", line 119, in add_linear_object_edge
    junction0 = self.junction(ref0)
  File "/home/delta/FGSC-DEV/osm2city/osm2city/utils/graph.py", line 113, in junction
    return self.nodes[the_ref]['obj']
TypeError: 'method' object is not subscriptable
SpawnPoolWorker-3 root ERROR    ******* Exception in tile 2205130 - to reprocess use boundaries: -45.5_61.125_-45.3_61.2 *******
Traceback (most recent call last):
  File "/home/delta/FGSC-DEV/osm2city/build_tiles.py", line 155, in process_scenery_tile
    the_stg_entries, file_lock)
  File "/home/delta/FGSC-DEV/osm2city/osm2city/roads.py", line 1391, in process_roads
    roads.process(transform, extended_blocked_areas, lit_areas, water_areas, stats)  # does the heavy lifting incl. clustering
  File "/home/delta/FGSC-DEV/osm2city/osm2city/roads.py", line 538, in process
    self._create_linear_objects()
  File "/home/delta/FGSC-DEV/osm2city/osm2city/roads.py", line 1105, in _create_linear_objects
    self.G.add_linear_object_edge(obj)
  File "/home/delta/FGSC-DEV/osm2city/osm2city/utils/graph.py", line 119, in add_linear_object_edge
    junction0 = self.junction(ref0)
  File "/home/delta/FGSC-DEV/osm2city/osm2city/utils/graph.py", line 113, in junction
    return self.nodes[the_ref]['obj']
TypeError: 'method' object is not subscriptable
SpawnPoolWorker-3 root INFO     ******* Finished tile 2205130 - 2/2 *******
MainProcess root INFO     Total time used: 321.944220


Buildings get generated and when disabling roads.py from build_tiles.py, also pylons are built, so roads.py seems to be the only script having problems.

System is Kubuntu 18.04
D-ECHO
 
Posts: 2458
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: osm2city.py development

Postby vanosten » Sun Jun 14, 2020 1:27 am

I need at least lon/lat in order to re-create. The parameter file and command line arguments would also be helpful. The thing is: it seems to be working in "all" other places, so it is not easy to debug without adequate information.
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 D-ECHO » Sun Jun 14, 2020 8:48 am

Hi vanosten,

the command line used was
Code: Select all
python3 osm2city/build_tiles.py -f=scripts-osm2city/north-america/greenland/greenland.ini -b=*-45.5_61.1_-45.3_61.2 -p 4

and the ini file is here: https://github.com/D-ECHO/Greenland-Cus ... enland.ini

[EDIT] A HUGE sorry from me. It works now, I think it had something to do with incorrectly set up dependencies or so. This time I used virtualenv based on these scripts: https://github.com/slawekmikula/scripts-osm2city Thank you for your work! I'll let you know if I find out what was the root cause (i.e. which change on my side exactly caused it to go from non-working to working)
D-ECHO
 
Posts: 2458
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: osm2city.py development

Postby commonNonsense » Fri Jun 19, 2020 10:36 pm

Hello, I came from osm environment and thanks for enabling me to see my efforts while flying in flight simulator! I managed to see buildings, but as I found very undetailed Corine map is serving as background what is dissapointing as I can see much better alternative that is OSM :) is there possibility to import not only buildings, pylons, roads but also surfaces from OSM?

PS. What also came to my mind is building textures - as I am positively surprised by the diversity, it sometimes hides details manually implemented in OSM. Is there ability to 1. disable random textures 2. use OSM tags lfor details ike colour, material, windows?
commonNonsense
 
Posts: 2
Joined: Fri Jun 19, 2020 10:28 pm

Re: osm2city.py development

Postby legoboyvdlp » Fri Jun 19, 2020 10:43 pm

yes, it does - you can import the landclass layers as shapefiles, and most custom sceneries now do this -- but in general, coverage is sparse and incomplete.

Roads on the other hand I think are used already -- and definitely are great :)
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: osm2city.py development

Postby commonNonsense » Fri Jun 19, 2020 10:59 pm

Thank you for quick answer. So as I have shapefiles with landuses from geofabrik i should be able to do it, great! :) So I found out that TerraGear will be crucial in this step and wiki points to unactive link for download:
http://build.flightgear.org:8080/job/Te ... rchive.zip
Jenkins build from 2015 http://build.flightgear.org:8080/job/Te ... UI-Win/ws/ maybe someone was reorganizing directory trees :)
Last edited by Johan G on Thu Jul 09, 2020 4:48 pm, edited 1 time in total.
Reason: Please, do not quote the entire post directly above your post.
commonNonsense
 
Posts: 2
Joined: Fri Jun 19, 2020 10:28 pm

Re: osm2city.py development

Postby legoboyvdlp » Fri Jun 19, 2020 11:51 pm

Are you looking for Windows? If so this might help:

viewtopic.php?t=35618

not very well written, but does explain how to use QGIS etc to process shapefiles, and also has a link to the most stable Windows build I know of.

At present I am unable to compile terragear due to various issues with it, so using that old build at http://www.mediafire.com/file/ul2xy2ykg ... n_Built.7z for now. Doesn't have certain new nice features but it works :)
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 7 guests