我有一个 jpg 图像,我想将其转换为 GeoTiff。我用GDAL做了以下事情:
gdal_translate -a_srs "+proj=latlong +datum=WGS84" -of GTiff -co "INTERLEAVE=PIXEL" -a_ullr -112.749767303467 40.2223700746836 -112.731463909149 40.2063119735618 image0.jpg image0.tif
这为 GeoTiff 提供了以下地理数据(使用 gdalinfo):
Driver: GTiff/GeoTIFF
Files: image0.tif
Size is 853, 980
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 = (-112.749767303467000,40.222370074683603)
Pixel Size = (0.000021457672120,-0.000016385817471)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (-112.7497673, 40.2223701) (112d44'59.16"W, 40d13'20.53"N)
Lower Left (-112.7497673, 40.2063120) (112d44'59.16"W, 40d12'22.72"N)
Upper Right (-112.7314639, 40.2223701) (112d43'53.27"W, 40d13'20.53"N)
Lower Right (-112.7314639, 40.2063120) (112d43'53.27"W, 40d12'22.72"N)
Center (-112.7406156, 40.2143410) (112d44'26.22"W, 40d12'51.63"N)
Band 1 Block=853x3 Type=Byte, ColorInterp=Red
Band 2 Block=853x3 Type=Byte, ColorInterp=Green
Band 3 Block=853x3 Type=Byte, ColorInterp=Blue
我现在想使用 gdalwarp 向文件添加投影,所以我这样做:
gdalwarp -of GTiff -co "INTERLEAVE=PIXEL" -s_srs "+proj=utm +zone=12 +datum=WGS84" - t_srs "+proj=latlong +datum=WGS84" -r cubic image0.tif image0proj.tif
gdal info 的输出是:
Driver: GTiff/GeoTIFF
Files: image0proj.tif
Size is 974, 860
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 = (-115.489754008884220,0.000362780166170)
Pixel Size = (0.000000000168394,-0.000000000168394)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (-115.4897540, 0.0003628) (115d29'23.11"W, 0d 0' 1.31"N)
Lower Left (-115.4897540, 0.0003626) (115d29'23.11"W, 0d 0' 1.31"N)
Upper Right (-115.4897538, 0.0003628) (115d29'23.11"W, 0d 0' 1.31"N)
Lower Right (-115.4897538, 0.0003626) (115d29'23.11"W, 0d 0' 1.31"N)
Center (-115.4897539, 0.0003627) (115d29'23.11"W, 0d 0' 1.31"N)
Band 1 Block=974x2 Type=Byte, ColorInterp=Red
Band 2 Block=974x2 Type=Byte, ColorInterp=Green
Band 3 Block=974x2 Type=Byte, ColorInterp=Blue
我期望输出包含 UTM 中的投影信息,如下所示:
坐标系是:
PROJCS["UTM",
GEOGCS["WGS 84",
我究竟做错了什么?
提前致谢。
JC