使用GCP'

时间:2018-02-13 15:17:18

标签: gdal reprojection-error

我有一个来自sentinel1数据的预测tiff文件(s1a-ew-grd-hh-20180208t071218-20180208t071323-020512-023164-001.tiff)(我们称之为test.tiff),其中包含以下WKT格式的投影: / p>

PROJCS["WGS 84",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"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",70],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]

这应该相当于Arctic Polar Stereographic(epsg 3995)。我的目标是通过插入一些GCP来略微调整图像并对其进行扭曲。为了仔细检查这个方法,我从一个简单的案例开始,在那里我从投影图像(test.tiff)获得角坐标:

Size is 17959, 18039
Corner Coordinates:
Upper Left  (  457598.467, -240151.021) ( 17d18'33.06"E, 85d13'55.33"N)
Lower Left  (  457598.467,-1142101.021) ( 23d 9'56.93"W, 78d40'39.65"N)
Upper Right ( 1355548.467, -240151.021) ( 34d57'13.08"E, 77d20'28.88"N)
Lower Right ( 1355548.467,-1142101.021) (  4d53' 4.53"E, 73d44'33.76"N)
Center      (  906573.467, -691126.021) (  7d40'47.73"E, 79d30'17.56"N)

我根据这个设置了GCP。因此:

gdal_translate -gcp 0.0 0.0 457598.467 -240151.021 -gcp 0.0 18039.0 1355548.467 -240151.021 -gcp 17959.0 18039.0 1355548.467 -1142101.021 -gcp 17959.0 0.0 457598.467 -1142101.021 -a_srs WKT_PROJECTION test.tiff gcp.tiff

然后,我使用-tps选项对图像进行扭曲,以使用GCP信息强制变形。

gdalwarp -tps gcp.tiff gcp_warped.tiff

可以预期test.tiff和gcp_warped.tiff文件应该重合,遗憾的是不是这样:

enter image description here

在上述程序中是否有我遗漏的东西?或者还有其他工作吗?

0 个答案:

没有答案