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

Path to generic plots with GeoInterface #54

Open
evetion opened this issue Sep 4, 2023 · 6 comments
Open

Path to generic plots with GeoInterface #54

evetion opened this issue Sep 4, 2023 · 6 comments

Comments

@evetion
Copy link

evetion commented Sep 4, 2023

Not sure if this already works, but since this is the most complete package, I'll post it here.

Ideally we want this:

ax = plot(points)
background!(ax, TileProvider())

This requires that GeoInterface sets the crs on the plot object? Then we could derive an extent from the plot object (didn't test it, but I assume that's possible), which is enough (with a possible convert) to load the right tile(s) to plot in the background.

@rafaqz
Copy link
Collaborator

rafaqz commented Sep 4, 2023

The idea is to be able to put interactive Tyler underneath the current plot, and make it use the current CRS?

I guess we need to attach the crs to the axis somehow. Probably GeoMakie GeoAxis already has that, and we can just build on it instead?

Maybe we need to move to plotting tiles onto a mesh so it can be in any projection, rather than just tiling onto a regular grid. That would also facilitate using a globe, 3d terrain and other fun things. We would also have to increase the mesh detail as we zoom in like google earth does, but I'm not sure how to do that.

@evetion
Copy link
Author

evetion commented Sep 4, 2023

Well, I also would want it to work in the general Plots.jl ecosystem. This package is half generic code, half specific to Makie. Maybe this should be moved to GeoInterface for the implementation?

@rafaqz
Copy link
Collaborator

rafaqz commented Sep 4, 2023

Yes that makes sense, maybe we can move some things to MapTiles.jl and define Plots.jl recipes in an extension there?

I'm not sure how we will get that exact code to work in Plots.jl, probably you would need to pass the crs to background

@john-waczak
Copy link

To @evetion's point, it would be super helpful to have a non-interactive version (perhaps using CairoMakie as the backend) to enable plotting geographic data on top of background maps with a fixed (or automatically determined) spatial extent.

I've been using Contextily via PythonCall for a hacky way to do this, but it would be great have native Julia implementation that can easily allow something like this matlab code

Happy to help work on something like this as it would be super helpful for my own work!

@rafaqz
Copy link
Collaborator

rafaqz commented Sep 13, 2023

Yeah, we need to separate out plotting from the interactivity.

Have a go at a PR.

Im not sure how to structure it because currently so much is done in Map. Maybe you can define a MapSnapshot or something that just makes one map, and see how you can to refactor Map so they can share code.

@evetion
Copy link
Author

evetion commented Sep 13, 2023

Possibly define Extent (and crs?) on different plotlike things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants