Opened 19 years ago
Last modified 19 years ago
#666 closed defect (fixed)
CreateCopy on South-Up Images
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
I've experienced this on Sun and Windows. Upon testing with NITF's and GeoTiffs that our exactly south-up using the CreateCopy method flips Geolocation data, but not image data. Using the following code: GDALDatasetH hSrcDS = GDALOpen( inputFile.c_str(), GA_ReadOnly ); GDALDatasetH hDstDS; if( hSrcDS == NULL) return NULL; GDALDriverH hDriver = GDALGetDriverByName( "GTiff" ); hDstDS = GDALCreateCopy( hDriver, output.c_str(), hSrcDS, FALSE, NULL, NULL, NULL );
Change History (2)
comment:2 by , 19 years ago
I have confirmed the problem. The issue seems to be that the GeoTIFF driver always makes the "y" scale positive when writing a tiepoint+scale configuration GeoTIFF file. This is appropriate since this configuration would appear to assume north up. The fix is to write a geotransmatrix for southup images (the same as we need to do for rotated or sheared images). Fixed in CVS. ps. the reason the TIFF file worked was that it used GCP based control info. Any geotransform based south up file would have produced the same result if writing to GeoTIFF.
Note:
See TracTickets
for help on using tickets.