为什么gdalwarp在同一个文件上给出了两个不同的结果?

时间:2014-10-24 07:26:47

标签: tiff gdal netcdf geotiff epsg

我正在使用GDAL(GDAL 1.9.2,发布时间为2012/10/08)来更改GeoTiff文件中的EPSG参考。我在两台不同的计算机上执行完全相同的命令(使用相同版本的GDAL和tiff库)。我得到两个不同的结果......我没有选择,任何想法?我应该看看哪个地方?

命令:

gdalwarp -s_srs EPSG:3975 -t_srs EPSG:4326 input.tif output.tif

输入文件:

Driver: GTiff/GeoTIFF
Files: input.tif
Size is 1388, 584
Coordinate System is `'
Origin = (-17321655.543400000780821,7332251.365589999593794)
Pixel Size = (24959.157843515851710,-25110.449882157532556)
Metadata:
lat#_FillValue=9.96921e+36
lat#long_name=latitude
lat#units=degrees_north
lon#_FillValue=9.96921e+36
lon#long_name=longitude
lon#units=degrees_east
NC_GLOBAL#conventions=CF-1.4
NC_GLOBAL#creation_date=2014-10-20T16:12:01
NC_GLOBAL#datum=+ellps = WGS84
NC_GLOBAL#ease_global=yes
NC_GLOBAL#ease_origin_lat=-83.517136
NC_GLOBAL#ease_origin_lon=-179.87032
NC_GLOBAL#ease_projection=cylindrical
NC_GLOBAL#ease_resolution=25
NC_GLOBAL#grip_mapping=projection
NC_GLOBAL#history=none
NC_GLOBAL#institution=SMOS CATDS Processing Chain
NC_GLOBAL#netcdf_version_id=3.6.2
NC_GLOBAL#product_version=1.0
NC_GLOBAL#proj4text=+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs
NC_GLOBAL#srid=EPSG:3975
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-17321655.543, 7332251.366)
Lower Left  (-17321655.543,-7332251.366)
Upper Right (17321655.543, 7332251.366)
Lower Right (17321655.543,-7332251.366)
Center      (   0.0000000,   0.0000000)
Band 1 Block=1388x1 Type=Float64, ColorInterp=Gray

在计算机A上(我期待的结果):

Driver: GTiff/GeoTIFF
Files: output.tif
Size is 1355, 657
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"]]
Origin = (-179.524544819822239,87.025797325816669)
Pixel Size = (0.264973369536817,-0.264973369536817)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-179.5245448,  87.0257973) (179d31'28.36"W, 87d 1'32.87"N)
Lower Left  (-179.5245448, -87.0617065) (179d31'28.36"W, 87d 3'42.14"S)
Upper Right ( 179.5143709,  87.0257973) (179d30'51.74"E, 87d 1'32.87"N)
Lower Right ( 179.5143709, -87.0617065) (179d30'51.74"E, 87d 3'42.14"S)
Center      (  -0.0050870,  -0.0179546) (  0d 0'18.31"W,  0d 1' 4.64"S)
Band 1 Block=1355x1 Type=Float64, ColorInterp=Gray

在计算机B上(具有完全相同的输入和命令):

Driver: GTiff/GeoTIFF
Files: output.tif
Size is 1358, 651
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"]]
Origin = (-179.674959335984454,86.219877359659435)
Pixel Size = (0.264688310439600,-0.264688310439600)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-179.6749593,  86.2198774) (179d40'29.85"W, 86d13'11.56"N)
Lower Left  (-179.6749593, -86.0922127) (179d40'29.85"W, 86d 5'31.97"S)
Upper Right ( 179.7717662,  86.2198774) (179d46'18.36"E, 86d13'11.56"N)
Lower Right ( 179.7717662, -86.0922127) (179d46'18.36"E, 86d 5'31.97"S)
Center      (   0.0484035,   0.0638323) (  0d 2'54.25"E,  0d 3'49.80"N)
Band 1 Block=1358x1 Type=Float64, ColorInterp=Gray

1 个答案:

答案 0 :(得分:0)

感谢GDAL dev邮件列表,我找到了负责人:

一方面我有: proj-4 v7.0-1

另一方面(在预期结果的计算机上): proj-4 v8.0-3

在两台计算机上使用proj-4 v8.0-3,我得到的结果相同。