Print This Post

GeoWeb – Part II – GML and KML

So what is the difference between GML and KML (Google)? I think one the big differences is that there is a big well known styling engine for KML called Google Earth. If I create some GML data – what then? Well I have to have a style engine and a rednering engine to make a map. Is that difficult? Nope – but it is not no work either. To get a style engine is NOT so hard – just any sort of XSLT engine will do the trick. And for rendering the output of the styling process (typically SVG) you need something like the Adobe plugin for SVG or the Batik libraries to turn it into an image (PNG, TIF, JPEG). Note that SVG allows image underlays – so that part is easy too. Google Earth provides you a ready to hand set of images (of their choosing) with Global coverage. So am I saying I can make my own Google Earth. Yes – I guess that is what I am saying. Here is the basic recipe. Let's leave the Google Earth images out of it for the moment.

  • You get SAXON or some other XSLT engine. Install SAXON as a servlet.
  • You write a style sheet for your GML data to SVG.
  • You install the Adobe SVG plugin in your browser (or other SVG renderer)
  • You create your GML data file – just like you do for Google – only following GML instead of KML.
  • You create a web page that sends the style sheet reference (URL) and the data reference (URL) to GML to the servlet.
  • You get back SVG which appears in your SVG viewer.
  • This could be extended to include an image referenced in the request as well since SVG viewers support image underlays.

There you have your own Mini-Google.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>