Skip to content

Add GeoPackage data format #709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

elifsu-simula
Copy link
Collaborator

@elifsu-simula elifsu-simula commented May 19, 2025

Description

Added support for GeoPackage data format, both to UI and to Python API, using the library geopackage-js.

I added a test for Python API but didn't add a UI test. I also did not add support for exporting GeoPackage layers to QGIS. If asked, I can do these either in this PR or another PR.

Checklist

  • PR has a descriptive title and content.
  • PR description contains references to any issues the PR resolves, e.g. Resolves #XXX.
  • PR has one of the labels: documentation, bug, enhancement, feature, maintenance
  • Checks are passing.
    Failing lint checks can be resolved with:
    • pre-commit run --all-files
    • jlpm run lint

📚 Documentation preview: https://jupytergis--709.org.readthedocs.build/en/709/
💡 JupyterLite preview: https://jupytergis--709.org.readthedocs.build/en/709/lite

Copy link
Contributor

Binder 👈 Launch a Binder on branch elifsu-simula/jupytergis/add_geopackage_data_format

@elifsu-simula elifsu-simula marked this pull request as draft May 19, 2025 11:22
# Conflicts:
#	packages/base/src/constants.ts
#	packages/base/src/toolbar/widget.tsx
#	python/jupytergis_lab/jupytergis_lab/notebook/objects/__init__.py
#	yarn.lock
@elifsu-simula elifsu-simula added the enhancement New feature or request label May 19, 2025
Copy link
Contributor

Integration tests report: appsharing.space

@elifsu-simula elifsu-simula marked this pull request as ready for review May 19, 2025 13:11
@martinRenou martinRenou moved this from Todo to In Progress in JupyterGIS Prioritization Jun 2, 2025

const tables = gpkg.getFeatureTables();
const features: GeoJSON.Feature[] = [];
for (const tableName of tables) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, the user should get a chance to choose which table(s) they want to load. Maybe that could be a future PR though :)

for (const tableName of tables) {
const dao = gpkg.getFeatureDao(tableName);
const bbox = dao.getBoundingBox();
const iter = gpkg.queryForGeoJSONFeaturesInTable(tableName, bbox);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how I feel about converting the data to GeoJSON. Have you looked in to https://github.com/richard-thomas/ol-load-geopackage ? (I'm not sure how it works under the hood, maybe it loads from GeoJSON too 😆 )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elifsu-simula elifsu-simula marked this pull request as draft June 14, 2025 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants