[gdal-dev] Strange behaviour of gdal_translate

Even Rouault even.rouault at mines-paris.org
Fri May 29 14:17:07 EDT 2009


Antonio,

The behaviour you get is more or less expected. Generally in GDAL, either you 
have a geotransform with its projection, either you have GCPs with their 
associated projection. But having both at the same time isn't really 
supported. The fact that the VRT seems to accept that is more an accident 
than a feature I think.
As far as GeoTIFF is concerned, it's not a restriction of the driver, as the 
specification clearly doesn't support that. To make it short : you can have 
only one GeoTag that defines the projection, and you can have, either a 
tiepoint and the pixel size, either the geotransform matrix, either a list of 
GCP.  See http://www.remotesensing.org/geotiff/spec/geotiff2.6.html#2.6.1

Even

Le Friday 29 May 2009 14:28:08 Antonio Valentino, vous avez écrit :
> Hi list,
> I'm trying to convert the attached virtual file into a regular geo-tiff.
>
> Note that the dataset defines both a geo-transform and GCPs but
> they have different projections.
>
> After conversion if I call gdalinfo on the result file I get
>
> $ gdalinfo out.tif
> Driver: GTiff/GeoTIFF
> Files:out.tif
> Size is 22000, 21890 Coordinate System is:
> GEOGCS["WGS 84",
>     DATUM["WGS_1984",
>         SPHEROID["WGS 84",6378137,298.2572235630016,
>             AUTHORITY["EPSG","7030"]],
>         AUTHORITY["EPSG","6326"]],
>     PRIMEM["Greenwich",0],
>     UNIT["degree",0.0174532925199433],
>     AUTHORITY["EPSG","4326"]]
> Origin = (359183.000000000000000,4696272.000000000000000)
> Pixel Size = (0.500000000000000,-0.500000000000000)
> Metadata:
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (  359183.000, 4696272.000) (359183d 0'0.00"E,4696272d
> 0'17179869184.00"N) Lower Left  (  359183.000, 4685327.000) (359183d
> 0'0.00"E,4685327d 0'17179869184.00"N) Upper Right (  370183.000,
> 4696272.000) (370183d 0'0.00"E,4696272d 0'17179869184.00"N) Lower Right
> (  370183.000, 4685327.000) (370183d 0'0.00"E,4685327d
> 0'17179869184.00"N) Center      (  364683.000, 4690799.500) (364683d
> 0'0.00"E,4690799d30'17179869184.00"N) Band 1 Block=22000x1 Type=UInt16,
> ColorInterp=Gray NoData Value=0
>
>
>
> The generated geo-tiff has wrong projection info.
>
> Is this a but?
>
> Is there some rule to determine which geographic information is
> authoritative?
>
>
> Best regards




More information about the gdal-dev mailing list