I think the question is more, where doesn't it?
Suitable for:
curl http://sidelab.iriscouch.com/seattle_neighbourhood/c0d5867266787565c510f5a7e20000f2
{
"lat/lng": "47.612237, -122.290868",
"_id": "c0d5867266787565c510f5a7e20000f2",
"_rev": "3-3b75f0b5202e28c14de19addcc2b8d3d",
"Website": "http://www.seattleschools.org/schools/madrona/",
"Address": "1121 33rd Ave",
"Latitude": "47.612237",
"City Feature": "Alternative Schools",
"Longitude": "-122.290868",
"Common Name": "Madrona K-8"
}
NOTE: While this data has lat/lng data it is not in an ideal form, for GeoCouch to use.
New data can be added through use of the HTTP PUT method:
curl -X PUT http://sidelab.iriscouch.com/test/test -d '{"type":"Feature", "color":"orange" ,"geometry":{"type":"Point","coordinates":[11.395,48.949444]}}'
{
"ok":true,
"id":"test",
"rev":"1-2eeb1e5eee6c8e7507b671aa7d5b0654"
}
I consider CouchDB to be quite a deep product, that is easy to get started with but a while to master.
We will touch on other aspects of CouchDB as relevant to this talk.
From my personal observations, location based data (with particular reference to Point of Interest data) generally contains:
Effectively storing these custom attributes in an RDBMS, is generally painful and ugly.
Scripting and interaction with the HTTP API.
Check out Todd Jackson's post at:
http://boomphisto.blogspot.com.au/2011/10/serving-up-geojson-while-having-rest-on.html
Tools such as shp2geocouch
(ruby): https://github.com/maxogden/shp2geocouch (Not sure if this is still activately maintained).
GDAL >= 1.9.0 support for CouchDB
Given you lot are spatial types, I'm going to recommend using GDAL (>= 1.9.0), and in particular the ogr2ogr
tool.
ogr2ogr -f couchdb "couchdb:http://yourname.iriscouch.com/parking" sourcedata.shp -nln boundaries -overwrite
Credentials can be passed in using the COUCHDB_USERPWD
environment variable:
COUCHDB_USERPWD=admin:yourpass ogr2ogr -f couchdb "couchdb:http://yourname.iriscouch.com/parking" sourcedata.shp -nln boundaries -overwrite
More info: http://www.gdal.org/ogr/drv_couchdb.html
shp2geocouch
or ogr2ogr
tools would not be encouraged in a production situation, as it will impact CouchDB replication and the _changes
feed.GeoCouch (see https://github.com/couchbase/geocouch) is a set of spatial extensions for CouchDB.
Given CouchDB's capabilities as a webserver this opens up opportunities for much lighter weight, but still very capable geospatial web apps.
Checkout a great talk from Volker Mische, GeoCouch's creator here: http://www.couchbase.com/slides/geocouch/CCSF
The simplest way to get started with GeoCouch is through using a free couch instance at http://iriscouch.com/.
Uploading design docs into CouchDB is the hardest part.
This generally true of CouchDB, but CouchApps can help
Some clever individuals came up with the concept of a CouchApp (see http://couchapp.org/).
Writing a CouchApp means you are deploying both your application and data into couch, and serving it using the internal webserver.
There are a number of tool available to help with the process of deploying a CouchApp into a CouchDB instance (including IrisCouch, CloudAnt, etc):