示例#1
0
文件: osr.go 项目: kikht/gdal
// Set the angular units for the geographic coordinate system
func (sr SpatialReference) SetAngularUnits(units string, radians float64) error {
	cUnits := C.CString(units)
	defer C.free(unsafe.Pointer(cUnits))
	err := C.OSRSetAngularUnits(sr.cval, cUnits, C.double(radians))
	if err != 0 {
		return error(err)
	}

	return nil
}
示例#2
0
文件: osr.go 项目: sn-amber/gdal
// Set the angular units for the geographic coordinate system
func (sr SpatialReference) SetAngularUnits(units string, radians float64) error {
	cUnits := C.CString(units)
	defer C.free(unsafe.Pointer(cUnits))
	return C.OSRSetAngularUnits(sr.cval, cUnits, C.double(radians)).Err()
}