[gdal-dev] merging of files with gdalwarp causses a slight shift

Etienne Tourigny etourigny.dev at gmail.com
Tue Sep 6 21:05:40 EDT 2011


Hi All,

Merging 2 files with a geographical CRS results in the output being shifted
a quarter-pixel to the east and south.  The datum is WGS84 (altough not
explicitly named), I get the same result if I explicitly set it to WGS84.
SImilar data in modis sinusoidal projection gets merged fine with the same
command.

I am using the following command:
gdalwarp -srcnodata 0 -dstnodata 0 -co COMPRESS=LZW
MCD45monthly.burndate.Win06.2010-byte.tif
MCD45monthly.burndate.Win05.2010-byte.tif
MCD45monthly.burndate.sam.2010-Byte.tif

Files can be found at:
http://www.openclimgeo.org/pub/


Any help would be appreciated! Here is the gdalinfo for the 3 files.

Etienne

tourigny at supernova: /data/research/work/modis/mcd45/gtiff/out/upload $
gdalinfo MCD45monthly.burndate.Win05.2010-byte.tif
Driver: GTiff/GeoTIFF
Files: MCD45monthly.burndate.Win05.2010-byte.tif
Size is 10923, 5234
Coordinate System is:
GEOGCS[,
    DATUM["unknown",
        SPHEROID["unnamed",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Origin = (-81.997802734374957,12.997802734374995)
Pixel Size = (0.004394531250000,-0.004394531250000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -81.9978027,  12.9978027) ( 81d59'52.09"W, 12d59'52.09"N)
Lower Left  ( -81.9978027, -10.0031738) ( 81d59'52.09"W, 10d 0'11.43"S)
Upper Right ( -33.9963379,  12.9978027) ( 33d59'46.82"W, 12d59'52.09"N)
Lower Right ( -33.9963379, -10.0031738) ( 33d59'46.82"W, 10d 0'11.43"S)
Center      ( -57.9970703,   1.4973145) ( 57d59'49.45"W,  1d29'50.33"N)
Band 1 Block=10923x1 Type=Byte, ColorInterp=Gray
  NoData Value=0
tourigny at supernova: /data/research/work/modis/mcd45/gtiff/out/upload $
gdalinfo MCD45monthly.burndate.Win06.2010-byte.tif
Driver: GTiff/GeoTIFF
Files: MCD45monthly.burndate.Win06.2010-byte.tif
Size is 10240, 5689
Coordinate System is:
GEOGCS[,
    DATUM["unknown",
        SPHEROID["unnamed",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Origin = (-78.997802734374972,-10.002197265624996)
Pixel Size = (0.004394531250000,-0.004394531250000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -78.9978027, -10.0021973) ( 78d59'52.09"W, 10d 0' 7.91"S)
Lower Left  ( -78.9978027, -35.0026855) ( 78d59'52.09"W, 35d 0' 9.67"S)
Upper Right ( -33.9978027, -10.0021973) ( 33d59'52.09"W, 10d 0' 7.91"S)
Lower Right ( -33.9978027, -35.0026855) ( 33d59'52.09"W, 35d 0' 9.67"S)
Center      ( -56.4978027, -22.5024414) ( 56d29'52.09"W, 22d30' 8.79"S)
Band 1 Block=10240x1 Type=Byte, ColorInterp=Gray
  NoData Value=0
tourigny at supernova: /data/research/work/modis/mcd45/gtiff/out/upload $
gdalinfo MCD45monthly.burndate.sam.2010-Byte.tif
Driver: GTiff/GeoTIFF
Files: MCD45monthly.burndate.sam.2010-Byte.tif
Size is 10923, 10923
Coordinate System is:
GEOGCS[,
    DATUM["unknown",
        SPHEROID["unnamed",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Origin = (-81.997802734374957,12.997802734374995)
Pixel Size = (0.004394531250000,-0.004394531250000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -81.9978027,  12.9978027) ( 81d59'52.09"W, 12d59'52.09"N)
Lower Left  ( -81.9978027, -35.0036621) ( 81d59'52.09"W, 35d 0'13.18"S)
Upper Right ( -33.9963379,  12.9978027) ( 33d59'46.82"W, 12d59'52.09"N)
Lower Right ( -33.9963379, -35.0036621) ( 33d59'46.82"W, 35d 0'13.18"S)
Center      ( -57.9970703, -11.0029297) ( 57d59'49.45"W, 11d 0'10.55"S)
Band 1 Block=10923x1 Type=Byte, ColorInterp=Gray
  NoData Value=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110906/187ecf4a/attachment.html


More information about the gdal-dev mailing list