No announcement yet.

Exaggerating height causes KML polygons to split apart

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exaggerating height causes KML polygons to split apart

    We wrote a WorldWind demo app that imports and displays KML files. My KML file consists of yellow triangular polygons that fit together at their edges. They should fit together exactly, because the polygons reuse the same corner points. I've checked the text in the KML file. When a point is reused, it duplicates the exact same latitude, longitude, and altitude.

    When I press WorldWind's height exaggeration button, the polygons move vertically, as expected. But gaps appear between many of the polygons, as if the they are splitting apart.

    Please see the two attached screenshots.

    It's as if exaggerating height causes the polygon centers to move outward from the earth's center rather than the corner points, i.e., as if each polygon is moved vertically, but fails to be enlarged properly.

    Below is a snippet of our code that adds the KML file to the display:

    gov.nasa.worldwind.ogc.kml.KMLRoot kmlRoot
    = gov.nasa.worldwind.ogc.kml.KMLRoot.creat eAndParse( fullPathToKmlFile);
    gov.nasa.worldwind.layers.LayerList layers = this.getWwd().getModel().getLayers()

    // Code below is invoked on a separate thread

    gov.nasa.worldwind.ogc.kml.impl.KMLContr oller kmlController
    = new gov.nasa.worldwind.ogc.kml.impl.KMLContr oller( kmlRoot);
    gov.nasa.worldwind.layers.RenderableLaye r layer = new gov.nasa.worldwind.layers.RenderableLaye r();
    layer.addRenderable( kmlController);
    layer.setName("KML Model");

    Have I found a bug in WorldWind?

    Is there a work-around?

    Last edited by stanm; 04-20-2017, 05:03 PM. Reason: Tried to remove unintended spaces from the code snippet

  • #2
    Hello stanm, this doesn't look like WebWorldWind code. Wrong forum?


    • #3
      AkeluX, I see you are correct, thanks. I've reposted, this time to the correct forum here.


      • #4
        Thank you. I don't work much with the Java version so I'll let a more knowledgable person answer you.