|
This article is the second of two KML articles that were previously published on GeoChalkboard, and has been reproduced here with permission. In turn it is the combination of two articles covering advanced KML region concepts, and is based on course material published by Geospatial Training Services.
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 article 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 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 the second half of this article we’ll show you how to use Arc2Earth to create Regions from your ArcGIS data.
Creating KML Regions from ArcGIS Data using Arc2Earth
Arc2Earth can be used to create Google Earth Regions through the Regions tab with the Publisher version of Arc2Earth. The General Options button displays the Region Options dialog which can be used to set the fade effects and level of detail (LOD) for the region. You must also select a region level which is basically a course grain level similar to the levels of map tiles used in Google Maps or MS Virtual Earth. Each level represents an approximate map scale. The Visualize button displays a map window with the grid showing the regions for your export along with your layer data.
The Visualize window is particularly helpful in allowing you to see the extent of the Regions that will be created along with your data. The red lines displayed in the viewer indicate how your data will be regionalized. You can also dynamically reset the region level through this window to see the effect this will have on the size of the Regions. Map navigations tools are also provided.
Demonstration
Click here to see a demonstration of using Arc2Earth to export parcel and floodplain data as KML Regions.
This article was written by Eric Pimpler at GeoSpatial Training Services. Geospatial Training Services provide a
range of geoweb courses.
 |