[gdal-dev] Gdalwarp of GLOBCOVER to UTMSpecific Zone

Even Rouault even.rouault at mines-paris.org
Mon May 24 13:44:49 EDT 2010


Luisa,

This is the right command to do what you want. However I think the error is 
already when reading the input file (you could confirm by issuing 
gdalinfo -checksum INPUT.tif). There's always the possibility that the input 
image is corrupted (but even in that case, it would be good that GDAL doesn't 
cause a segmentation fault). But you didn't mention your version of GDAL or 
how you did get it (pre-built or built by yourself). Did you try with a 
recent version, possibly with internal libtiff support, in case it was an 
issue that has been addressed now ? Perhaps you could share the image or a 
link to it for others to confirm.

(This is normal that the output image has not the same size as the input image 
as warping changes the shape and dimensions of the image. And even for images 
of same dimensions the resulting TIFF can have different sizes due to the way 
they are written, compression options, etc...)

Le Monday 24 May 2010 19:10:59 Luisa Peña, vous avez écrit :
> Hi there
>
> I'm a bit of a newbie in GDAL but I tried to warp a GLOBCOVER image with
> this information:
> Coordinate System is:
> 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"]]
>
> Into an UTM  zone (EPSG:21036)
>
> I runned this command:
> gdalwarp -t_srs "EPSG:21036"  INPUT.tif OUTPUT.tif
> And I get this Warning/ERROR:
> ERROR 1: TIFFFetchDirectory:MZ.tif: Can not read TIFF directory count
> ERROR 1: TIFFReadDirectory:Failed to read directory at offset 8
> ERROR 1: TIFFWriteEncodedStrip:Must set "ImageWidth" before writing data
> Segmentation fault
>
> And I obtained an OUTPUT.tif with a different size.
> - What might not be ok in this?
> - What can I do to obtain an image with the same size?
>
> Thanks
>
> best regards
> Luisa




More information about the gdal-dev mailing list