hi list,
I have run the following Python codes to add more GCPs to RSAT-2's
single channel GeoTiff imagery_HH.tif.
But when I apply it on RSAT-2 NITF format imagery_HH.ntf, all the GCPs
went to an anxiliary file "imagery_HH_GCPs.ntf.aux.xml".
How can I add the GCPs directly into imagery_HH.ntf?
thanks,
Shawn
... ...
dest_ds = gdal.GetDriverByName("NITF").CreateCopy(dest_file,
source_DN_ds, 0)
# get projection
projection = source_GCP_ds.GetGCPProjection()
if projection is None:
projection = source_GCP_ds.GetProjection()
# get GCPs
gcplist = []
gcps = source_GCP_ds.GetGCPs()
for item in gcps:
gcplist.append(item)
# writing GCPs to dest_ds
dest_ds.SetGCPs(gcplist, projection)
# close datasets properly and flush dest_ds to disk
source_GCP_ds.FlushCache()
source_GCP_ds = None
source_DN_ds.FlushCache()
source_DN_ds = None
dest_ds.FlushCache()
dest_ds = None
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev