-
Notifications
You must be signed in to change notification settings - Fork 46
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
Experiment with TIF output #15
Comments
cc @GretaCB |
Tiff output in Mapnik, if I recall right, is just 32 bit rgba so it does not offer anything on top of webp yet. The limitation here is not just the tiff encoder in Mapnik but more that Mapnik image resizing/clipping only works with rgba images right now. I've been scheming making this making this more flexible but its not quite there yet. So, I think it would be great to test the tiff output to see if it works, but it does not offer much extra value until I improve Mapnik core. |
Sure enough -- took me a few hours to wrap my head around this enough to change four characters, but simply switching https://github.com/mapbox/tilelive-bridge/blob/raster/index.js#L147 to
... and I get a |
Yes @rclark I think its worth it. I'll need to mull on a best way to open this door in mapnik... |
@springmeyer: is there any reason we can't pass single-band rasters around as buffers inside vector tiles? If I'm understanding the limitation here is that mapnik.Image.encode always generates rgba images? |
No, this should work fine.
Correct the limitation is that the single band rasters are currently converted to 32 bit rgba images in mapnik-vector-tile which may or may not preserve the original pixel values in a way they will be usable later. Needs testing to see how much we can get away with before adding support for single band tif. |
Per voice, in the raster branch tilelive-bridge is currently hardcoded to export 1024x1024 webp tiles for any sources it detects to contain raster data.
To treat rasters more like tiled-performant-raw-data that you can manipulate on the fly/iterate on quickly when styling to get the final output product you want we can experiment with TIF as output format.
I have never used this option in mapnik. Note we won't need any geotif tags as far as I can see (the geo is more or less implied by the tiling/zxy) but I am curious how this output format works in mapnik.
https://github.com/mapnik/mapnik/wiki/Image-IO#tiff-output-options
cc @springmeyer
The text was updated successfully, but these errors were encountered: