Fossgis: alternative geostack - Volker MischeΒΆ

Tags: fossgis

An alternative geostack with geocouch, openlayers and jquery (mapquery).

CouchDB is an alternative database. Data doesn’t have to be structured as in SQL. You can put json into the database, for instance. It is a schema-free database: you can just add or remove attributes. Some of the advantages:

  • RESTful http API.
  • Build-in replication. Multi-master, even. Also for instance between your development machine and your laptop and your machine at home.
  • Robust.
  • Build-in webserver for accessing the data.

GeoCouch is an extension to CouchDB, a bit like postgis is to postgresql. It support every geojson kind of geometry.

As an example, he imported a shapefile. shp2geocouch is a script that does that. (Behind the scenes, ogr2ogr from gdal converts a shapefile to geojson). Then he showed a javascript query (yes, that’s CouchDB’s query language!) that returns every geometry. And then a simple http request that fires off that query with a bounding box.

The output of that query wasn’t usable yet in openlayers, as the output wasn’t geojson. The standard CouchDB solution is to just add another server-side javascript function that returns geojson. For the user, it is just a different URL he needs to call. Quite powerful.

Now on to the client side: mapquery. It is a sister to GeoExt geoext adds openlayers integration to extjs; mapquery adds openlayers integration to jquery. Why a jquery integration for openlayers?

  • Simpler API.
  • Less boilerplate code.
  • jQuery events.
  • Normal things should be easy, complex things should be possible.
  • Lots of peole already use jquery with openlayers, but everyone builds his own small wrapper: he wants to concentrate that effort into one project.

He showed a live demo and it looked nice, short and efficient.

Motto of the university: an active mind!
blog comments powered by Disqus
 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):