1

I have data for the composition of rock layers in several polygons on earth. I would like to plot a stacked chart of the rock layers, colored based on layer metadata. Here's a mockup, where rock layers are extruded downward from surface polygons:

mockup

So far, I've been experimenting with making this visualization using KML. From the samples, I've found how to extrude above a single polygon, but I haven't been able to make a stack.

How do I modify this KML to produce a stacked set of extruded polygons? The two extrusions are unfortunately intersecting currently.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>KmlFile</name>
    <Style id="transBluePoly">
      <LineStyle>
        <width>1.5</width>
      </LineStyle>
      <PolyStyle>
        <color>7dff0000</color>
      </PolyStyle>
    </Style>
    <Placemark>
      <name>Absolute Extruded</name>
      <visibility>1</visibility>
      <styleUrl>#unknown</styleUrl>
      <Polygon>
        <extrude>1</extrude>
        <tessellate>1</tessellate>
        <altitudeMode>absolute</altitudeMode>
        <outerBoundaryIs>
          <LinearRing>
            <coordinates>
              -112.3396586818843,36.14637618647505,1784
              -112.3380597654315,36.14531751871353,1784
              -112.3368254237788,36.14659596244607,1784
              -112.3384555043203,36.14762621763982,1784
              -112.3396586818843,36.14637618647505,1784
            </coordinates>
          </LinearRing>
        </outerBoundaryIs>
      </Polygon>
    </Placemark>
    <Placemark>
      <name>Absolute Extruded</name>
      <visibility>1</visibility>
      <styleUrl>#transBluePoly</styleUrl>
      <Polygon>
        <extrude>1</extrude>
        <tessellate>1</tessellate>
        <altitudeMode>absolute</altitudeMode>
        <altitude>2000</altitude>
        <outerBoundaryIs>
          <LinearRing>
            <coordinates>
              -112.3396586818843,36.14637618647505,2000
              -112.3380597654315,36.14531751871353,2000
              -112.3368254237788,36.14659596244607,2000
              -112.3384555043203,36.14762621763982,2000
              -112.3396586818843,36.14637618647505,2000
            </coordinates>
          </LinearRing>
        </outerBoundaryIs>
      </Polygon>
    </Placemark>
  </Document>
</kml>

Here's a screenshot (using the KML interactive sampler):

Screenshot -- notice that the two polygons intersect color-wise.

I'm dissatisfied with the polygons intersecting color-wise.

(There is also the limitation of extruding up from the surface -- my workaround is to set an altitude above the surface of the earth at which the "extrusions" will start, and then extrude downward from that altitude, so the rock layers will float above the surface.)

If there are go-to ways to do this in ArcGIS or some other package I haven't considered, please disregard my KML approach and suggest the easier way!

1

If you load your data into qgis you can prepare your data to creating kmls. I'm not sure what attributes are in your dataset, and how are they separated, but maybe after to load them into qgis you need to do some additional steps, like merge, or calculation fields and then you can export your dataset separated by materials and their depth plus the surface height into shape files. And then just use this program (you can customize almost everything here): http://www.zonums.com/shp2kml.html to generate the kml files (separeted by materials). If you share a small bit of your data, I can give you a more specific answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.