-
Notifications
You must be signed in to change notification settings - Fork 60
Add GeoParquet support #727
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
Merged
martinRenou
merged 16 commits into
geojupyter:main
from
elifsu-simula:geoparquet-support
Jul 17, 2025
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
fbd33f2
Add Geoparquet source from URL
elifsu-simula d000b7a
Add Geoparquet source from file
elifsu-simula 6e5fe1e
Add Geoparquet source to Python API
elifsu-simula 99cef7a
Add Geoparquet source from URL
elifsu-simula c66512d
Add Geoparquet source from file
elifsu-simula e3fd5f0
Add Geoparquet source to Python API
elifsu-simula cfe376e
Update yarn.lock
elifsu-simula c2c9653
Merge remote-tracking branch 'origin/geoparquet-support' into geoparq…
elifsu-simula cd84f9d
Add parquet file
elifsu-simula 4567a4f
Move dependencies to to packages/base
elifsu-simula 167eedd
Merge branch 'main' into geoparquet-support
elifsu-simula b56b56e
Format files
elifsu-simula 69abdae
Fix icon
elifsu-simula 6308b5d
Merge branch 'main' into geoparquet-support
martinRenou e902938
Add example project
elifsu-simula 7940328
Merge remote-tracking branch 'origin/geoparquet-support' into geoparq…
elifsu-simula File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"layerTree": [ | ||
"9556ca29-a5ec-41af-bf14-4b543c52aafe", | ||
"d7a2ad84-0750-4e9b-82c0-542fcc6b3265" | ||
], | ||
"layers": { | ||
"9556ca29-a5ec-41af-bf14-4b543c52aafe": { | ||
"name": "OpenStreetMap.Mapnik Layer", | ||
"parameters": { | ||
"source": "2a52082b-7992-40dc-92d6-75e309a1ed27" | ||
}, | ||
"type": "RasterLayer", | ||
"visible": true | ||
}, | ||
"d7a2ad84-0750-4e9b-82c0-542fcc6b3265": { | ||
"name": "Custom GeoParquet Layer", | ||
"parameters": { | ||
"opacity": 1.0, | ||
"source": "c1da95b9-8a71-4fee-b4e3-6f0b5f53d2d4" | ||
}, | ||
"type": "VectorLayer", | ||
"visible": true | ||
} | ||
}, | ||
"metadata": {}, | ||
"options": { | ||
"bearing": 0.0, | ||
"extent": [ | ||
-20037508.342789244, | ||
-15214174.147482341, | ||
20037508.342789244, | ||
15214174.147482341 | ||
], | ||
"latitude": 0.0, | ||
"longitude": 0.0, | ||
"projection": "EPSG:3857", | ||
"zoom": 1.5058115539195944 | ||
}, | ||
"schemaVersion": "0.5.0", | ||
"sources": { | ||
"2a52082b-7992-40dc-92d6-75e309a1ed27": { | ||
"name": "OpenStreetMap.Mapnik", | ||
"parameters": { | ||
"attribution": "(C) OpenStreetMap contributors", | ||
"maxZoom": 19.0, | ||
"minZoom": 0.0, | ||
"provider": "OpenStreetMap", | ||
"url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png", | ||
"urlParameters": {} | ||
}, | ||
"type": "RasterSource" | ||
}, | ||
"c1da95b9-8a71-4fee-b4e3-6f0b5f53d2d4": { | ||
"name": "Custom GeoParquet Source", | ||
"parameters": { | ||
"attribution": "", | ||
"path": "https://raw.githubusercontent.com/opengeospatial/geoparquet/main/examples/example.parquet", | ||
"projection": "EPSG:4326" | ||
}, | ||
"type": "GeoParquetSource" | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
declare module 'geoparquet' { | ||
export function asyncBufferFromUrl(options: { | ||
url: string; | ||
byteLength?: number; | ||
requestInit?: RequestInit; | ||
}): Promise<AsyncBuffer>; | ||
|
||
export function toGeoJson(options: { | ||
file: AsyncBuffer; | ||
compressors?: any; | ||
}): Promise<GeoJSON>; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
"src/**/*", | ||
"src/schema/*.json", | ||
"src/_interface/*.json", | ||
"src/*.json" | ||
"src/*.json", | ||
"src/types/*" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/schema/src/schema/project/sources/geoParquetSource.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"type": "object", | ||
"description": "GeoParquetSource", | ||
"title": "IGeoParquetSource", | ||
"required": ["path"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"path": { | ||
"type": "string", | ||
"description": "The path to the GeoParquet source" | ||
}, | ||
"attribution": { | ||
"type": "string", | ||
"readOnly": true, | ||
"description": "The attribution for the GeoParquet source.", | ||
"default": "" | ||
}, | ||
"projection": { | ||
"type": "string", | ||
"description": "The projection information for the GeoParquet data (optional).", | ||
"default": "EPSG:4326" | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat