Advanced KML Region Concepts (Altitude, Fade Extent, Nested Regions)

Posted on January 29, 2008. Filed under: Google Earth, Regions |

In our last post on KML Regions we covered some background information on KML Regions and the various ways in which they can be used in Google Earth to display large GIS datasets.  In this post we are going cover additional Region subjects including altitude, fade extent, and nested regions.

Bounding Box 
As we mentioned in our previous post, the bounding box and level of detail (LOD) are two of the basic, key concepts in creating Regions.  A bounding box, defined by the <LatLongAltBox> element, describes an area of interest defined by geographic coordinates and altitudes.  This element contains the child elements <north>, <south>, <east>, and <west> that define the boundaries of the Region.  A Region is considered “active” or visible when the bounding box is within the display and the level of detail requirements are met. 

Level of Detail 
The Level of Detail (LOD) is defined with the <Lod> child element of <Region>.  It defines a range, specified by <minLodPixels> and <maxLodPixels> that determines the visibility of data within a Region.  This ensures that large amounts of data are only loaded when enough pixels are available to display the data adequately.  When the Region takes up a relatively small percentage of the screen, the LOD allows you to specify a dataset with a lower resolution.  The <Lod> value units are defined by square pixels.  Data must occupy an area greater than <minLodPixels> and less than <maxLodPixels> to be visible. 

 There are a number of other Region concepts that you need to be familiar including altitude, fade extent, and nesting regions. 

Altitude
The <LatLonAltBox> element can contain child elements which control the minimum <minAltitude> and maximum altitudes <maxAltitude> at which a Region will display.  Notice in the figure below that the minimum altitude at which the Region will display is 10000 meters and the maximum altitude is 50000 meters.  These child elements are containing within the <LatLonAltBox> element. 

Fade Extent
By setting a fade extent for a Region, you can enable your objects to transition seamlessly from transparent to opaque, and back again.  You do need to be careful when setting a fade extent for a Region because they are computationally expensive, and should only be used with vector data such as LineStrings, Polygons, and Points, but not with imagery data.  Fade extents are set with the <minFadeExtent> and <maxFadeExtent> child elements of <Lod>.  These are set as pixel values similar to the values you set for <minLodPixels> and <maxLodPixels>, and are used in conjunction similar to the code you see below.

The <maxFadeExtent> is used to determine the ramp from fully transparent to fully opaque when the Region is at its maximum visible size.  The <minFadeExtent> element is used to determine the fade ramp when the Region is at its minimum visible size. 

Nesting Regions
Regions can be nested so that smaller, increasingly finer levels of detail are shown as the user zooms in on the display.  Previously loaded coarse levels of detail are gradually replaced with these more detailed Regions. 

<LatLonAltBox> elements in a child Region should be wholly contained within the <LatLonAltBox> of its parent Region. 

In our next post we’ll show you how to use Arc2Earth to create Regions from your ArcGIS data.

More Information
GeoSpatial Training Services provides e-learning courses for GIS users.  If you would like more information on Regions and other KML elements please see our “Mastering KML in Google Earth” e-learning course.  Other related course include “Integrating ArcGIS Desktop and Google Earth“, “Introduction to the Google Maps API“, “Arc2Earth for ArcGIS Users“, and our “Google Bundle” which combines all these courses into one package at a significant discount.

Make a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: