[Gdaldev] adding gcp's

以下连续4封邮件说明了gdal中如何添加gcp,如何利用gcp,以及如何通过gdalwarp将gcp表示的参考关系转换为用tfw等表的仿射关系。并且GDAL的文档中有一段说明了gcp和仿射转换的关系:

The GDAL库 data model does not imply a transformation mechanism that must be generated from the GCPs ... this is left to the application. However 1st to 5th order polynomials are common.

Normally a dataset will contain either an affine geotransform, GCPs or neither. It is uncommon to have both, and it is undefined which is authoritative.

按照李林的翻译是:GDAL数据模型没有实现由GCPs...产生坐标系的变化的机制,而是把它留给实际应用。但是1到5阶多项式是通常使用的方法。通常一个数据集会包含仿射地理变换。和GCPS中的一个或者两个都没有。两个都有很少见。而且无法用权威坐标系定义。

这说明gdalwarp可以根据gcp点来生成仿射关系,从而达到简单的旋转拉伸几何纠正的目的,但是纠正的机制仅限于多项式的方式。

[Gdal-dev] adding gcp's

[Gdal-dev] adding gcp's

Bart van den Eijnden BEN at Syncera-ITSolutions.NL
Tue Aug 23 11:26:17 EDT 2005
Hi list,

I am trying to create a geotiff and add ground control points to it, using the following command:

gdal_translate ondergrond.tif ondergrond_new.tif -gcp 0 0 63978 458335 -gcp 1290 1619 85630 438699

When I do gdalinfo, the gcp's are added, but the corner info is not using it:

D:\ms4w\apps\stragisweb\htdocs\sites\westland\data\basis\geo>gdalinfo ondergrond_new.tif
Driver: GTiff/GeoTIFF
Size is 1290, 1169
Coordinate System is `'
GCP Projection =
GCP[ 0]: Id=1, Info=
(0,0) -> (63978,458335,0)
GCP[ 1]: Id=2, Info=
(1290,1619) -> (85630,438699,0)
Metadata:
TIFFTAG_SOFTWARE=IrfanView
TIFFTAG_XRESOLUTION=150
TIFFTAG_YRESOLUTION=150
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 1169.0)
Upper Right ( 1290.0, 0.0)
Lower Right ( 1290.0, 1169.0)
Center ( 645.0, 584.5)
Band 1 Block=1290x6 Type=Byte, ColorInterp=Red
Band 2 Block=1290x6 Type=Byte, ColorInterp=Green
Band 3 Block=1290x6 Type=Byte, ColorInterp=Blue

What am I doing wrong?

Thanks in advance.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl


More information about the Gdal-dev mailing list
原文地址:https://www.cnblogs.com/flyingfish/p/866991.html