mapbox / mbutil

Importer and Exporter of MBTiles
http://mapbox.com/developers/
BSD 3-Clause "New" or "Revised" License
754 stars 198 forks source link

image_format not set from metadata #92

Closed andrewharvey closed 6 years ago

andrewharvey commented 6 years ago

I'm not sure but I think this might be wrong..

https://github.com/mapbox/mbutil/blob/bfcd0d5612a7e1e7afbc45b612e3c2d204a807f4/mbutil/util.py#L181-L193

The top line get the command line format argument and defaults to png?

Then further down the image_format is set again from the command line arg without a default making the first line redundant?

Perhaps the second time image_format is set it should be pulling from metadata?

I believe this is why I needed to set the format in https://github.com/mapbox/mbutil/pull/89/files#diff-3eb4d995269f8dd7de58cb236d151d7bR57 rather than letting it default to what it found in metadata.json.

sgillies commented 6 years ago

Line 185 looks like a bug to me, I think we could delete it. Can you submit a PR?

sgillies commented 6 years ago

Wontfix now, see #94.