Opened 6 years ago
Closed 6 years ago
Last modified 6 years ago
#6751 closed defect (fixed)
Bug in GDAL SetGCPs
|Reported by:||dandev||Owned by:||hobu|
|Severity:||normal||Keywords:||gtiff gcp geotransform|
I'm trying to automatically add GCPs to a geotiff using python APIs. I followed as example the gdal_edit.py file but I have discovered that both my implementation and the gdal_edit one are not adding GCPs in the tiff header. The gdal_translate implementation works well instead (checked with gdalinfo). Unfortunately, I cannot rely on gdal_translate because of the char limitation of the command line in Windows.
Change History (4)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Thanks for your quick reply. I did not know that I had to clear the geotransform.
comment:3 by , 6 years ago
|Status:||new → closed|
comment:4 by , 6 years ago
|Component:||PythonBindings → GDAL_Raster|
|Keywords:||gtiff gcp geotransform added|
I've pushed an improvement so that this works out of the box (with a warning)
That works for me. If your raster has initially a geotransform you need to unset it with gdal_edit.py -unsetgt, then -gcp will work.