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 11:03 am

You might consider deleting elev.pkl since you might have filled the elevation cache with 0.
portreekid
 
Posts: 336
Joined: Tue Jan 14, 2014 3:36 pm
Location: Dresden
Version: 3.0
OS: Windows 7

Re: osm2city.py development

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

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

This tool is absolutely cool :)
User avatar
legoboyvdlp
 
Posts: 7126
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: osm2city.py development

Postby pommesschranke » Mon Dec 21, 2015 11:57 pm

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: 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 vanosten » Sun Dec 27, 2015 6: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: 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 vanosten » Thu Jan 21, 2016 5: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: 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 f-ojac » Thu Jan 21, 2016 5:45 pm

I really think we should keep the installation and setup stuff on the wiki.
--
If you want to support my Terrasync server, hosted on a private server, you can donate here: http://ns334561.ip-5-196-65.eu/WS2.0/WS ... 2.0.1.html
f-ojac
 
Posts: 1276
Joined: Fri Mar 07, 2008 9:50 am
Version: GIT
OS: GNU/Linux

Re: osm2city.py development

Postby rominet » Thu Jan 21, 2016 6: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: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: osm2city.py development

Postby wlbragg » Thu Jan 21, 2016 9: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(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 radi » Thu Jan 21, 2016 10: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: 643
Joined: Mon Aug 25, 2008 4:24 pm
Location: YMML, EDDC

Re: osm2city.py development

Postby vanosten » Sun Jan 31, 2016 2: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: 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 » Sun Jan 31, 2016 9: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(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 abcaster » Tue Feb 02, 2016 10:53 am

vanosten wrote in Sun Jan 31, 2016 2: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 6:52 pm, edited 1 time in total.
abcaster
 
Posts: 85
Joined: Sat Jun 28, 2014 10:08 am
Location: EKCH
Callsign: LNRCX
Version: 2018.2.0
OS: Sierra

Re: osm2city.py development

Postby AlvA91 » Tue Feb 02, 2016 5: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 11:22 am

Re: osm2city.py development

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

AlvA91 wrote in Tue Feb 02, 2016 5: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: 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 vanosten » Sat Feb 06, 2016 5: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: 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

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 2 guests