【发布时间】:2017-08-28 16:17:52
【问题描述】:
虽然有几个页面专门用于这项任务,但似乎我无法完成这项工作。我有一个非地理参考 tif 文件,我为您提供 gdalinfo 的输出
Driver: GTiff/GeoTIFF
Files: Arctic_r05c02.2017235.terra.250m.tif
Size is 4096, 4096
Coordinate System is `'
Metadata:
TIFFTAG_SOFTWARE=ppm2geotiff v0.0.9
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 4096.0)
Upper Right ( 4096.0, 0.0)
Lower Right ( 4096.0, 4096.0)
Center ( 2048.0, 2048.0)
Band 1 Block=4096x1 Type=Byte, ColorInterp=Red
Band 2 Block=4096x1 Type=Byte, ColorInterp=Green
Band 3 Block=4096x1 Type=Byte, ColorInterp=Blue
我确实有纬度/经度的角坐标延伸。因此,我正在使用以下命令创建地面控制点:
gdal_translate -of GTiff -gcp 0 0 -180.0000 +63.1066 -gcp 0 4096 -161.5651 +68.5979 -gcp 4096 0 +161.5651 +68.5979 -gcp 4096 4096 -180.0000 +76.3728 input.tif output.tif
结果:
Driver: GTiff/GeoTIFF
Files: Arctic_r05c02.2017235.terra.250mproj.tif
Size is 4096, 4096
Coordinate System is `'
GCP Projection =
GCP[ 0]: Id=1, Info=
(0,0) -> (-180,63.1066,0)
GCP[ 1]: Id=2, Info=
(0,4096) -> (-161.5651,68.5979,0)
GCP[ 2]: Id=3, Info=
(4096,0) -> (161.5651,68.5979,0)
GCP[ 3]: Id=4, Info=
(4096,4096) -> (-180,76.3728,0)
Metadata:
TIFFTAG_SOFTWARE=ppm2geotiff v0.0.9
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 4096.0)
Upper Right ( 4096.0, 0.0)
Lower Right ( 4096.0, 4096.0)
Center ( 2048.0, 2048.0)
Band 1 Block=4096x1 Type=Byte, ColorInterp=Red
Band 2 Block=4096x1 Type=Byte, ColorInterp=Green
Band 3 Block=4096x1 Type=Byte, ColorInterp=Blue
下一步是使用 gdalwarp 重新采样以创建投影文件。
gdalwarp -r near -s_srs epsg:4326 -t_srs epsg:3413 -tr 250 250 input.tif output.tif
知道我还能做什么吗?有没有办法直接更改 tiff 文件中的角坐标而不是添加 GCP?会有帮助吗?
我忘记了更多信息。数据可在以下网址下载:
https://lance-modis.eosdis.nasa.gov/imagery/subsets/?subset=Arctic_r05c02.2017235.terra.250m
对于边界框的定义:
https://lance-modis.eosdis.nasa.gov/imagery/subsets/?subset=Arctic_r05c02.2017235.terra.250m.met
由于 NASA 方面的框定义看起来有点奇怪,我尝试了以下图块的相同程序:
https://lance-modis.eosdis.nasa.gov/imagery/subsets/?subset=Arctic_r04c03.2017235.terra.250m
和框定义:
https://lance-modis.eosdis.nasa.gov/imagery/subsets/?subset=Arctic_r04c03.2017235.terra.250m.met
虽然盒子看起来不错,但生成了以下图像:
【问题讨论】:
-
您确定您正确映射了坐标吗?例如,您的左上 x 坐标(经度)与右下 x 坐标相同,均为 -180。这并非不可能,但这意味着您的输入数据相对于 epsg:4326 旋转了 45 度。输入数据是否有可能是公开的?否则它的猜测。
-
嗨,Rutger,感谢您的帖子。你对盒子的定义是正确的。这就是为什么我尝试使用另一块瓷砖。我更新了我的帖子以包含数据源以及我到目前为止所做的事情。希望这有助于找出这里有什么问题..
标签: gdal