Skip to content

Conversation

elifsu-simula
Copy link
Collaborator

@elifsu-simula elifsu-simula commented Jun 2, 2025

Description

Solves #647

Added support for GeoParquet data format, both to UI and to Python API, using the library geoparquet.

I added a test for Python API but didn't add a UI test. I also did not add support for exporting GeoParquet 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--727.org.readthedocs.build/en/727/
💡 JupyterLite preview: https://jupytergis--727.org.readthedocs.build/en/727/lite

Copy link
Contributor

github-actions bot commented Jun 2, 2025

Binder 👈 Launch a Binder on branch elifsu-simula/jupytergis/geoparquet-support

@elifsu-simula elifsu-simula added the enhancement New feature or request label Jun 2, 2025
Copy link
Contributor

github-actions bot commented Jun 2, 2025

Integration tests report: appsharing.space

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

Really neat! I just have some minor suggestion. Also, would you like to add an example file under examples/ so I can test it?

case 'GeoParquetSource': {
const parameters = source.parameters as IGeoParquetSource;

const geojson = await loadFile({
Copy link
Member

@mfisher87 mfisher87 Jun 12, 2025

Choose a reason for hiding this comment

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

I don't feel great about converting geoparquet to geojson as we lose all the performance advantages. Openlayers doesn't support geoparquet (yet? there is no open issue in their GitHub repo... should we make one?), so we need to convert to something... what about flatgeobuf?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll take a look at flatgeobuf, thanks!

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 have you had any luck on this?

I also see your PR has quite a lot of conflicts now (mainly due to the changes in imports I assume). I can help with this if needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi Martin! Sorry for the late reply. I have been on vacation. I am starting to look into this now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was planning to convert GeoParquet files to FlatGeobuf using GDAL's ogr2ogr function, but our current gdal3.js WASM build doesn’t include the Parquet driver. I’ve been working on rebuilding it with the Parquet driver, but before investing more time I wanted to check if this approach is feasible or if I should look into other ways without modifying the original gdal3.js build.

Copy link
Member

Choose a reason for hiding this comment

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

Does OpenLayers support FlatGeobuf as-is?

If we start investigating making our own gdal WASM build, I'd rather prefer it being done on emscripten-forge, that way we could also use it in the Python kernel in JupyterLite if we also compile the Python bindings for it.

But that's probably not a straightforward task. I personally would be ok with the current state of the PR as a first solution, then track in an issue exploring other approaches.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OpenLayers doesn't support FlatGeobuf, but the FlatGeobuf project has an OpenLayers integration (example) . Then I'll fix the conflicts and create an issue for this.

Copy link
Member

Choose a reason for hiding this comment

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

neat

@elifsu-simula elifsu-simula marked this pull request as draft July 10, 2025 13:22
@Gauss-Taylor-Euler
Copy link
Contributor

Gauss-Taylor-Euler commented Jul 15, 2025

Hi @elifsu-simula I am testing your pr , the file isn't opening here is a video :

ndd.mp4

Below is the screenshot of the error I get in the terminal :
image

Maybe the problem is on my part but it seems to be connected to file encoding?

@Gauss-Taylor-Euler
Copy link
Contributor

Change the video to show that other file are still opening.

@elifsu-simula
Copy link
Collaborator Author

Hi! Previously, I added an example parquet file, now I replaced it with a JGIS file where the parquet layer is already added.

@Gauss-Taylor-Euler
Copy link
Contributor

Hi thanks, so we can't open directly geoparquet file with this pr ?

@elifsu-simula
Copy link
Collaborator Author

No I didn't add this functionality. We can only add GeoParquet layers to the JGIS documents from the widget or Python API. Do we want to directly open them as well?

@Gauss-Taylor-Euler
Copy link
Contributor

OK I see no problem , I thought so because before the example was directly geoparquet file.

@Gauss-Taylor-Euler
Copy link
Contributor

It is working on my side now , @martinRenou will probably look into it after , I think.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

Thanks!

@martinRenou martinRenou merged commit 4767259 into geojupyter:main Jul 17, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in JupyterGIS Prioritization Jul 17, 2025
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: Done
Development

Successfully merging this pull request may close these issues.

4 participants