Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5945 closed defect (fixed)

Clearing GCPs on TIFF fails

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: GTIFF
Cc:

Description

Clearing the GCPs on this TIFF file with the following script has no effect. Why?

from osgeo import gdal
vrt_ds = gdal.Open('work.tif',gdal.GA_Update)
vrt_ds.SetGCPs([], '')
vrt_ds = None
$ python clear_gcps.py 
warmerdam@gdal.cmo:~/wrk1
$ gdalinfo work.tif 
Driver: GTiff/GeoTIFF
Files: work.tif
Size is 5, 5
Coordinate System is `'
GCP Projection = 
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
GCP[  0]: Id=1, Info=
          (0.5,0.5) -> (-115.195,32.6336111111111,0)
GCP[  1]: Id=2, Info=
          (11778.5,0.5) -> (-114.318611111111,32.4977777777778,0)
GCP[  2]: Id=3, Info=
          (11778.5,7619.5) -> (-114.443611111111,32.0633333333333,0)
GCP[  3]: Id=4, Info=
          (0.5,7619.5) -> (-115.316111111111,32.1986111111111,0)
...

Attachments (1)

work.tif (1.2 KB) - added by warmerdam 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by warmerdam

Attachment: work.tif added

comment:1 Changed 6 years ago by Even Rouault

trunk r29039 "GTiff: fix clearing of GCPs (#5945)"

comment:2 Changed 6 years ago by Even Rouault

trunk r29041 "GTiff: Amend previous commit to fix failures in overviewds_3 and vrtwarp_7. The ForceUnset? flags can only be set to TRUE in the SetProjection?, SetGeoTransform? and SetGCPs method, and reset in WriteGeoTIFFInfo() (#5945)"

comment:3 Changed 6 years ago by Even Rouault

Milestone: 2.0

comment:4 Changed 6 years ago by Even Rouault

Resolution: fixed
Status: newclosed

comment:5 Changed 6 years ago by Even Rouault

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.