mapbox / tilelive-omnivore

Implements the tilelive api for a variety of data sources
ISC License
8 stars 11 forks source link

Do not allow 16 bits through #6

Closed GretaCB closed 9 years ago

GretaCB commented 9 years ago

Mapnik will accept 16 bit TIFFs, but our stack does not support 16 bit yet.

cc @rclark

rclark commented 9 years ago

Awesome, thanks!

metadata.raster.bands[0].rasterDatatype !== 'Byte'

This will be true for every tiff other than an 8-bit one? Should the error message indicate instead that Only 8-bit tiffs are supported?

Mapnik will accept 16 bit TIFFs

I don't think this is true. It won't error on them, but it also won't render them in any useful way.

GretaCB commented 9 years ago

Mapnik will accept 16 bit TIFFs

Meant to say that Mapnik will not error out on these (technically "accept" but won't render properly), so we need to error out on our end.

Changing error message.

GretaCB commented 9 years ago

mapnik-omnivore PR to deal with zero bands scenario: https://github.com/mapbox/mapnik-omnivore/pull/69

metadata.raster can't be null for a TIFF since mapnik-omnivore will error out. And the if ('gdal') check will ensure that the file is a TIFF.