// Initialize SRS based on WKT string func (sr SpatialReference) FromWKT(wkt string) error { cString := C.CString(wkt) defer C.free(unsafe.Pointer(cString)) err := C.OSRImportFromWkt(sr.cval, &cString) if err != 0 { return error(err) } return nil }
// Initialize SRS based on WKT string func (sr SpatialReference) FromWKT(wkt string) error { cString := C.CString(wkt) defer C.free(unsafe.Pointer(cString)) return C.OSRImportFromWkt(sr.cval, &cString).Err() }