[gdal-dev] Adding gcps to a raster using gdal_translate can result in data loss.

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Tue Mar 30 09:51:47 PDT 2021


Hi,

I did not have a close look into your ground control points but perhaps they are not very well distributed and therefore the default warping algorithm eats one corner of the image. Have a try with thin plate splin (-tps) instead.  There may be some bug, it does not feel right that some source data are lost with default algorithm.

-Jukka Rahkonen-


Lähettäjä: Hays Barrett <hays.barrett at gmail.com>
Lähetetty: tiistai 30. maaliskuuta 2021 19.32
Vastaanottaja: Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi>
Kopio: gdal-dev at lists.osgeo.org
Aihe: Re: [gdal-dev] Adding gcps to a raster using gdal_translate can result in data loss.

I put together a page that better explains the issue and used one of the actual images from our project.
https://haysbarrett.com/gdal_translate/
Thanks for looking into this for me.
-Hays

On Fri, Mar 26, 2021 at 2:59 PM jratike80 <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>> wrote:
Hi,

Please give an exact example. Preferably with a raster that can be created
from command line with gdal_create followed by other required commands. Or
alternatively Python code that re-produces the issue.

-Jukka Rahkonen-



Hays Barrett wrote
> If the gcps stretch the image beyond the dimensions of the original raster
> it appears to clip the data that sits outside of the original raster
> dimensions rather than increase the raster dimensions to fit the stretched
> data .
> Is this the expected behavior?
> If so is there a way to increase the dimensions of a raster so there is no
> data loss?
> Thanks,
> -Hays
>
> _______________________________________________
> gdal-dev mailing list

> gdal-dev at .osgeo<mailto:gdal-dev at .osgeo>

> https://lists.osgeo.org/mailman/listinfo/gdal-dev





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210330/3295a714/attachment-0001.html>


More information about the gdal-dev mailing list