CKAN Geospatial ResourceView
Project description
This extension contains view plugins to display geospatial files and services in CKAN. It was originally developed by Philippe Duchesne.
Note: This is a work in progress, if you can help with OpenLayers or Leaflet development, check the Issues section for what needs to be done or add a new issue.
Installation
To install ckanext-geoview on a production site:
Activate your CKAN virtual environment, for example:
source /usr/lib/ckan/default/bin/activate
Install the ckanext-geoview Python package into your virtual environment:
pip install ckanext-geoview
Add the relevant plugins to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini). Check Available plugins to see which ones are available and if they require further configuration.
Add the resource_proxy plugin to the ckan.plugins setting.
Restart CKAN. For example if you’ve deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
Development Installation
To install ckanext-geoview for development, activate your CKAN virtualenv and do:
git clone https://github.com/ckan/ckanext-geoview.git cd ckanext-geoview python setup.py develop
Available plugins
OpenLayers Viewer
The OpenLayers viewer provides access to different geospatial formats and services:
To enable it, add geo_view to your ckan.plugins setting. (use geo_preview if you are using CKAN < 2.3):
ckan.plugins = ... resource_proxy geo_view
On CKAN >= 2.3, if you want the geospatial views to be created by default, add the plugin to the following setting:
ckan.views.default_views = ... geo_view
The formats and services supported are:
Type |
Resource format (*) |
---|---|
Web Map Service (WMS) |
wms |
Web Feature Service (WFS) |
wfs |
GeoJSON |
geojson |
GML |
gml |
KML |
kml |
ArcGIS REST API |
arcgis_rest |
Google Fusion Tables |
gft |
(*) Resource formats are case insensitive
Support varies across formats, so you might want to deactivate the ones you are not interested in. To choose which formats to display, set the following configuration option:
ckanext.geoview.ol_viewer.formats = wms kml
To render Google Fusion Tables resources, a Google API Key must be provided in the ini file:
ckanext.geoview.gapi_key = <API Key here>
This key must be granted Fusion Tables permissions. More information on obtaining such a key can be found at https://developers.google.com/fusiontables/docs/v1/using#APIKey.
Common base layers for Map Widgets
The geospatial view plugins support the same base map configurations than the ckanext-spatial widgets.
Check the following page to learn how to choose a different base map layer (MapQuest Open, MapBox or custom):
http://docs.ckan.org/projects/ckanext-spatial/en/latest/map-widgets.html
Registering ckanext-geoview on PyPI
ckanext-geoview should be availabe on PyPI as https://pypi-hypernode.com/pypi/ckanext-geoview. If that link doesn’t work, then you can register the project on PyPI for the first time by following these steps:
Create a source distribution of the project:
python setup.py sdist
Register the project:
python setup.py register
Upload the source distribution to PyPI:
python setup.py sdist upload
Tag the first release of the project on GitHub with the version number from the setup.py file. For example if the version number in setup.py is 0.0.1 then do:
git tag 0.0.1 git push --tags
Releasing a new version of ckanext-geoview
ckanext-geoview is availabe on PyPI as https://pypi-hypernode.com/pypi/ckanext-geoview. To publish a new version to PyPI follow these steps:
Update the version number in the setup.py file. See PEP 440 for how to choose version numbers.
Create a source distribution of the new version:
python setup.py sdist
Upload the source distribution to PyPI:
python setup.py sdist upload
Tag the new release of the project on GitHub with the version number from the setup.py file. For example if the version number in setup.py is 0.0.2 then do:
git tag 0.0.2 git push --tags
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ckanext-geoview-0.0.3.tar.gz
.
File metadata
- Download URL: ckanext-geoview-0.0.3.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 502b2a8550847f81a9bb4d4cd7305a86c73d8deae02e9e445782a2c5da31b173 |
|
MD5 | 3d3ee54b32cbbb1c72a458dc4957b6b1 |
|
BLAKE2b-256 | 404b0742ab8850c62506c6acfbe0ce379001be020a2d1c7c73165a2e4355f477 |