ckanext-geonode: a GeoNode harvester for CKAN
This extensions implements a GeoNode harvester using GeoNode’s own API.
Even if GeoNode layers may be queried using CSW, you can’t get maps or documents as CSW records.
Furthermore, by using the internal API for layers also, we can retrieve some more information that
are not published along with the CSW metadata.
Compatibility
This extension has been tested using python 3.7 and CKAN2.9.
For previous versions of CKAN please use the tag pre-py3
Installation
Clone the project:
“`bash
git clone https://github.com/https://github.com/geosolutions-it/ckanext-geonode.git
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-geonode requirements into your virtual environment:
cd ckanext-geonode
(venv) $ pip install -r requirements.txt
Install the ckanext-geonode Python package into your virtual environment:
(venv) $ pip install -e .
Configuration
- Make sure the CKAN configuration ini file contains the
geonode_harvester plugin, as
well as the harvest plugin (provided in the ckanext-harvest plugin)::
ini
ckan.plugins = [...] harvest [...] geonode_harvester
Harvester configuration
When creating/editing a geonode harvester instance, you may use these configuration items:
import: used to harvest only some resources subtypes (layers, maps, docs).
By default the harvester will read all subtypes; If the import configuration is given,
only the selected entries will be harvested.
e.g.
json
{"import": {"maps": true}}
dynamic_mapping: add values to local dataset according to values in the GeoNode resource; you can add tags, extras, or associate the dataset to groups.
See next section