JuliaEarth / GeoStats.jl

An extensible framework for geospatial data science and geostatistical modeling fully written in Julia
https://juliaearth.github.io/GeoStatsDocs/stable/
MIT License
519 stars 63 forks source link

Add slippy tile support #463

Closed GroovyJeff closed 2 months ago

GroovyJeff commented 2 months ago

I've written some Julia code that deals with OpenStreetMaps' (and Google Maps) slippy tile format. Let me know if there's any interest in adding slippy tile support to this project, thank you

juliohm commented 2 months ago

Hi @GroovyJeff thank you for considering the contribution. Can you please elaborate on the features you have in mind?

Without searching the literature, I can see at least two parts of the project where pull requests could be prepared:

Please feel free to reach out in our Zulip channel if you need a more interactive chat.

GroovyJeff commented 2 months ago

I actually noticed https://github.com/JuliaGeo/MapTiles.jl has done some of this and it might be easier to import their code or leave it as a separate project

My thoughts were:

juliohm commented 2 months ago
  • functions to convert between spherical (latitude, longitude), Cartesian (XYZ on surface of sphere) and slippy tile coordinates, allowing for decimal slippy tile coordinates

We have that in CoordRefSystems.jl, except for the "slippy tile coordinates". What do you think could be improved?

  • geodesic and Cartesian distance between two slippy tiles

We have Cartesian distance (and plan to add geodesic distance) in Meshes.jl.

  • the height of a slippy tile (both geodesic and Cartesian), the bounding box, the minimum and maximum width of a slippy tile, the "middle" of the slippy tile (not the average of the bounding box because latitude isn't map linearly), the max distance from the center of the slippy tile to anywhere else in the slippy tile

Also in the scope of Meshes.jl operations.

  • the latitudes and longitudes of the centers of the pixels in a given slippy tile

Also a combination of CoordRefSystems.jl and Meshes.jl geometry processing.

  • children and parents of a given slippy tile

I believe that this hierarchical data structure where tiles are represented in a tree can be represented in terms of the topology alone. The coordinates of points simply serve to query the tiles at any level of the hierarchy. Also something to brainstorm further.

Should we move this issue to a more interactive thread on Zulip? It is too open to tackle. After we converge to specific feature requests, we can open issues to track the development.

juliohm commented 2 months ago

Moved to Zulip.