[gdal-dev] Gdal_edit and -gcp as read-only

Even Rouault even.rouault at spatialys.com
Mon Nov 22 06:04:42 PST 2021


Hi Jukka,

from what I can see in 
https://github.com/OSGeo/gdal/commit/b5128c1ff3ac6ad44b225284f5be1f728840e7b3, 
this dates back to almost 20 years ago when SetGCPs() was initially 
implemented. And at that time, PAM didn't exist yet in GDAL :-)

Please create a ticket about (and mention SetGeoTransform() and 
SetSpatialRef() have the same issue)

Even

Le 22/11/2021 à 14:49, Rahkonen Jukka (MML) a écrit :
>
> Hi,
>
> I tried to add ground control points into a TIFF file with gdal_edit. 
> I do not want to touch the TIFF so I used the read-only option and 
> supposed that gcp would be written into .aux.xml file but that did not 
> happen. Instead I got a message
>
> gdal_edit -ro -gcp 1 1 20 30 test.tif
> ERROR 6: test.tif: SetGCPs() is only supported on newly created 
> GeoTIFF files.
>
> Without -ro gdal_edit adds ground control points into the TIFF without 
> errors. What might be the meaning of the message about “newly created 
> GeoTIFF” and is there some way to make gdal_edit to write ground 
> control points into PAM file? I know that I can use gdal_translate and 
> VRT as a workaround but PAM .aux.xml could be a bit better for my 
> whole workflow.
>
> -Jukka Rahkonen-
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211122/cba631fc/attachment.html>


More information about the gdal-dev mailing list