Tyler.jl
Tyler.jl copied to clipboard
Add a function `basemap` to get a static image from Tyler, and some converts for image
This file provides the ability to get static base maps from Tyler.
Its main entry point is the basemap function, which returns a tuple
(x, y, z) of the image data (z) and its axes (x and y). The image
is in a web-mercator CRS, we need to figure out a way to also get eg WGS84 tiles.
This file also contains definitions for convert_arguments that make
the following syntax "just work":
image(TileProviders.Google(), Rect2f(-0.0921, 51.5, 0.04, 0.025), (1000, 1000); axis= (; aspect = DataAspect()))
You do still have to provide the extent and image size, but this is substantially better than nothing.
(This doesn't work now but will work with #90, since that imports FileIO)
Is there a reason basemap isn't in MapTiles.jl ?
Would let other packages skip the Makie dep
HTTP.jl and ImageIO.jl are required to stitch the tiles together, but if those can go in MapTiles I'm fine to upstream this
Ahh right. Might be worth it for Plots.jl uses
This will have to be reimplemented based off #95
please add these lines at the end of our .css file
/* Component: Docstring Custom Block */
.jldocstring.custom-block {
border: 1px solid var(--vp-c-gray-2);
color: var(--vp-c-text-1)
}
.jldocstring.custom-block summary {
font-weight: 700;
cursor: pointer;
user-select: none;
margin: 0 0 8px;
}
Edit: Also, it looks like your examples are not working.
This one also looks like a lot of work has already been put into it. How do we move forward with this, or decide not to?
I think we want to factor a bunch of stuff out of Tyler and put it in MapTiles....
@asinghvi17 a lot of work went into this already? did things split out somewhere else, or should we try to get this one to the finish line?
Nothing split out yet. We had some discussions about moving this to MapTiles and factoring out a MapTilesInterface.jl from that, which I haven't got to yet but hopefully can get to at some point.
In that case most of the downloaders etc will also go to MapTiles and Tyler can depend on that once it's ready.
Also there was some form of large refactor after I opened this PR, I don't remember exactly what it was, but I do remember that it may have caused issues with this PR so I didn't merge then. Can take a look again though, maybe we should get this in for now. But eventually it will live in MapTiles.