Blog

Geo-spatial features

  • David Read
  • 17 Oct 2011
Geo-spatial features are now surfacing in CKAN! Two weeks ago Adria announced the new 'spatial' property for datasets. This allows you to associate a dataset with a place on a map - a point, or a polygon.  
CKAN uses PostGIS to store the spatial property, so you can do a spatial search of datasets. For example you can search in a bounding box for datasets: http://test.ckan.net/api/2/search/package/geo?bbox=-180,-90,90,180
Returns:
{"count": 3, "results": ["bb22bf62-6816-4b5f-97ea-ca8e8a4ce60c", "5016d4fe-acd8-42f7-bb7a-e0fb50a5e1fc", "0145ab94-ea32-4994-90e4-a227a22f3e68"]}
And CKAN can also preview geographic dataset or services, like for example Web Map Services (WMS):
CKAN can also collect geographic data and serve it through a CSW interface, although only the basic parts of the standard are currently supported. Our aim is to offer support for INSPIRE, a directive of the European Union to harmonize geographic data catalogues. When this was announced, there was a flurry of interest in the community and we're excited to take these basics and develop them into fully fledged features. In an open Skype meeting last Thursday, we discussed the next moves and there are three key prongs of attack:
  • Let users draw points and polygons on the map widget. This is not only for choosing where to search, but also for registering a dataset - you can easily indicate where it applies.
  • Georeferencing place names. This will allow you to type "London" and for the polygon of London to be marked on the map.
  • Explore integrating PyCSW. This is a full-blown high-quality CSW service.
As ever, we are pleased to hear from potential partners, developers and anyone else that can contribute to CKAN providing a better open source platform for geo-data.