Hello
I'm interested in the technic to merge many flattens.
The purpose is to fix elevation for large streams (hydroplygons) to suit an improved mesh.
In FS9, I realized that with SceneGenX, drawing overlapping flattens, step 1m by 1m, compiled in one bgl file (it's SCA type).
This method doesn't work any more in FSX; I use a kml model file, with 1 polygon flatten; I got the coordinates of every previous polygon from SCA code in ScneGenX, paste in KML (adapt: swap lat/long, ...).
Then compile all polygons with FSX KML, but it was a very long work, and I get hundreds of files.
I would merge all files concerning the same river:
My kKML model files includes essentially:
1 Style section
1 StyleMap section
1 other Style section
1 Placemark section, including 1 Polygon and 1 Description (tag) section
All files have the same structure; how to merge them?
I suppose I may keep the 3 first sections; then create all Placemark sections, or all Polygon sections inside Placemark, with 1 time the common Description section?
******************************
Maybe rather long, but I post the code, if easier to give me solution (changing parts in blue); an adaptation with code for 2 dummy polygons would be good! As an other part, if any sections have no use for FSX KML, please show me if they may be deleted.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<name>xfl_riv_fmnr00.kml</name>
<Style id="s_ylw-pushpin_copy6">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
<BalloonStyle>
</BalloonStyle>
<ListStyle>
</ListStyle>
<PolyStyle>
<color>9cff55ff</color>
<outline>0</outline>
</PolyStyle>
</Style>
<StyleMap id="m_ylw-pushpin_copy5">
<Pair>
<key>normal</key>
<styleUrl>#s_ylw-pushpin_copy6</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#s_ylw-pushpin_hl_copy6</styleUrl>
</Pair>
</StyleMap>
<Style id="s_ylw-pushpin_hl_copy6">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
<BalloonStyle>
</BalloonStyle>
<ListStyle>
</ListStyle>
<PolyStyle>
<color>9cff55ff</color>
<outline>0</outline>
</PolyStyle>
</Style>
<Placemark>
<name>xfl_riv_fmnr00</name>
<styleUrl>#m_ylw-pushpin_copy5</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates>
49.7591643219816,-15.4344381959382,0 49.753101001124,-15.4173507269288,0 49.762065571544,-15.4139077495875,0 49.7723795495248,-15.4369444372457,0 49.7669561810284,-15.444918841406,0 49.757754844756,-15.4487921234267,0 49.7474184843601,-15.4360079711648,0 49.7591643219816,-15.4344381959382,0 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
<description>Airport_Backgrounds_Flatten</description></Placemark>
</Document>
</kml>
*******************************
Thanks for help!
Pierrot - FMEP