Posts

Showing posts from October, 2013

Java and KML Files

What is a KML file.? A Keyhole Markup Language File (KML) is a markup language to describe geographic data. How does it relate to Java.? An API exists ( which appears quite old ) which can process KML files. Either producing them or turning the KML files into Java objects. ( Marshalling or Unmarshalling ) Problem ? I recently downloaded some geographic data from a public dataset which was expressed as a KML file. Its my intention to use that data in a sample application. However I had a huge problem getting the API to un-marshall the data. It had a major problem with the namespace in the dataset. This namespace causes the API major problems. <kml xmlns="http://earth.google.com/kml/2.1"> After numerous hours I found this worked. ( so I replaced the above with the below ) <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom=...