示例#1
0
文件: gdal.go 项目: kikht/gdal
// Set the projection reference string
func (dataset Dataset) SetProjection(proj string) error {
	cProj := C.CString(proj)
	defer C.free(unsafe.Pointer(cProj))

	err := C.GDALSetProjection(dataset.cval, cProj)
	if err != 0 {
		return error(err)
	}

	return nil
}
示例#2
0
文件: gdal.go 项目: colek42/gdal
// Set the projection reference string
func (dataset Dataset) SetProjection(proj string) error {
	cProj := C.CString(proj)
	defer C.free(unsafe.Pointer(cProj))

	return C.GDALSetProjection(dataset.cval, cProj).Err()
}