Monday, April 14, 2008

KML, libkml and the "standard" mistake

Passing off KML to the OGC so it could become a "standard" was a big mistake for Google.

I consider myself well versed in the KML format since I just implemented most of it's features, and found them to be needing much more in the way of styling. KML will now change at a glacial rate due to the standards process, right when it needs to change the most! Google Earth's feature set will now become dictated by an outside entity, with their input of course, but that's no way to develop software! Why would they cripple Google Earth like that?

Also libkml has been released and it was exactly what I thought it would be, a glorified xml validation script for the kml dialect. I predict that no significant software will choose to link that library in.

I have to say the lamest thing about KML is the whole Style/StyleMap tag collection that enables one to set a separate style on an icon for mouse-over events. It's a great way to have a non-standardized interface since everyone rolls their own mouse-over effect for each placemark style!

I've implemented a few of my own extensions to the KML format which I will go into detail about later. They are mostly aimed at visibility and styling extensions. One of the most useful extensions is the tag which allows one to control the visibility of a Feature element (Placemark or GroundOverlay) globally based on camera elevation. This is much easier than setting up one of those elements, especially for a single placemark.

5 comments:

lxnyce said...

I really agree with you thoughts about KML and standardizing, however I kind of like the idea of having a library that does all the hard lifting for me.

Like yourself, I have implemented KML readers in the past. I transitioned to using LibKML recently, and I must say the library is ... for the lack of better words, not pretty.

It looks like they had some intern slap it together for them. It's hard to follow and the amount of hierarchies you have to go through is quite ridiculous.

The compelling argument I keep telling myself, is that updates to the reader will come automatic. Deep down, I know this is just me trying to validate using the library. The reality is that new features won't break old ones, so using the library won't give you them for free.

As of right now, I haven't seen a good reason to use the library really. It doesn't handle LOD calculations or region calculations for you. It simply parses the file and gives you interfaces for the data. I am hoping once I hit styles, using the library will pay off. I implemented the style map in the past, but hopefully this library will do all the aggregation for me.

jasonbirch.com said...

I respectfully disagree. Now is the most important time to standardise KML, before all of the implementers start adding their own extensions and we end up with the mess that HTML became.

I expect Google to be heavily involved in shaping KML through the OGC, and although I don't doubt that this will slow innovation, I feel that standardisation is worth it.

libkml is incredibly alpha right now; the release notes talk about adding higher level functionality, so hopefully some of the levels of hierarchy will go away for common operations.

lxnyce said...

I agree with you Jason to a certain level. The standardization will keep out foreign extensions.

However, where I disagree, is that by standardizing, the format ends up being frozen. While I am no fan of Google holding onto a format, perhaps it's best to let them innovate atop the format at a much higher rate (listening to their huge user base requests), rather than let it stay stagnant for a year or two, then release updates that were useful a year or two ago.

Michael Ashbridge said...

I'll happily take some heat for the lack of higher level functionality in the current preview release of libkml. Indeed, the second sentence of the release notes cautions against use in production code at this early stage. :-)

We do intend to implement various higher level "engine" elements such as style merging. Thanks for the very constructive criticism, lxnyce. Good to hear that we're headed in the right direction.

followers-like said...

free instagram followers for all users.