Пример #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
// 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()
}