#6751 closed defect (fixed)
Bug in GDAL SetGCPs
Reported by: | dandev | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | 2.2.0 |
Component: | GDAL_Raster | Version: | 2.1.2 |
Severity: | normal | Keywords: | gtiff gcp geotransform |
Cc: |
Description
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.
Thanks
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Thanks for your quick reply. I did not know that I had to clear the geotransform.
comment:4 by , 8 years ago
Component: | PythonBindings → GDAL_Raster |
---|---|
Keywords: | gtiff gcp geotransform added |
Milestone: | → 2.2.0 |
I've pushed an improvement so that this works out of the box (with a warning)
Note:
See TracTickets
for help on using tickets.
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.
Ex: