Board index FlightGear Development Scenery

osm2city.py development

Questions and discussion about enhancing and populating the FlightGear world.

Re: osm2city.py development

Postby portreekid » Fri Dec 11, 2015 12:03 pm

You might consider deleting elev.pkl since you might have filled the elevation cache with 0.
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: osm2city.py development

Postby legoboyvdlp » Fri Dec 11, 2015 1:20 pm

Thank you... interesting. Will see what happens.

This tool is absolutely cool :)
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 pommesschranke » Tue Dec 22, 2015 12:57 am

Regarding the roof issue.... if you mean the curved terminal, it's clearly a case of uv coordinates spanning multiple textures in the atlas. The solution is non-trivial... first you'd have to make sure the textures are tileable and then you'd have to split the polygons on the borders....


as a workaround I replaced the lower wall/facade textures with roof texture.
No UV mapping for roofs is another option - they will have the color of the pixel in the lower left corner of the atlas.
The third idea that I had was to scale down the roof shape so that it fits into the texture area.
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: osm2city.py development

Postby vanosten » Sun Dec 27, 2015 7:28 pm

I am considering incorporating code to use world-models in osm2city, such that region specific buildings can be used in some circumstances (i.e. replacing where possible generic textures with specific buildings). world-models is part of World2XPlane and as such uses DSS as texture format and obj.-files.

Has someone already given this as thought or even attempted?
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 » Thu Jan 21, 2016 6:31 pm

Hi

I am considering investing the time to do the following two things:
  • Upgrade to Python 3.x in order to be able to use recent Python versions and some speed improvements. All dependent libraries exist and Python 3.x (I plan to use 3.4) is available on all major operating systems. => Does anyone have a serious issue with this?
  • Create documentation in Sphinx and clean-up stuff on the wiki. There is quite some outdated and/or inconsistent information on the wiki. I believe the wiki should tell about the capabilities and goal / status of osm2city stuff - not all the configuration parameters, installation etc. => Would this be "against" the FG wiki spirit to split out some of the documentation?
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 f-ojac » Thu Jan 21, 2016 6:45 pm

I really think we should keep the installation and setup stuff on the wiki.
f-ojac
 
Posts: 1304
Joined: Fri Mar 07, 2008 10:50 am
Version: GIT
OS: GNU/Linux

Re: osm2city.py development

Postby rominet » Thu Jan 21, 2016 7:17 pm

Hello,

Nice to see this project move to Python 3! :)

Concerning the FG wiki vs. Sphinx, I understand the former is convenient for users, however the latter has the big advantage of allowing developers to keep the doc along with the code (using docstrings). But the documentation structure doesn't have to be dictated by the code structure. You can write "free form" chapters in .rst files where Sphinx just pulls a function or attribute docstring from the code whenever you use the appropriate markup. Pretty powerful.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: osm2city.py development

Postby wlbragg » Thu Jan 21, 2016 10:13 pm

not all the configuration parameters, installation etc

I don't know what "Sphinx" is, but I think we definitely should keep "updated" instructions in the wiki.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: osm2city.py development

Postby radi » Thu Jan 21, 2016 11:09 pm

Hi vanosten,

I'm not against python 3 at all, go ahead!

Regarding docs, I'm in favour of Sphinx. You have a history of writing excellent docs, and I understand it is much more convenient for devs to have docs along with the code. We can still keep the general installation instructions (and nice screenshots) on the wiki. As I understand, the installation procedure rarely changes, or am I missing something?
OSM buildings for LOWI, EDDC
Custom scenery for VHXX YMML
Edit .stg via the FG Object Placement Tool
radi
 
Posts: 659
Joined: Mon Aug 25, 2008 5:24 pm
Location: YMML, EDDC

Re: osm2city.py development

Postby vanosten » Sun Jan 31, 2016 3:25 pm

The first draft of the osm2city manual is available with chapters on installation and preparation (because that is where most people seem to struggle). I am not yet sure, where to publish, once we get closer to a final version. One possibility would be https://readthedocs.org/.

For now you can find a pdf and an html version on Dropbox.

Along the line I correct some errors (mostly hardcoded values) - hopefully to the better.

Next step will be to document some stuff around textures.

Let me know your input - and whether this might be useful. For bugs in the documentation please PM me. Once the manual gets more complete and if there will be some agreement that it can replace some of the Wiki stuff, then further bugs/requests should probably be logged in the issue tracker on GitLab.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 wlbragg » Sun Jan 31, 2016 10:03 pm

Nicely done! That PDF is the perfect media for me, I've been wanting to do some more counties in KS but it's been so long since I used it I had already forgotten the particulars, this will be a good test of the docs, thank you!
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: osm2city.py development

Postby abcaster » Tue Feb 02, 2016 11:53 am

vanosten wrote in Sun Jan 31, 2016 3:25 pm:For now you can find a pdf and an html version on Dropbox.



This is really brillant! Thank you very much!
Last edited by abcaster on Tue Feb 02, 2016 7:52 pm, edited 1 time in total.
abcaster
 
Posts: 87
Joined: Sat Jun 28, 2014 11:08 am
Location: EKCH
Callsign: LNRCX
Version: 2018.2.0
OS: Sierra

Re: osm2city.py development

Postby AlvA91 » Tue Feb 02, 2016 6:01 pm

Hi, it's me again, long time no seeing hehe.

Everything works fine with the script, I'm super happy with it. I now started to create my own areas through editing existing OSM files to fit my need and then to use osm2city to generate my power lines and buildings at the place I need them to be. Even tough I already created my own tree models to have some more realistic looking trees, it takes much time to set them up in FG with the UFO. So I thought that I can maybe use the "random vegetation" function of FG. Somehow this function is not respecting my generated power lines (how dare this tool, to ignore them :D ).

What I noticed from time to time is that FG deletes automatically some buildings if they interfere with some trees from the random vegetation function. Is there any way, that FG could also delete the trees if they're to near to a pylon or a cable?

Maybe I'm wrong to ask this thing here, but maybe outside of this topic, people won't understand what I mean with OSM and osm2city.

Regards

AlvA91
AlvA91
 
Posts: 27
Joined: Wed Nov 04, 2015 12:22 pm

Re: osm2city.py development

Postby vanosten » Wed Feb 03, 2016 10:35 pm

AlvA91 wrote in Tue Feb 02, 2016 6:01 pm:What I noticed from time to time is that FG deletes automatically some buildings if they interfere with some trees from the random vegetation function. Is there any way, that FG could also delete the trees if they're to near to a pylon or a cable?


I do not know the answer. But my best gues is: no. It has been previously discussed that e.g. if a power line crosses a forest, then there should actually be no trees under the power line. The way to achieve this would be to change the landclass below the power line and generate a new scenery from scratch.

If you are interested in, how random buildings etc. work, then I suggest you have a look at $FG_ROOT/Docs/README.materials and $FG_ROOT/Materials/regions/global-summer.xml.

It might not help you, but I have updated the pdf-version (not the html-version) including some hints regarding rendering.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 Feb 06, 2016 6:41 pm

I made another update of the documentation (can be downloaded from temporary storage).

Currently html and pdf versions are in sync, but often I will update the pdf-version only.

At the same time I have corrected some hidden assumptions about placement of files. I hope it helps more in general than it breaks for some of us.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 5 guests