From 4d31971f9885cefd81672fb5bbfa2512adbd3e5f Mon Sep 17 00:00:00 2001 From: MarkCalvert <37602611+MarkCalvert@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:28:58 +1300 Subject: [PATCH 1/2] Installed spatial dependencies Enabled spatial plugins Added spatial config value --- ckan/config/dbca.ini | 7 ++++++- ckan/setup/dbca_requirements.sh | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ckan/config/dbca.ini b/ckan/config/dbca.ini index ecc26b86..31aa814a 100644 --- a/ckan/config/dbca.ini +++ b/ckan/config/dbca.ini @@ -10,7 +10,7 @@ use = config:/srv/app/ckan.ini ckan.devserver.watch_patterns = /srv/app/ckan.ini ## Plugins Settings ############################################################ -ckan.plugins = image_view text_view datatables_view pdf_view datastore xloader pages showcase hierarchy_display hierarchy_form hierarchy_group_form dcat envvars +ckan.plugins = image_view text_view datatables_view pdf_view datastore xloader pages showcase hierarchy_display hierarchy_form hierarchy_group_form dcat spatial_metadata spatial_query envvars ## Resource Views Settings ##################################################### ckan.views.default_views = text_view datatables_view pdf_view @@ -21,6 +21,11 @@ ckan.display_timezone = Australia/West ## CKAN Extensions configuration ############################################### +# ckanext-spatial +ckanext.spatial.search_backend = solr-bbox +ckanext.spatial.common_map.custom.url = https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}@2x.png +ckanext.spatial.common_map.type = custom + ## Logging configuration [loggers] diff --git a/ckan/setup/dbca_requirements.sh b/ckan/setup/dbca_requirements.sh index 9ffcbe63..db41274c 100644 --- a/ckan/setup/dbca_requirements.sh +++ b/ckan/setup/dbca_requirements.sh @@ -35,6 +35,13 @@ pip3 install -r ${SRC_DIR}/ckanext-showcase/requirements.txt pip3 install -e 'git+https://github.com/ckan/ckanext-scheming.git@release-3.0.0#egg=ckanext-scheming' # Spatial +# dependencies +export PROJ_DIR=/usr +apk add --no-cache \ + geos \ + geos-dev \ + proj-util \ + proj-dev pip3 install -e git+https://github.com/ckan/ckanext-spatial.git@v2.1.1#egg=ckanext-spatial pip3 install -r ${SRC_DIR}/ckanext-spatial/requirements.txt From 235807b3c10ab88b2c230416c97d9acd63cc1ed9 Mon Sep 17 00:00:00 2001 From: MarkCalvert <37602611+MarkCalvert@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:31:45 +1300 Subject: [PATCH 2/2] Enabled dbca plugin --- ckan/config/dbca.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckan/config/dbca.ini b/ckan/config/dbca.ini index 31aa814a..1e1c5561 100644 --- a/ckan/config/dbca.ini +++ b/ckan/config/dbca.ini @@ -10,7 +10,7 @@ use = config:/srv/app/ckan.ini ckan.devserver.watch_patterns = /srv/app/ckan.ini ## Plugins Settings ############################################################ -ckan.plugins = image_view text_view datatables_view pdf_view datastore xloader pages showcase hierarchy_display hierarchy_form hierarchy_group_form dcat spatial_metadata spatial_query envvars +ckan.plugins = image_view text_view datatables_view pdf_view datastore xloader pages showcase hierarchy_display hierarchy_form hierarchy_group_form dcat dbca spatial_metadata spatial_query envvars ## Resource Views Settings ##################################################### ckan.views.default_views = text_view datatables_view pdf_view