我有一个Geotiff栅格图像,它的坐标系的纬度从0到360。图像的水平中心是180度。见下图:
我想将其转换为经度范围为-180 180的EPSG:4326 SRS。我希望图像的中心位于格林威治子午线(0)。我想这个SRS用途非常广泛。我希望结果看起来像这样:
因此,我使用gdalwarp命令重新投影:
gdalwarp -s_srs '+proj=latlong +datum=WGS84 +pm=180dW' -t_srs EPSG:4326 test_col.tif test_4326.tif
但是我只会看到尺寸更大(像素更多)和EPSG:4326元数据的tiff。图像本身看起来与初始图像相同。但我希望它能交换半球。
问题是-如何将图像的经度严格调整为-180 180 EPSG:4326,且中心在0度的经度?
这是我的初始文件的gdalinfo:
Origin = (-0.102272598067084,89.946211604095552)
Pixel Size = (0.204545196134167,-0.204423208191126)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( -0.1022726, 89.9462116) ( 0d 6' 8.18"W, 89d56'46.36"N)
Lower Left ( -0.1022726, -89.9462116) ( 0d 6' 8.18"W, 89d56'46.36"S)
Upper Right ( 359.897, 89.946) (359d53'50.18"E, 89d56'46.36"N)
Lower Right ( 359.897, -89.946) (359d53'50.18"E, 89d56'46.36"S)
Center ( 179.8975000, -0.0000000) (179d53'51.00"E, 0d 0' 0.00"S)
这是gdalwarp之后的gdalinfo
Origin = (-180.102727401932952,89.946211604095552)
Pixel Size = (0.091397622896436,-0.091420837939082)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (-180.1027274, 89.9462116) (180d 6' 9.82"W, 89d56'46.36"N)
Lower Left (-180.1027274, -89.9699975) (180d 6' 9.82"W, 89d58'11.99"S)
Upper Right ( 179.8211116, 89.9462116) (179d49'16.00"E, 89d56'46.36"N)
Lower Right ( 179.8211116, -89.9699975) (179d49'16.00"E, 89d58'11.99"S)
Center ( -0.1408079, -0.0118929) ( 0d 8'26.91"W, 0d 0'42.81"S)
-tr xres yres
标志?