// 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() }
// Build a polygon / ring from a set of lines func (geom Geometry) BuildPolygonFromEdges(autoClose bool, tolerance float64) (Geometry, error) { var cErr C.OGRErr newGeom := C.OGRBuildPolygonFromEdges( geom.cval, 0, BoolToCInt(autoClose), C.double(tolerance), &cErr, ) return Geometry{newGeom}, cErr.Err() }
// Get spheroid inverse flattening axis func (sr SpatialReference) InverseFlattening() (float64, error) { var cErr C.OGRErr flat := C.OSRGetInvFlattening(sr.cval, &cErr) return float64(flat), cErr.Err() }
// Get spheroid semi-minor axis func (sr SpatialReference) SemiMinorAxis() (float64, error) { var cErr C.OGRErr axis := C.OSRGetSemiMinor(sr.cval, &cErr) return float64(axis), cErr.Err() }