rio-rgbify icon indicating copy to clipboard operation
rio-rgbify copied to clipboard

Support 256 x 256 output tilesizes

Open dnomadb opened this issue 7 years ago • 3 comments

In order to more easily stay under total and individual (tile) size limits, we should allow creation of mbtiles with 256x256 tiles in addition to 512x512.

dnomadb avatar Jan 09 '18 04:01 dnomadb

Note that mapbox.terrain-rgb uses 256.

jingsam avatar Jan 10 '18 01:01 jingsam

Note that mapbox.terrain-rgb uses 256.

While the default tile endpoint is indeed 256, the full size tiles (@2x) are retina resolution at 512x512 (same for all of our raster tiles: https://www.mapbox.com/api-documentation/#retrieve-tiles -- they are resized on-the-fly).

512: https://api.mapbox.com/v4/mapbox.terrain-rgb/11/334/[email protected]?access_token=<token>

image

256: https://api.mapbox.com/v4/mapbox.terrain-rgb/11/334/793.pngraw?access_token=<token>

image

I'd guess that for hillshading 512 is overkill, but 512 tiles work great for other uses in order to make fewer calls to the api, eg: https://www.mapbox.com/labs/terra/#15.1541/-25.3483/131.0368/31.8413/36

dnomadb avatar Jan 10 '18 05:01 dnomadb

I think the default tileSize should be 512. As mapbox-gl-js uses 512 tiles, a 256 tile source would cause mapbox-gl-js request four 256-based tiles to compose a 512 tile. Not only more requests, but also the total size of tiles increase.

jingsam avatar Jan 11 '18 02:01 jingsam