Re: Implementing -scale functionality of gdal_translate


linden.kyle@...
 

Hi Sean, I'm having some trouble with the implementation of this and was wondering if you might be able to give me a hand. Here's the code I am working with: https://pastebin.com/kecx0D2b. What I'm trying to do is take a geotiff and convert it to a set of TMS-formatted tiles (including reprojecting to web mercator). In this example `tile_bounds` are the bounds of the tile in web mercator. I originally had this code sample working until I attempted to add in the code to do the pixel scaling. Here's the original working code: https://pastebin.com/dZVRVKi2

Here's what the output looks like with the broken code: https://imgur.com/xLtWrGZ
And here's the correct version (but no support for pixel scaling): https://imgur.com/aoNCyIp

Join main@rasterio.groups.io to automatically receive all group messages.