Advanced Kml

5,896 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
5,896
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
69
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Advanced Kml

  1. 1. Advanced KML Bent Hagemark May 29, 2008
  2. 2. Overview OGC Standard KML Architecture Advanced features Future enhancement
  3. 3. OGC Standard
  4. 4. OGC KML 2.2 April 14, 2008 Standard: 07-147r2 Abstract Test Suite: 07-134r2 100% quot;Googlequot; KML 2.2 compatible xmlns=quot;http://www.opengis.net/kml/2.2quot;
  5. 5. OGC KML 2.2 www.opengeospatial.org/standards/kml schemas.opengis.net/kml/2.2.0/ogckml22.xsd code.google.com/apis/kml code.google.com/apis/kml/documentation/kmlreference.html
  6. 6. KML Architecture
  7. 7. KML Architecture Object Feature Geometry Style Link Extension mechanism
  8. 8. Object most complex elements id=quot;IDquot; targetId=quot;IDquot; for Update AbstractXxxObjectExtensionGroup kml:AbstractObjectGroup (8.1)
  9. 9. Feature left panel entry: name, snippet, visibility balloon style viewpoint, flyTo custom data kml:AbstractFeatureGroup (9.1)
  10. 10. Feature: concrete elements Placemark NetworkLink Container: Document, Folder Overlay: GroundOverlay, PhotoOverlay, ScreenOverlay
  11. 11. Geometry 2d or 3d extrude tessellate kml:AbstractGeometryGroup (10.1)
  12. 12. Geometry: concrete elements Point (icon) LineString, LinearRing Polygon Model (textured 3d) MultiGeometry
  13. 13. Style shared style (6.4) inline style style resolution kml:AbstractStyleSelectorGroup (12.1)
  14. 14. Style: concrete elements Style StyleMap styleUrl SubStyle: BalloonStyle, ListStyle, ColorStyle ColorStyle: IconStyle, LabelStyle, LineStyle, PolyStyle
  15. 15. Link href network-shared style network-shared schema images, 3d models, more KML balloon ascription
  16. 16. Link: concrete elements NetworkLink/Link/href Overlay/Icon/href Model/Link/href styleUrl schemaUrl html:img src=quot;...quot; html:a href=quot;...quot; atom:link
  17. 17. Extension mechanism ExtendedData/Data Document/Schema, ExtendedData/SchemaData ExtendedData/XML XSD extension mechanism
  18. 18. XML and JavaScript same model (same system!) code.google.com/apis/kml/documentation code.google.com/apis/earth
  19. 19. Advanced features
  20. 20. Review: Basic features Placemark Overlay Folder Style NetworkLink
  21. 21. Advanced features Region Time Update ExtendedData
  22. 22. Region Feature LOD visibility transitions millions of points SuperOverlay
  23. 23. Region: any Feature Placemark: visibility NetworkLink: fetch Overlay: fetch of image and visibility Document/Folder: cascade
  24. 24. Region: simple effects simple Lod pop in and out fade clean swap with fade
  25. 25. Region: Example 1: simple Lod <Placemark> <Region> <Lod> <minLodPixels>128</minLodPixels> </Lod> <LatLonAltBox>...</LatLonAltBox> </Region> <Point>...</Point> </Placemark>
  26. 26. Region: Example 2: pop in and out <Placemark> <Region> <Lod> <minLodPixels>128</minLodPixels> <maxLodPixels>512</maxLodPixels> </Lod> <LatLonAltBox>...</LatLonAltBox> </Region> <Point>...</Point> </Placemark>
  27. 27. Region: Example 3: clean swap <Placemark id=quot;coarsequot;> <Region> <Lod> <!-- minLodPixels defaults to 0 --> <maxLodPixels>256</maxLodPixels> </Lod> <LatLonAltBox>...</LatLonAltBox> </Region> <Point>...</Point> <!-- quot;come look herequot; --> </Placemark>
  28. 28. Region: Example 3: clean swap <Placemark id=quot;finequot;> <Region> <Lod> <minLodPixels>256</minLodPixels> </Lod> <!-- maxLodPixels defaults to -1 quot;infinitequot; --> <LatLonAltBox>...</LatLonAltBox> </Region> <Polygon>...</Polygon> <!-- more detail --> </Placemark>
  29. 29. Region: NetworkLink <NetworkLink> <Region> <Lod> <minLodPixels>256</minLodPixels> </Lod> <LatLonAltBox>...</LatLonAltBox> </Region> <Link> <href>load-when-viewer-close-enough.kml</href> <viewRefreshMode>onRegion</viewRefreshMode> </Link> </NetworkLink>
  30. 30. Region: quot;RbNLquot; and tools cascade of Region-based NetworkLinks KML Layers code.google.com/p/regionator csvregionator.py - CSV -> RbNL placemarks.py - KML -> RbNL checklinks.py - walks RbNL checkregions.py - checks RbNL Regions code.google.com/p/libkml
  31. 31. Region: quot;RbNLquot; Google Earth layers Rumsey Historical Maps Gigapan/Gigapxl Photos YouTube Books News Weather
  32. 32. Region: SuperOverlay quot;RbNLquot; of GroundOverlays Examples: Google Earth Weather disaster imagery
  33. 33. Region: tips and tricks focus on Lod, especially minLodPixels minLodPixels most likely > 128 Region with any Feature including ScreenOverlay minLodPixels = 1/2 wid/ht of image tile 256x256 image -> minLodPixels 128 512 is 1/4 a typical screen
  34. 34. Time Feature TimeStamp TimeSpan Example: Google Earth Weather
  35. 35. Time: tips and tricks TimeStamp for Points TimeStamp: geographically non-coincident TimeSpan for Overlays TimeSpan: geographically coincident Containers cascade checkHideChildren
  36. 36. Update Change Create Delete Example: Santa
  37. 37. Update: Change <!-- original fetched with NetworkLink --> <kml xmlns=quot;www.opengis.net/kml/2.2quot;> <Folder> <Placemark id=quot;p1quot;> <name>Point @ 3,-4.2</name> <description>My movable Point</description> <styleUrl>#some-style</styleUrl> <Point> <extrude>true</extrude> <coordinates>3,4.2</coordinates> </Point> </Placemark> </Folder> </kml>
  38. 38. Update: Change <kml><NetworkLinkControl> <Update> <Change> <Placemark targetId=quot;p1quot;> <name>Point @ 3,-4.2</name> <Point> <coordinates>3,4.2</coordinates> </Point> </Placemark> </Change> </Update> </NetworkLinkControl> </kml>
  39. 39. Update: NetworkLinkControl and cookie <kml><NetworkLinkControl> <!-- name=value compat with cgi parsing --> <cookie>count=123</cookie> <Update> <Change> <Placemark targetId=quot;p1quot;> <Point> <coordinates>[coords for 123]</coordinates> </Point> </Placemark> </Change> </Update> </NetworkLinkControl></kml>
  40. 40. ExtendedData Feature Data: untyped data Schema and SchemaData: typed data quot;<xs:any>quot;: any XML balloon templating with shared style Example: Google Earth Weather (Metadata deprecated)
  41. 41. ExtendedData: Example: Weather <Placemark> <name>...</name> <styleUrl>http://.../style.kml#sunny</styleUrl> <ExtendedData>...</ExtendedData> <Point>...</Point> </Placemark>
  42. 42. ExtendedData: Example: Weather <!-- style.kml --> <Style id=quot;sunnyquot;> <IconStyle> <Icon><href>sunny.jpg</href></Icon> </IconStyle> <LabelStyle>...</LabelStyle> <BalloonStyle> <text> <!-- 50 entities replaced in one template --> ...<td>$[01_Temperature]</td>... </text> </BalloonStyle> </Style>
  43. 43. ExtendedData: Example: Weather <ExtendedData> <Data name=quot;locationquot;> <value>Shillong, IN as of 2008-05-28 17:00</value> </Data> <Data name=quot;00_Temperaturequot;> <value>80°F / 27°C</value> </Data> <Data name=quot;00_Phrasequot;> <value>Haze</value> </Data> </ExtendedData>
  44. 44. ExtendedData: Example: weather Feature Data: untyped data Schema and SchemaData: typed data quot;<xs:any>quot;: any XML balloon templating with shared style Example: Google Earth Weather (Metadata deprecated)
  45. 45. ExtendedData: tips and tricks ExtendedData/Data the comment trick
  46. 46. Future enhancement
  47. 47. Future enhancement ExtendedData XSD extension mechanism OGC SWG
  48. 48. Demo
  49. 49. code.google.com/apis/kml

×