Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
415713a
Add GeoPackage data format
elifsu-simula May 19, 2025
dd00081
Fix formatting
elifsu-simula May 19, 2025
b9e724c
Merge branch 'main' into add_geopackage_data_format
elifsu-simula May 19, 2025
a1998f7
Fix merge conflicts and adapt code to updated branch
elifsu-simula May 19, 2025
7ce7535
Use ol-load-geopackage to read file
elifsu-simula Jun 13, 2025
973d27c
Fix copying sql wasm
elifsu-simula Jul 11, 2025
e8cc15c
Load local file
elifsu-simula Jul 14, 2025
aace235
Read gpkg URLs in Python API
elifsu-simula Jul 15, 2025
4300039
Read gpkg local files in Python API
elifsu-simula Jul 15, 2025
74a680d
Add gpkg raster layers from local files
elifsu-simula Jul 16, 2025
ba9a184
Add gpkg raster layers from URLs and set projection for vector layers
elifsu-simula Jul 17, 2025
7c849c7
Add gpkg raster layer from Python API
elifsu-simula Jul 18, 2025
89adb49
Fix issue with proj4 register
elifsu-simula Jul 18, 2025
dd2657a
Read tile width height from tile dao
elifsu-simula Jul 21, 2025
340323d
Make sure user entered table name is valid
elifsu-simula Jul 21, 2025
15412fb
Add more properties to GeoPackage Raster source
elifsu-simula Jul 21, 2025
822a304
Add example geopackage project
elifsu-simula Jul 21, 2025
793b349
Remove downloaded gpkg file after reading
elifsu-simula Jul 21, 2025
fa77f92
Merge branch 'main' into add_geopackage_data_format
elifsu-simula Jul 21, 2025
0d77c6c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 21, 2025
161d681
Formatting and linting
elifsu-simula Jul 21, 2025
c8f0c31
Make webpack config path relative
elifsu-simula Jul 21, 2025
d62ac7a
Linearize curved geometries
elifsu-simula Aug 13, 2025
8522e1d
Reproject data
elifsu-simula Aug 13, 2025
4aab3f9
Add newline to docstring
elifsu-simula Aug 15, 2025
15e6ddd
Merge branch 'main' into add_geopackage_data_format
elifsu-simula Aug 15, 2025
8f9df16
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 15, 2025
9ba4e68
Formatting
elifsu-simula Aug 15, 2025
a0ceb1b
Merge branch 'add_geopackage_data_format' of https://github.com/elifs…
elifsu-simula Aug 15, 2025
6d8fde2
Linting
elifsu-simula Aug 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 238 additions & 0 deletions examples/geopackage.jgis
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
{
"layerTree": [
"c3e1b470-fd4e-4c57-ac0a-5b4a24e602ac/tiles",
"d090703f-5953-44b3-acde-c6286e125385/PointsOfInterest",
"21467e04-77ba-445d-8e7b-638149deb9f4/Parks",
"3e335ea9-4358-4fc1-acb3-ceea34b852d5/Pizza",
"03fa7c7c-4f88-49cf-b975-38a42ef38710/Countries",
"e811f15b-d11a-4113-bc5a-3726dde9976b/Lakes",
"58c36230-5fa7-4158-965d-cc4f5c2a0794/Rivers + Lake Centrelines"
],
"layers": {
"03fa7c7c-4f88-49cf-b975-38a42ef38710/Countries": {
"filters": {
"appliedFilters": [
{
"feature": null,
"operator": null,
"value": null
}
],
"logicalOp": null
},
"name": "GeoPackage Layer Countries Layer",
"parameters": {
"color": null,
"opacity": 1.0,
"source": "41ba7c89-0986-4d8f-a3a2-72847069de89/Countries",
"symbologyState": null
},
"type": "VectorLayer",
"visible": true
},
"21467e04-77ba-445d-8e7b-638149deb9f4/Parks": {
"filters": {
"appliedFilters": [
{
"feature": null,
"operator": null,
"value": null
}
],
"logicalOp": null
},
"name": "GeoPackage Layer Parks Layer",
"parameters": {
"color": null,
"opacity": 1.0,
"source": "c0e58d6d-7dc7-4878-9aa4-b241f8172262/Parks",
"symbologyState": null
},
"type": "VectorLayer",
"visible": true
},
"3e335ea9-4358-4fc1-acb3-ceea34b852d5/Pizza": {
"filters": {
"appliedFilters": [
{
"feature": null,
"operator": null,
"value": null
}
],
"logicalOp": null
},
"name": "GeoPackage Layer Pizza Layer",
"parameters": {
"color": null,
"opacity": 1.0,
"source": "0033b340-eb92-4610-9510-377e43cd6438/Pizza",
"symbologyState": null
},
"type": "VectorLayer",
"visible": true
},
"58c36230-5fa7-4158-965d-cc4f5c2a0794/Rivers + Lake Centrelines": {
"filters": {
"appliedFilters": [
{
"feature": null,
"operator": null,
"value": null
}
],
"logicalOp": null
},
"name": "GeoPackage Layer Rivers + Lake Centrelines Layer",
"parameters": {
"color": null,
"opacity": 1.0,
"source": "8f10ffc3-7461-4ea7-bce8-fb29e2671289/Rivers + Lake Centrelines",
"symbologyState": null
},
"type": "VectorLayer",
"visible": true
},
"c3e1b470-fd4e-4c57-ac0a-5b4a24e602ac/tiles": {
"filters": null,
"name": "GeoPackage Layer tiles Layer",
"parameters": {
"opacity": 1.0,
"source": "0a9375df-4f63-4bd6-8e6f-9f4832a0a9cb/tiles"
},
"type": "RasterLayer",
"visible": true
},
"d090703f-5953-44b3-acde-c6286e125385/PointsOfInterest": {
"filters": {
"appliedFilters": [
{
"feature": null,
"operator": null,
"value": null
}
],
"logicalOp": null
},
"name": "GeoPackage Layer PointsOfInterest Layer",
"parameters": {
"color": null,
"opacity": 1.0,
"source": "9acdf695-c781-4b68-b415-eff3f66fa7eb/PointsOfInterest",
"symbologyState": null
},
"type": "VectorLayer",
"visible": true
},
"e811f15b-d11a-4113-bc5a-3726dde9976b/Lakes": {
"filters": {
"appliedFilters": [
{
"feature": null,
"operator": null,
"value": null
}
],
"logicalOp": null
},
"name": "GeoPackage Layer Lakes Layer",
"parameters": {
"color": null,
"opacity": 1.0,
"source": "9a0fd43f-5025-49a0-ab69-90b9f074424c/Lakes",
"symbologyState": null
},
"type": "VectorLayer",
"visible": true
}
},
"metadata": {},
"options": {
"bearing": 0.0,
"extent": [
-22036985.40727903,
-6817247.246847427,
18038031.278299443,
18065694.93156175
],
"latitude": 45.01716292551504,
"longitude": -17.96160807277616,
"projection": "EPSG:3857",
"zoom": 2.1032878084120226
},
"schemaVersion": "0.5.0",
"sources": {
"0033b340-eb92-4610-9510-377e43cd6438/Pizza": {
"name": "GeoPackage Layer Pizza Source",
"parameters": {
"attribution": null,
"path": "https://raw.githubusercontent.com/ngageoint/geopackage-js/master/docs/examples/GeoPackageToGo/StLouis.gpkg",
"projection": "EPSG:3857",
"tables": "Pizza"
},
"type": "GeoPackageVectorSource"
},
"0a9375df-4f63-4bd6-8e6f-9f4832a0a9cb/tiles": {
"name": "GeoPackage Layer tiles Source",
"parameters": {
"attribution": null,
"interpolate": null,
"maxZoom": null,
"minZoom": null,
"path": "https://raw.githubusercontent.com/ngageoint/geopackage-js/master/docs/examples/GeoPackageToGo/StLouis.gpkg",
"tables": "tiles"
},
"type": "GeoPackageRasterSource"
},
"41ba7c89-0986-4d8f-a3a2-72847069de89/Countries": {
"name": "GeoPackage Layer Countries Source",
"parameters": {
"attribution": null,
"path": "https://raw.githubusercontent.com/richard-thomas/ol-load-geopackage/master/examples/dist/Natural_Earth_QGIS_layers_and_styles.gpkg",
"projection": "EPSG:3857",
"tables": "Countries"
},
"type": "GeoPackageVectorSource"
},
"8f10ffc3-7461-4ea7-bce8-fb29e2671289/Rivers + Lake Centrelines": {
"name": "GeoPackage Layer Rivers + Lake Centrelines Source",
"parameters": {
"attribution": null,
"path": "https://raw.githubusercontent.com/richard-thomas/ol-load-geopackage/master/examples/dist/Natural_Earth_QGIS_layers_and_styles.gpkg",
"projection": "EPSG:3857",
"tables": "Rivers + Lake Centrelines"
},
"type": "GeoPackageVectorSource"
},
"9a0fd43f-5025-49a0-ab69-90b9f074424c/Lakes": {
"name": "GeoPackage Layer Lakes Source",
"parameters": {
"attribution": null,
"path": "https://raw.githubusercontent.com/richard-thomas/ol-load-geopackage/master/examples/dist/Natural_Earth_QGIS_layers_and_styles.gpkg",
"projection": "EPSG:3857",
"tables": "Lakes"
},
"type": "GeoPackageVectorSource"
},
"9acdf695-c781-4b68-b415-eff3f66fa7eb/PointsOfInterest": {
"name": "GeoPackage Layer PointsOfInterest Source",
"parameters": {
"attribution": null,
"path": "https://raw.githubusercontent.com/ngageoint/geopackage-js/master/docs/examples/GeoPackageToGo/StLouis.gpkg",
"projection": "EPSG:3857",
"tables": "PointsOfInterest"
},
"type": "GeoPackageVectorSource"
},
"c0e58d6d-7dc7-4878-9aa4-b241f8172262/Parks": {
"name": "GeoPackage Layer Parks Source",
"parameters": {
"attribution": null,
"path": "https://raw.githubusercontent.com/ngageoint/geopackage-js/master/docs/examples/GeoPackageToGo/StLouis.gpkg",
"projection": "EPSG:3857",
"tables": "Parks"
},
"type": "GeoPackageVectorSource"
}
}
}
2 changes: 2 additions & 0 deletions packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@lumino/widgets": "^2.0.0",
"@mapbox/vector-tile": "^2.0.3",
"@naisutech/react-tree": "^3.0.1",
"@ngageoint/geopackage": "^4.2.6",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-popover": "^1.1.14",
Expand All @@ -85,6 +86,7 @@
"hyparquet-compressors": "^1.1.1",
"lucide-react": "^0.513.0",
"ol": "^10.1.0",
"ol-load-geopackage": "^1.0.3",
"ol-pmtiles": "^0.5.0",
"ol-stac": "^1.0.0-rc.10",
"pbf": "^4.0.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/base/src/commands/BaseCommandIDs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export const newImageEntry = 'jupytergis:newImageEntry';
export const newVideoEntry = 'jupytergis:newVideoEntry';
export const newGeoTiffEntry = 'jupytergis:newGeoTiffEntry';
export const newGeoParquetEntry = 'jupytergis:newGeoParquetEntry';
export const newGeoPackageRasterEntry = 'jupytergis:newGeoPackageRasterEntry';
export const newGeoPackageVectorEntry = 'jupytergis:newGeoPackageVectorEntry';

