OMHGeopositionDataPoint.fromLocationDatum constructor

OMHGeopositionDataPoint.fromLocationDatum(
  1. LocationDatum location
)

Implementation

factory OMHGeopositionDataPoint.fromLocationDatum(LocationDatum location) {
  var pos = omh.Geoposition(
      latitude: omh.PlaneAngleUnitValue(
          unit: omh.PlaneAngleUnit.DEGREE_OF_ARC, value: location.latitude),
      longitude: omh.PlaneAngleUnitValue(
          unit: omh.PlaneAngleUnit.DEGREE_OF_ARC, value: location.longitude),
      positioningSystem: omh.PositioningSystem.GPS);

  return OMHGeopositionDataPoint(omh.DataPoint(
      body: pos, provenance: OMHContextDataPointDatum.provenance));
}