ckanext-gztr

Configuration

Explore how to configure ckanext-gztr along with the various configuration options.

Configuration banner

Configuring ckanext-gztr

Here we will go over the steps involved for customizing your installation of ckanext-gztr followed by all of the available configuration options. For maximum configuration you could fork the ckanext-gztr git repository, make your own changes, and then use that fork for your use cases. However we attempt to consolidate some configurable options used throughout ckanext-gztr that may be common for various use cases.

Modify your CKAN config INI file or environment variables

The extension provides multiple configuration options that can be defined in your CKAN configuration file, which in a CKAN source install is available at /etc/ckan/default/ckan.ini by default. You can add these options and values to customize your installation of ckanext-gztr for your CKAN instance for the next time you run your CKAN instance (e.g. by running ckan -c /etc/ckan/default/ckan.ini run). The available configuration options are listed further below on this page.

If you use ckanext-envvars then each configuration option should be modifiable by environment variable declarations. For example the ckanext.gztr.dataset_publisher.tiles_url configuration option can have its value set by the environment variable CKANEXT__GZTR__DATASET_PUBLISHER__TILES_URL. This method can be useful when deploying CKAN with Docker or Docker Compose.

Updating ckanext-gztr

As ckanext-gztr is developed over time, existing or new configuration changes may occur and therefore we recommend reviewing release notes for each release of ckanext-gztr to learn which configuration options you may have to update for your CKAN instance when updating ckanext-gztr. You can "Watch" the GitHub repository to get notified by email for updates.

List of configuration/environment variables

You can copy and paste the following code block to modify it for your CKAN instance.

The code block below is scrollable.
# ckanext-gztr configuration (more info at https://gztr.dathere.com/docs/configuration)

# == ckanext-gztr | ckanext-scheming options ==

# (mandatory)
ckan.scheming.presets = ckanext.scheming:presets.json ckanext.gztr:schemas/presets.yaml
# (mandatory)
ckan.scheming.dataset.schemas = ckanext.gztr:schemas/dataset.yaml

# == ckanext-gztr | SOLR options ==

# (mandatory)
ckan.search.solr_allowed_query_parsers = field

# == ckanext-gztr | Storage options (more info at https://docs.ckan.org/en/latest/maintaining/filestore.html#setup-file-storages) ==

# The gztr storage type, in this case based on the filesystem.
# (mandatory)
ckan.files.storage.gztr.type = ckan:fs
# The path to the gztr storage on the filesystem.
# (mandatory)
ckan.files.storage.gztr.path = /var/lib/ckan/storage/uploads/gztr
# Creates the `gztr` directory if it doesn't exist.
# (mandatory)
ckan.files.storage.gztr.initialize = true
# Makes all gztr storage files publicly downloadable.
# (mandatory)
ckan.files.storage.gztr.public = true

# == ckanext-gztr | Dataset publisher gazetteer options ==

# Vector tile server URL.
# Raster tiles and PMTiles are not currently supported.
# (mandatory)
ckanext.gztr.dataset_publisher.tiles_url = 
# The default center latitude of the map.
# (recommended)
ckanext.gztr.dataset_publisher.default_latitude = 34.307144
# The default center longitude of the map.
# (recommended)
ckanext.gztr.dataset_publisher.default_longitude = -106.018066
# The initial zoom level of the map.
# (recommended)
ckanext.gztr.dataset_publisher.default_zoom = 5
# The space-separated boundaries of the map (e.g. continental USA)
# (recommended)
ckanext.gztr.dataset_publisher.max_bounds = -134.428711 14.349548 -61.611328 52.536273
# Disable drawing custom polygons for dataset publishers.
# Set this to true if you want data publishers to only use preset features provided by the sysadmin.
# (optional)
ckanext.gztr.dataset_publisher.disable_drawn_features = false
# Modify the height of the map shown in the modal (note that there is already a fullscreen button if needed).
# (optional)
ckanext.gztr.dataset_publisher.dialog_map_height = 60vh
# Disable the address search feature which uses the external Nominatim API.
# (optional)
ckanext.gztr.dataset_publisher.disable_address_search = false
# Select an engine for parsing GeoParquet for usage in the gazetteers.
# - hyparquet: recommended (enabled by default) for lowest bandwidth costs through cloud-native geospatial methodology
# - duckdb: downloads DuckDB WASM from jsdelivr.com which is slow on first request then cached on subsequent requests
# - sedonadb: not recommended, slowest implementation as it converts GeoParquet to GeoJSON and the user downloads GeoJSON
# (recommended)
ckanext.gztr.dataset_publisher.geoparquet_engine = hyparquet
# In a geospatial collection's info modal, display a clickable JSON file icon button to open the corresponding STAC collection page.
# (optional)
ckanext.gztr.dataset_publisher.enable_stac_collection_json_button = true
# In a geospatial collection's info modal, display a clickable download icon button to download the collection as a file (e.g. GeoParquet).
# (optional)
ckanext.gztr.dataset_publisher.enable_stac_collection_download_button = true

# == ckanext-gztr | Public search gazetteer options ==

# Vector tile server URL.
# Raster tiles and PMTiles are not currently supported.
# (mandatory)
ckanext.gztr.public_search.tiles_url = 
# The default center latitude of the maps.
# (recommended)
ckanext.gztr.public_search.default_latitude = 34.307144
# The default center longitude of the maps.
# (recommended)
ckanext.gztr.public_search.default_longitude = -106.018066
# The initial zoom level of the maps.
# (recommended)
ckanext.gztr.public_search.default_zoom = 5
# The space-separated boundaries of the map (e.g. continental USA)
# (recommended)
ckanext.gztr.public_search.max_bounds = -134.428711 14.349548 -61.611328 52.536273
# Disable the address search feature which uses Nominatim.
# (optional)
ckanext.gztr.public_search.disable_address_search = false
# Allow public users to click a JSON info icon button to open the STAC collection info JSON page.
# (optional)
ckanext.gztr.public_search.enable_stac_collection_json_button = false
# Allow public users to click a download icon button to download a geospatial collection (e.g. GeoParquet file).
# (optional)
ckanext.gztr.public_search.enable_stac_collection_download_button = true

# == ckanext-gztr | Public search minimap options ==

# MapLibre-specific config about the source data
# Refer to https://maplibre.org/maplibre-style-spec/sources for more info

# Vector, Raster, or PMTiles (using the pmtiles:// protocol) server URL.
# (mandatory)
ckanext.gztr.public_search_minimap.tiles_url =
# The type of the source, either vector or raster
# (mandatory)
ckanext.gztr.public_search_minimap.tiles_type = vector
# Attribution HTML (e.g. an HTML anchor tag with a link using href)
# NOTE: As a sysadmin, make sure this is safe HTML!
# (recommended)
ckanext.gztr.public_search_minimap.attribution_html =
# The space-separated boundaries of the minimap (e.g. continental USA)
# (recommended)
ckanext.gztr.public_search_minimap.max_bounds = -134.428711 14.349548 -61.611328 52.536273
# The maximum zoom level that the tiles would be retrieved for
# (optional)
ckanext.gztr.public_search_minimap.max_zoom = 19

# == ckanext-gztr | Geoconnex options (more info at https://gztr.dathere.com/docs/geoconnex-integration) ==

# (optional)
ckanext.gztr.geoconnex.enabled = false
# The namespace that should exist in the namespaces/bulk/ckan directory at https://github.com/internetofwater/geoconnex.us
# (optional)
ckanext.gztr.geoconnex.namespace = 
# Embeds Geoconnex-compatible JSON-LD within each compatible CKAN dataset's landing page
# (optional)
ckanext.gztr.geoconnex.enable_dataset_jsonld = false

On this page