<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,</div>

<div> </div>

<div>I've found a possible bug in GDAL 2.1 RC4 and the MBTiles driver.</div>

<div> </div>

<div>I have the following image that I'm geo referencing: http://imgbox.com/tLFn3Auq</div>

<div> </div>

<div>If I'm using the follwing code to warp the image based on a GeoTransform, it works well: https://gist.github.com/gunnarblom/9d73aa4358f3dafe2fd6808f7d4e9f41</div>

<div>...and it produces the following image which is correct: http://imgbox.com/TrzlXk4P</div>

<div> </div>

<div>(note: as the target coordinate system is Apple's own in MapKit, the y-axis is reversed and therefor the negation of the two last parameters in the GeoTransform before warping)</div>

<div> </div>

<div>If I'm using the following code to create MBTiles: https://gist.github.com/gunnarblom/76364b6bc8c0ff48dcf9fb81a5fdc060</div>

<div>...but for some images/GeoTransforms it produces artifacts: http://imgbox.com/Gd15nfaP (three artifacts along the sides)</div>

<div> </div>

<div>(note: this GeoTransform is based on WGS84-coordinates instead of Apple's coordinate system above in the regular image warp)</div>

<div> </div>

<div>This error can be very strong on other images, it seems stronger the more skewed the transform is (example with a dummy-test I did with a random image: http://imgbox.com/FAWJj0eC)</div>

<div> </div>

<div>What do you think can cause this bug?</div>

<div> </div>

<div>Thanks!</div>

<div> </div>

<div>Regards,</div>

<div>Gunnar</div></div></body></html>