-
Notifications
You must be signed in to change notification settings - Fork 79
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
Serving vector tiles #220
Comments
I see you really mean vector tiles (not binary tiles). But how do you want to build them from the raster (GeoTIFF) data?
No. GDAL automatically retrieves overviews if they exist, when you perform a decimated read into a smaller output shape with Rasterio https://rasterio.readthedocs.io/en/latest/topics/overviews.html, but if you do not ask for some smaller output shape, you always get the actual pixel data.
Not sure Rasterio can do that, but GDAL Python bindings do, apparently: https://gis.stackexchange.com/a/376210.
We have discussed adding an API for vector tiles but never considered creating vector data from rasters (on the fly). Again, I am really curious, why do you want to do that? |
FYI, for rio-tiler we created https://github.com/cogeotiff/rio-tiler-mvt plugin which use https://github.com/tilery/python-vtzero to create the vector tiles. Basically we can do 2 things:
We used this in https://github.com/developmentseed/titiler-mvt |
You can specify
|
This is super helpful! Thanks both
At the same time I see the value of These are the main things I would need to rewrite if I was using png:
|
I'm not sure how much work it would be to offer vector tile output, maybe it's not that bad since rio-tiler has already done the hard part for us :) That being said, I'm not quite convinced that this is a nice use case. But if you really want this and put in a PR I could imagine to merge it. Regarding your issues:
Not possible out of the box, but there are some tricks you can use. We've discussed this here.
It sounds like what you want is actually a custom colormap. The explicit format you quote is meant for categorical data, where you can match values to colors 1:1. If you want interpolation between values, you need a custom colormap. |
Did this end up working for you @chapmanjacobd ? |
yes for visualization purposes PNG is much faster than client side parsing vector tile "pixels" 😏 |
Instead of
{z}/{x}/{y}.png
I'd like{z}/{x}/{y}.pbf
I've generated something before like this:
I imagine this would be the centroids of each pixel as a vector point? Do you think this is possible?
Do GeoTiff COG overviews hinder access to the native resolution pixels of the COG? It would be nice to serve native resolution vector-tile-pixels up to a desired zoom level.
Can overview pixels be accessed explicitly? that might be interesting to experiment with for higher zoom levels than a client could easily process
somewhat related to:
#11 <-- is this the same thing?
#44 (comment)
The text was updated successfully, but these errors were encountered: