mapbox / mapnik-omnivore

Node module that returns metadata about spatial files.
44 stars 19 forks source link

Pixel ratio validation fails #170

Open igorti opened 7 years ago

igorti commented 7 years ago

When dealing with imagery from far up north(like Norway) pixel ratio can well exceed boundaries defined in this code.

Is there any background to why chosen max value is 2? For the imagery that I'm having problem with(can provide example if needed) ratio is over 3, but it seems to be a perfectly valid geotiff.

cc @GretaCB

igorti commented 6 years ago

Can anyone comment on this? @flippmoke?

GretaCB commented 6 years ago

Hi @igorti , thanks for the ping and pardon the delay. The specific ratio buffer was added here https://github.com/mapbox/mapnik-omnivore/pull/98#discussion_r28718649 .

Would definitely be interested in your example, and it would be great for mapnik-omnivore to support parts of the globe with slightly larger pixel ratio. Mind spinning up a testcase PR?


For anyone following along, this relates to the gdalDatasource.geoTransform array, which we're using via node-gdal in this module.

adfGeoTransform[0] /* top left x */
adfGeoTransform[1] /* w-e pixel resolution */
adfGeoTransform[2] /* 0 */
adfGeoTransform[3] /* top left y */
adfGeoTransform[4] /* 0 */
adfGeoTransform[5] /* n-s pixel resolution (negative value) */