// Fetch a projection parameter value func (sr SpatialReference) ProjectionParameter(name string, defaultValue float64) (float64, error) { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) var cErr C.OGRErr value := C.OSRGetProjParm(sr.cval, cName, C.double(defaultValue), &cErr) return float64(value), cErr.Err() }
// Fetch a normalized projection parameter value func (sr SpatialReference) NormalizedProjectionParameter( name string, defaultValue float64, ) (float64, error) { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) var err C.OGRErr value := C.OSRGetProjParm(sr.cval, cName, C.double(defaultValue), &err) if err != 0 { return float64(value), error(err) } return float64(value), nil }