GDALSetProjection 简述
GDALSetProjection
是用来给GDALDataset
设定投影信息(坐标系统)的接口,实际上是GDALDataset::SetProjection
这个虚函数的转调而已。官网文档描述如下:
CPLErr GDALDataset::SetProjection (const char * pszProjection )
Set the projection reference string for this dataset.
The string should be in OGC WKT or PROJ.4 format. An error may occur because of incorrectly specified projection strings, because the dataset is not writable, or because the dataset does not support the indicated projection. Many formats do not support writing projections.
This method is the same as the CGDALSetProjection()
function.
Parameters
pszProjection projection reference string.
Returns
CE_Failure if an error occurs, otherwise CE_None.