This extension contains plugins that add geospatial capabilities to CKAN, including:
- A spatial field on the default CKAN dataset schema, that uses PostGIS as the backend and allows to perform spatial queries and to display the dataset extent on the frontend.
- Harvesters to import geospatial metadata into CKAN from other sources in ISO 19139 format and others.
- Commands to support the CSW standard using pycsw.
Note: The view plugins for rendering spatial formats like GeoJSON have been moved to ckanext-geoview.
Old documentation, including installation instructions, can be found at:
https://docs.ckan.org/projects/ckanext-spatial/en/latest/
For TWDH installation (CKAN 2.9.5 on Ubuntu 20.04 LTS), first ensure you have ckanext-harvest installed using a Redis backend.
Afterwards, do the following:
. /usr/lib/ckan/default/bin/activate sudo apt-get install postgis sudo -u postgres psql -d ckan_default -f /usr/share/postgresql/12/contrib/postgis-3.0/postgis.sql sudo -u postgres psql -d ckan_default -f /usr/share/postgresql/12/contrib/postgis-3.0/spatial_ref_sys.sql sudo -u postgres psql -d ckan_default -c 'ALTER VIEW geometry_columns OWNER TO ckan_default;' sudo -u postgres psql -d ckan_default -c 'ALTER TABLE spatial_ref_sys OWNER TO ckan_default;' cd /usr/lib/ckan/default/src git clone https://github.com/dathere/ckanext-spatial cd ckanext-spatial pip install -r requirements.txt sudo apt-get install python3-dev libxml2-dev libxslt1-dev libgeos-c1v5 python setup.py develop
then add ckanext-spatial to your ckan.ini plugins:
ckan.plugins = ... twdh_theme harvest ckan_harvester spatial_metadata spatial_query twdh_schema ...
and restart CKAN:
sudo service supervisor reload
For contributing to ckanext-spatial or its documentation, follow the same guidelines that apply to CKAN core, described in CONTRIBUTING.
This material is copyright (c) 2011-2021 Open Knowledge Foundation and contributors.
It is open and licensed under the GNU Affero General Public License (AGPL) v3.0 whose full text may be found at: