Skip to main content

Preview for gpkg files

Project description

Tests

ckanext-gpkg-view

Simple preview for GeoPackage files.

Features

  • Preview GeoPackage files as GeoJSON
  • Cache GeoJSON to avoid re-reading the file on subsequent views

Requirements

  • CKAN 2.10+
  • GeoPackage files
  • Python 3.8+

Installation

Use pypi to install the extension:

pip install ckanext-gpkg-view

Or install from source:

git clone https://github.com/DataShades/ckanext-gpkg-view.git
cd ckanext-gpkg-view
pip install -e .

Config settings

List of config settings:

version: 1
groups:
  - annotation: ckanext-gpkg-view
    options:
      - key: ckanext.gpkg_view.max_file_size
        description: Maximum file size for GPKG files
        default: 25600000 # 25MB
        type: int
        editable: true

      - key: ckanext.gpkg_view.cache_duration
        description: Cache duration for GPKG files
        default: 21600 # 6 hours
        type: int
        editable: true

      - key: ckanext.gpkg_view.cache_enabled
        description: Enable caching for GPKG files
        default: true
        type: bool
        editable: true

      - key: ckanext.gpkg_view.simplify_tolerance
        description: |
          The simplification tolerance in the units of the coordinate reference
          system (CRS). Higher = more simplification. 0 = no simplification.
        default: 0
        type: int
        editable: true

Tests

To run the tests, do:

pytest --ckan-ini=test.ini

License

AGPL

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ckanext_gpkg_view-0.0.2.tar.gz (117.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ckanext_gpkg_view-0.0.2-py3-none-any.whl (119.4 kB view details)

Uploaded Python 3

File details

Details for the file ckanext_gpkg_view-0.0.2.tar.gz.

File metadata

  • Download URL: ckanext_gpkg_view-0.0.2.tar.gz
  • Upload date:
  • Size: 117.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for ckanext_gpkg_view-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7a8a9224669632263d40dacbd10033d3ad77598d90b5c30c9ca30080397e8101
MD5 6fb73398f448e1dd52cd2ffb698164ae
BLAKE2b-256 be8397fd307775db991a9963044e4db7fb4e4980b8db65f1e4a1b5ea782201a7

See more details on using hashes here.

File details

Details for the file ckanext_gpkg_view-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ckanext_gpkg_view-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c6dcab7b05a6009d85c0997ac7bb2325d24566464dc9da13b4a157f5d4d23c35
MD5 f2c5ea6e5bdabb52d5e7e4ab7b03a7a0
BLAKE2b-256 e473d2374552fa90625fbac378ff6ec1cd3e9e4fadba16ed2d34dfc447c7fefb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page