Skip to content
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

Local and external file loading support for geojson, image and shapefile sources #256

Merged

Conversation

arjxn-py
Copy link
Member

@arjxn-py arjxn-py commented Dec 17, 2024

In the direction of #246 for which this PR defines a generic method for listed data sources along with local file support.

Copy link
Contributor

Binder 👈 Launch a Binder on branch arjxn-py/jupytergis/#246-unified-external-file-handling

@arjxn-py arjxn-py marked this pull request as draft December 17, 2024 08:51
@arjxn-py arjxn-py changed the title A generic method to load data sources [WIP] A generic method to load data sources Dec 17, 2024
Copy link
Contributor

github-actions bot commented Dec 17, 2024

Docs preview: appsharing.space

Copy link
Contributor

github-actions bot commented Dec 17, 2024

Integration tests report: appsharing.space

Copy link
Contributor

github-actions bot commented Dec 17, 2024

Preview using JupyterLite: appsharing.space

examples/nyc.zip Outdated Show resolved Hide resolved
@arjxn-py
Copy link
Member Author

arjxn-py commented Jan 7, 2025

Hi, would you have some tip/suggestion on how and from where do i download small enough raster/hillshade/vector tile layer for local testing?

It'd be really awesome if any of those files would also be served somewhere so that it's url could also be used to cross check

I struggle to use the sources from sample jgis files as unlike for image/geojson files the other source urls are like - https://tile.waymarkedtrails.org/{variant}/{z}/{x}/{y}.png

@mfisher87
Copy link
Member

@mfisher87
Copy link
Member

https://tile.waymarkedtrails.org/{variant}/{z}/{x}/{y}.png

For tileservers you can use GDAL to download the data and build a GeoTIFF, though it's a bit fiddly: https://gis.stackexchange.com/a/417756

@arjxn-py
Copy link
Member Author

arjxn-py commented Jan 7, 2025

Thanks a lot @mfisher87, this is helpful. I'd definitely explore these to get some data :)

@mfisher87
Copy link
Member

Happy to help!

@arjxn-py
Copy link
Member Author

arjxn-py commented Jan 7, 2025

For tileservers you can use GDAL to download the data and build a GeoTIFF, though it's a bit fiddly: https://gis.stackexchange.com/a/417756

If it's the geotiff only you're referring to, I think I have the required geotiff file from the sample .jgis file. Tho I've halted the logic for geotiff due to some recent changes in that logic to implement caching. I may also break this PR in parts to include that data source in a separate one.

@martinRenou martinRenou added the enhancement New feature or request label Jan 8, 2025
@arjxn-py arjxn-py marked this pull request as ready for review January 8, 2025 11:52
@arjxn-py arjxn-py changed the title [WIP] A generic method to load data sources Local file support to load geojson, image and shapefile sources Jan 8, 2025
@arjxn-py arjxn-py requested a review from mfisher87 January 9, 2025 11:25
packages/schema/src/model.ts Outdated Show resolved Hide resolved
packages/base/src/mainview/mainView.tsx Outdated Show resolved Hide resolved
packages/schema/src/interfaces.ts Outdated Show resolved Hide resolved
packages/base/src/tools.ts Outdated Show resolved Hide resolved
@arjxn-py arjxn-py force-pushed the #246-unified-external-file-handling branch from 16f4992 to e05d329 Compare January 10, 2025 12:01
@arjxn-py arjxn-py force-pushed the #246-unified-external-file-handling branch from 7ab53a5 to e0ed531 Compare January 13, 2025 09:10
@arjxn-py arjxn-py force-pushed the #246-unified-external-file-handling branch from a418d44 to d75a9b9 Compare January 13, 2025 09:14
@arjxn-py arjxn-py requested a review from martinRenou January 13, 2025 09:16
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.

Couple of nitpicky comments + GeoJSONSource by URL, otherwise I think it looks good!

packages/schema/src/interfaces.ts Outdated Show resolved Hide resolved
packages/schema/src/model.ts Outdated Show resolved Hide resolved
@arjxn-py arjxn-py requested a review from martinRenou January 14, 2025 09:13
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 changed the title Local file support to load geojson, image and shapefile sources Local and external file loading support for geojson, image and shapefile sources Jan 14, 2025
@martinRenou martinRenou merged commit 50dcc9b into geojupyter:main Jan 14, 2025
12 checks passed
@arjxn-py arjxn-py deleted the #246-unified-external-file-handling branch January 20, 2025 10:47
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants