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

Add NASA Mars, Moon and Vesta tile providers #9

Open
asinghvi17 opened this issue Apr 11, 2023 · 5 comments
Open

Add NASA Mars, Moon and Vesta tile providers #9

asinghvi17 opened this issue Apr 11, 2023 · 5 comments

Comments

@asinghvi17
Copy link
Member

https://api.nasa.gov/#:~:text=Vesta/Moon/Mars%20Trek%20WMTS are web map tile services which let you get this stuff. We should add them to TileProviders! It should be simple to implement as an example for the docs as well.

@rafaqz
Copy link
Member

rafaqz commented Apr 11, 2023

Yeah would be cool! But what is the projection even??

It would be fun to plot onto a mesh in Tyler.jl so we can make them globes, for earth too really...

That should be doable?

@rafaqz
Copy link
Member

rafaqz commented Apr 11, 2023

And also they are not XYZ tiles? maybe we need a way to distinguish that from the provider type. I don't think they would work in Leaflet.jl or Tyler.jl without a bunch of work.

http://{WMTS endpoint}/1.0.0/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png

@asinghvi17
Copy link
Member Author

So I think Tyler already plots onto meshes - we would just have to densely sample them and define some kind of mapping.

Is there a particular reason that Tyler needs to have scene data? If so we could make it at least backed by an ordinary plot recipe, and then it could even have a transformation from e.g 2d to 3d (sphere).

also: isn't this almost exactly the XYZ tile definition? Z is tile matrix, x and y are tilecol and tilerow (or so it seemed to me at least).

@rafaqz
Copy link
Member

rafaqz commented Apr 12, 2023

Ahh yeah I just misunderstood the two matrix variables. It works fine:

using TileProviders, Tyler
mars = Provider("https://api.nasa.gov/mars-wmts/catalog/Mars_Viking_MDIM21_ClrMosaic_global_232m/1.0.0//default/default028mm/{z}/{y}/{x}.jpg")
Tyler.Map(Extent(; X=(0, 10), Y=(0, 10)); provider=mars)

We can add a keyword for the default028mm replacement (TileMatrixSet in their terminology)

With the mesh I just mean a 3d mesh with a mapping to the globe - but I have no idea how that stuff works in Makie. Also no idea if/why it needs scene data. I'm pretty new to Makie internals and 3d plots in general.

@asinghvi17
Copy link
Member Author

Currently, Tyler is plotting images directly onto a mesh using UV coordinates

https://github.com/MakieOrg/Tyler.jl/blob/346b2c78234374c7493c94c229804570fe65844f/src/Tyler.jl#L175-L185

if we just subdivide this, for which the code is actually already there, and apply a transformation from latlong to an ECEF cartesian coordinate system (see Geodesy.jl), then it should "just work"!

When you consider Makie, everything is actually 3d - 2d plots are simply a special camera setting.

I have to finish up some slides for a talk this evening but can give this a look after that.

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

2 participants