Example #1
0
File: gdal.go Project: 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
}
Example #2
0
File: gdal.go Project: 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()
}