Jump to content

Recommended Posts

Posted

Hi,
 
I'm trying to spice up my simulator by adding wind generators in Germany.
Right now, it's a rather cumbersome effort.
Step one: Downloaded the germany.osm.pbf
Step two: Using osmosis to extract the wg's in 2x2 degree squares
The output in the files looks like this:

  <node id="33069521" version="10" timestamp="2013-05-23T08:14:48Z" uid="1477854" user="Ubbi" changeset="16248707" lat="53.5430568" lon="7.2894643">
    <tag k="generator:source" v="wind"/>
    <tag k="power" v="generator"/>
    <tag k="power_source" v="wind"/>
  </node>

Step three: create a .csv with moor.csvtoxml converter

Example:

0,"33069521","10","2013-05-23T08:14:48Z","1477854","Ubbi","16248707","53.5430568","7.2894643",0

Step four: Open with OpenOffice, delete all columns but lat and lon, use concatenate to create the "FSX-Format"

<SceneryObject lat="53.0019608" lon="8.9080446" alt="0.000000" pitch="0.000000" bank="0.000000" heading="0.000000" imageComplexity="VERY_SPARSE" altitudeIsAgl="TRUE"><LibraryObject name="6771652649688C31CBCAF58ECB3A8DD0" scale="1.000000"/></SceneryObject>

Step five:

Select the column, copy and paste in new .txt

Rename that file to .xml

Step six: Compile with bglcomp.exe

 

As you can see, not very difficult, but it takes a long time. Is there a shortcut I am missing?

I don't know that much about xml and xslt. I assume it should be possible to directly convert the xml from osmosis in the FSX-format, but I don't know how.

I'd appreciate your help, as I think OSM is an easy way to add stuff to the standard scenery.

 

Thanks,

Christian

  • Commercial Member
Posted

Maybe someone who knows a bit of C programming would be nice enough to write you a program to do it.

 

It would involve opening the output files and then loop through them looking for each lat and lon text pair and then write them into the new xml file.

www.antsairplanes.com

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...