// Set a projection by name func (sr SpatialReference) SetProjectionByName(name string) error { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) err := C.OSRSetProjection(sr.cval, cName) if err != 0 { return error(err) } return nil }
// Set a projection by name func (sr SpatialReference) SetProjectionByName(name string) error { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return C.OSRSetProjection(sr.cval, cName).Err() }