Example #1
0
File: osr.go Project: kikht/gdal
// Get spheroid semi-major axis
func (sr SpatialReference) SemiMajorAxis() (float64, error) {
	var err C.OGRErr
	axis := C.OSRGetSemiMajor(sr.cval, &err)
	if err != 0 {
		return float64(axis), error(err)
	}

	return float64(axis), nil
}
Example #2
0
File: osr.go Project: sn-amber/gdal
// Get spheroid semi-major axis
func (sr SpatialReference) SemiMajorAxis() (float64, error) {
	var cErr C.OGRErr
	axis := C.OSRGetSemiMajor(sr.cval, &cErr)
	return float64(axis), cErr.Err()
}