[Gdal-dev] gdal_merge.py UTM rasters in different zones?

Larry Shaffer larry at shafferinteractive.com
Sat Jun 2 19:43:18 EDT 2007


Hi,

I have 2 UTM satellite images in different zones and when using gdal_merge.py to merge them they act as if they are in only one zone.

I get the following verbose output during merge:

Filename: p033r029_7t20000712_z13_nn10.tif
File Size: 8678x7751x1
Pixel Size: 28.500000 x -28.500000
UL:(548283.000000,5051226.000000)   LR:(795606.000000,4830322.500000)
Copy 0,0,8678,7751 to 12567,185,8678,7751.

Filename: p032r029_7t20010825_z14_nn10.tif
File Size: 9029x8099x1
Pixel Size: 28.500000 x -28.500000
UL:(190123.500000,5056498.500000)   LR:(447450.000000,4825677.000000)
Copy 0,0,9029,8099 to 0,0,9029,8099.


The second file should mosaic, overlain on the right side of the first. But, it ends up far to the left as if the Easting and Northings are for the same zone (regardless of zone). Same happens in QGIS and OpenEV. 

If I gdalwarp the files into LatLon then everything works fine. Although, I do not want to re-project the data.

Is there a way to merge UTM rasters in different zones with gdal_merge.py, without re-projection?


gdalinfo for the files is as follows (reads proper LatLon coords):

### gdalinfo for p033r029_7t20000712_z13_nn10.tif
Driver: GTiff/GeoTIFF
Size is 8678, 7751
Coordinate System is:
PROJCS["WGS 84 / UTM zone 13N",
    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"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-105],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32613"]]
Origin = (548283.000000000000000,5051226.000000000000000)
Pixel Size = (28.500000000000000,-28.500000000000000)
Metadata:
  AREA_OR_POINT=Point
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left  (  548283.000, 5051226.000) (104d22'50.71"W, 45d36'46.44"N)
Lower Left  (  548283.000, 4830322.500) (104d24'5.53"W, 43d37'27.56"N)
Upper Right (  795606.000, 5051226.000) (101d12'46.11"W, 45d33'6.32"N)
Lower Right (  795606.000, 4830322.500) (101d20'22.48"W, 43d34'2.10"N)
Center      (  671944.500, 4940774.250) (102d50'0.33"W, 44d35'59.16"N)
Band 1 Block=8678x1 Type=Byte, ColorInterp=Gray


### gdalinfo for p032r029_7t20010825_z14_nn10.tif
Driver: GTiff/GeoTIFF
Size is 9029, 8099
Coordinate System is:
PROJCS["WGS 84 / UTM zone 14N",
    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"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-99],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32614"]]
Origin = (190123.500000000000000,5056498.500000000000000)
Pixel Size = (28.500000000000000,-28.500000000000000)
Metadata:
  AREA_OR_POINT=Point
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left  (  190123.500, 5056498.500) (102d58'22.55"W, 45d35'34.43"N)
Lower Left  (  190123.500, 4825677.000) (102d50'2.76"W, 43d31'11.01"N)
Upper Right (  447450.000, 5056498.500) ( 99d40'28.34"W, 45d39'36.16"N)
Lower Right (  447450.000, 4825677.000) ( 99d39'3.23"W, 43d34'55.95"N)
Center      (  318786.750, 4941087.750) (101d17'0.19"W, 44d36'1.12"N)



More information about the Gdal-dev mailing list