|
KMLRenderingStrategies
Discussion of best practices for displaying KML
IntroductionKML, or more accurately applications such as Google Earth which display KML, are not adept at rendering larger datasets. Performance of the client machine can be slow, bandwidth becomes an issue and crashes in the GE application can occur when large data are loaded without first optimizing the display strategy. KML StrategiesFirst, the general strategy is discussed. Then various implementation alternatives are presented. Single KMLOutput the entire file as a single KML document. This works well for moderate-sized datasets on fast hardware. But even (1500?) verticies/points can cause noticable slowing or worse on lower-end hardware.
Raster SuperoverlaysGenerate raster tiles at varying zoom levels and reference them via network links and regionated KMLs(KML heirarchy). This approach can generate HUGE amounts of data is the extent is large and a number of zoomlevels are requirement. Generally useful only for raster data or for huge vector datasets which would not be appropriate to display as vector. By displaying the data as images you loose the ability to do info queries on the feature.
Vector SuperoverlaysThere may be cases where the vector dataset is large but we want to display it as vector shapes in the interface rather than converting to raster tiles). This approach may need to be customized to optimize for particular qualities of each dataset. For example, in a dataset with 100k features, you could create multiple levels of data and a kml heirachy such that only large features were displayed zoomed out and, as you zoomed in, the smaller features would appear. We could consider creating altered geometries at different zoom levels (ie show simplified geometries only at high zoom levels). For points we could consider clustering. Complex vectors are difficult to render using superoverlays when the dataset does not cover the entire extent of the dataset. Isobaths are a good example of this. http://maps14.msi.ucsb.edu/kml_test/IsobathsSO/geviewer_nl.kml When zooming into these tiles, the tiles from the higher scales are still displayed, and scaled up. This results in those tiles creating blurred edges underneath and around the higher resolution tiles.
TestingAs we will be trying numerous KML strategies, there is a need for a consistent, repeatable test of performance in Google Earth. We have added a KML tour for testing which we can run with various combinations of datasets loaded to assess graphics performance. Bottlenecks become apparent when the frame freezes and slows. In order to quantify the performance, we can use FRAPS (windows only) to measure the frame rate (frames per second or fps) of the google earth tour.
2009-10-23 16:14:24 - googleearth Frames: 2163 - Time: 56716ms - Avg: 38.137 - Min: 3 - Max: 61 Things to look out for:
|