January 24, 201412 yr 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.pbfStep two: Using osmosis to extract the wg's in 2x2 degree squaresThe 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 Christian Wendt
January 25, 201412 yr Commercial Member 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