// Layer and group actions
export const renameLayer = 'jupytergis:renameLayer';
Expand Down
40 changes: 40 additions & 0 deletions packages/base/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,46 @@ export function addCommands(
}),
...icons.get(CommandIDs.newShapefileEntry),
});
commands.addCommand(CommandIDs.newGeoPackageVectorEntry, {
label: trans.__('New GeoPackage Layer'),
isEnabled: () => {
return tracker.currentWidget
? tracker.currentWidget.model.sharedModel.editable
: false;
},
execute: Private.createEntry({
tracker,
formSchemaRegistry,
title: 'Create GeoPackage Layer',
createLayer: true,
createSource: true,
sourceData: { name: 'Custom GeoPackage Vector Source' },
layerData: { name: 'Custom GeoPackage Vector Layer' },
sourceType: 'GeoPackageVectorSource',
layerType: 'VectorLayer',
}),
...icons.get(CommandIDs.newGeoPackageVectorEntry),
});
commands.addCommand(CommandIDs.newGeoPackageRasterEntry, {
label: trans.__('New GeoPackage Layer'),
isEnabled: () => {
return tracker.currentWidget
? tracker.currentWidget.model.sharedModel.editable
: false;
},
execute: Private.createEntry({
tracker,
formSchemaRegistry,
title: 'Create GeoPackage Layer',
createLayer: true,
createSource: true,
sourceData: { name: 'Custom GeoPackage Raster Source' },
layerData: { name: 'Custom GeoPackage Raster Layer' },
sourceType: 'GeoPackageRasterSource',
layerType: 'RasterLayer',
}),
...icons.get(CommandIDs.newGeoPackageRasterEntry),
});

/**
* LAYERS and LAYER GROUP actions.
Expand Down
3 changes: 3 additions & 0 deletions packages/base/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
bookOpenIcon,
clockIcon,
geoJSONIcon,
geoPackageIcon,
infoIcon,
moundIcon,
rasterIcon,
Expand Down Expand Up @@ -50,6 +51,8 @@ const iconObject = {
[CommandIDs.newHillshadeEntry]: { icon: moundIcon },
[CommandIDs.newImageEntry]: { iconClass: 'fa fa-image' },
[CommandIDs.newVideoEntry]: { iconClass: 'fa fa-video' },
[CommandIDs.newGeoPackageVectorEntry]: { icon: geoPackageIcon },
[CommandIDs.newGeoPackageRasterEntry]: { icon: geoPackageIcon },
[CommandIDs.newShapefileEntry]: { iconClass: 'fa fa-file' },
[CommandIDs.newGeoTiffEntry]: { iconClass: 'fa fa-image' },
[CommandIDs.newGeoParquetEntry]: { iconClass: 'fa fa-file' },
Expand Down
Loading
Loading