Blog

Geospatial update: MapBox, pycsw, and CKAN at FOSS4G

  • Adrià Mercader
  • 20 Apr 2021
There has been a lot of recent work on CKAN's popular and widely used spatial extension. The extension adds a spatial field to datasets and allows spatial metadata to be harvested from a variety of sources, queried (including with a map search), and exposed using the CSW standard for geospatial discovery. It also provides map previews for spatial data formats such as GeoJSON. In this post I'll describe two major new features, an overhaul and expansion of the documentation, and a recent presentation at FOSS4G, the open-source geospatial conference.

Support for MapBox and other tiles

The spatial extension displays maps for various purposes. By default, these uses MapQuest-OSM tiles, based on OpenStreetMap data and provided by MapQuest. However, users wanting to customize the default maps for their own instances can now use map tiles hosted on MapBox. MapBox makes it really easy to create beautiful custom maps, using their online editor or the more advanced TileMill desktop tool. To use your own tiles, you just need to set a couple of configuration options to enjoy their handcrafted maps. You can see the MapBox tiles in action in the screenshot of a file preview below, or on our demo site, and all details to set it up yourself can be found in the documentation here. [Image: map preview] Support for custom tiles is not limited to MapBox: any tileset that follows the XYZ convention for web maps can be used on the widgets of your CKAN instance, even Stamen's famous watercolor maps, as in the example below of map-based search filtering: [Image: watercolour tiles]

Integration with pycsw

CKAN offers support for the CSW standard, a specification from the Open Geospatial Consortium for exposing geospatial catalogues over the web. CKAN can both harvest remote CSW servers, and expose its own records via a CSW interface. Until now, the latter has been done via a custom plugin, which provided a very limited subset of the specification and was quite flaky. To improve that we have added features to integrate with pycsw, an excellent open source Python library that provides a full CSW implementation. At present only datasets harvested from other spatial sources can be exposed via pycsw, but hopefully more general support will be added in the future. To find out more about CKAN and CSW, look at the documentation.

New and revamped documentation

The documentation had outgrown the README file and was hard to follow, so we moved it into proper Sphinx docs hosted online with the core CKAN docs. The full geospatial extension docs are now at docs.ckan.org/projects/ckanext-spatial. This wasn't just a cosmetic change: all the documentation has been restructured, cleaned up and updated, so hopefully topics like installation, geo-indexing datasets and the spatial harvesters are now clearer and easier to set up. We aim to do a similar job soon updating the documentation for the spatial extension's favourite companion, the harvester extension. As usual, any suggestions or pull requests to improve the documentation are very welcome.

CKAN at FOSS4G

FOSS4G is the main international conference for open source geospatial software. It is organized by different local chapters of OSGeo, an organization that promotes, incubates and fosters communities around free geo-related projects. This year we dropped in to Nottigham in the UK to present CKAN at FOSS4G for the first time ever. Although not as popular as other veteran catalogues like GeoNetwork or GeoNode, CKAN is starting to be well known in the geospatial community, and there was a lot of interest in potential features and integration with other tools. Sadly the presentation doesn't seem to have been recorded, but you can check out the slides here, or download them as PDF (5.5 Mb).