Monday, March 26, 2007

I'll Take a SWIG of that OGR

The recent releases of GDAL/OGR have seen a sudden explosion of good .NET bindings, courtesy of Tamas Szekeres and SWIG.

SWIG can't be all bad if they have supported Scheme and OCaml from very early versions. Tamas has done a great job of attacking the wrappers for .NET (implemented in C#). I hope to start contributing some patches for the functions I'm interested in.

All abstractions are leaky, and SWIG can't hide the very 1990's C++ nature of OGR. All of the objects are very stateful, and one must be careful to dispose of them properly. It would be nice to hide them in some immutable, functional-programming-friendly objects that obeyed some of the better .NET idioms. Once we had those, I think we'd be in good shape to visit the promised land of unified data access for spatial and non-spatial data. Sure, I could use all the cool OGR drivers or ArcObjects functions and pretend the whole world is just attributes clinging for life to an IGeometry. Or I could use simple ADO.NET and not know an IGeometry from a BLOB. But I think with the right projection libraries, DB OGC support, and a clever IDbDataAdapter, it would be a promised land.

Sunday, March 25, 2007

Who was at the ESRI Developer Summit? Not Java Programmers!

The ESRI celebrity bloggers made a showing, but as expected the vast majority of attendees were from governmental organizations. Forestry services, county employees, and the raft of consulting companies that support them. It's clear everyone is programming in .NET these days. Sessions like "Developing AJAX ADF applications in .NET" packed in well over three hundred people. The equivalent session for Java desktop development could easily have been held in a small kitchen.

Between sessions people were encouraged to hang out in the "Meeting Center", an amply-caffeinated room where ESRI programmers made themselves available for chatting after their talks. IBM sponsored a "Java Lounge" for like-minded Java programmers to buzz about and get excited. The one time we saw anyone there I had to take a picture -- and I swear he was reading want ads.

With Microsoft recently cancelling even the fig leaf of Java support they once maintained, what does all this mean for enterprise GIS programming? It doesn't seem good. The Java and C++ GIS options are all either firmly open source or Oracle-biased, while the .NET programmers are ESRI-bound. Open source .NET GIS projects seem to all die on the vine. And yet SQL Server still has no native spatial type. It seems as though the enterprise GIS development community remains strongly bifurcated between vendors like IBM, Postgresql (and even a bit of Oracle) who are embracing open source yet don't command big market share, and vendors like Microsoft and ESRI who seem content to overcharge for extensions to their monopolies. (And snatch up .NET GIS luminaries before they can do damage). I understand their motivation commercially, but this bifurcation stunts the larger GIS community.

Google and Yahoo are leading a revolution in public awareness of GIS, but haven't made many waves yet in the enterprise software space. That's too much of a wild-card for me to speculate on, even with a belly full of poached pears and Grand Marnier!