def _GenDirect(self, lat1, lon1, azi1, arcmode, s12_a12, outmask): """Private: General version of direct problem""" from geographiclib.geodesicline import GeodesicLine # Automatically supply DISTANCE_IN if necessary if not arcmode: outmask |= Geodesic.DISTANCE_IN line = GeodesicLine(self, lat1, lon1, azi1, outmask) return line._GenPosition(arcmode, s12_a12, outmask)
def InverseLine(self, lat1, lon1, lat2, lon2, caps = GeodesicCapability.STANDARD | GeodesicCapability.DISTANCE_IN): """Define a GeodesicLine object in terms of the invese geodesic problem :param lat1: latitude of the first point in degrees :param lon1: longitude of the first point in degrees :param lat2: latitude of the second point in degrees :param lon2: longitude of the second point in degrees :param caps: the :ref:`capabilities <outmask>` :return: a :class:`~geographiclib.geodesicline.GeodesicLine` This function sets point 3 of the GeodesicLine to correspond to point 2 of the inverse geodesic problem. The default value of *caps* is STANDARD | DISTANCE_IN, allowing direct geodesic problem to be solved. """ from geographiclib.geodesicline import GeodesicLine a12, _, salp1, calp1, _, _, _, _, _, _ = self._GenInverse( lat1, lon1, lat2, lon2, 0) azi1 = Math.atan2d(salp1, calp1) if caps & (Geodesic.OUT_MASK & Geodesic.DISTANCE_IN): caps |= Geodesic.DISTANCE line = GeodesicLine(self, lat1, lon1, azi1, caps, salp1, calp1) line.SetArc(a12) return line
def GenDirect(self, lat1, lon1, azi1, arcmode, s12_a12, outmask): """Private: General version of direct problem""" from geographiclib.geodesicline import GeodesicLine line = GeodesicLine( self, lat1, lon1, azi1, # Automatically supply DISTANCE_IN if necessary outmask | (Geodesic.EMPTY if arcmode else Geodesic.DISTANCE_IN)) return line.GenPosition(arcmode, s12_a12, outmask)
def GenDirect(self, lat1, lon1, azi1, arcmode, s12_a12, outmask): from geographiclib.geodesicline import GeodesicLine line = GeodesicLine( self, lat1, lon1, azi1, # Automatically supply DISTANCE_IN if necessary outmask | (Geodesic.NONE if arcmode else Geodesic.DISTANCE_IN)) return line.GenPosition(arcmode, s12_a12, outmask)
def _GenDirectLine(self, lat1, lon1, azi1, arcmode, s12_a12, caps = GeodesicCapability.STANDARD | GeodesicCapability.DISTANCE_IN): """Private: general form of DirectLine""" from geographiclib.geodesicline import GeodesicLine # Automatically supply DISTANCE_IN if necessary if not arcmode: caps |= Geodesic.DISTANCE_IN line = GeodesicLine(self, lat1, lon1, azi1, caps) if arcmode: line.SetArc(s12_a12) else: line.SetDistance(s12_a12) return line
def Line(self, lat1, lon1, azi1, caps = ALL): """Return a GeodesicLine object to compute points along a geodesic starting at lat1, lon1, with azimuth azi1. caps is an or'ed combination of bit the following values indicating the capabilities of the returned object Geodesic.LATITUDE Geodesic.LONGITUDE Geodesic.AZIMUTH Geodesic.DISTANCE Geodesic.STANDARD (all of the above) Geodesic.REDUCEDLENGTH Geodesic.GEODESICSCALE Geodesic.AREA Geodesic.DISTANCE_IN Geodesic.ALL (all of the above) The default value of caps is ALL. """ from geographiclib.geodesicline import GeodesicLine lon1 = Geodesic.CheckPosition(lat1, lon1) azi1 = Geodesic.CheckAzimuth(azi1) return GeodesicLine( self, lat1, lon1, azi1, # Automatically supply DISTANCE_IN caps | Geodesic.DISTANCE_IN)
def Line(self, lat1, lon1, azi1, caps = GeodesicCapability.STANDARD | GeodesicCapability.DISTANCE_IN): """Return a GeodesicLine object :param lat1: latitude of the first point in degrees :param lon1: longitude of the first point in degrees :param azi1: azimuth at the first point in degrees :param caps: the :ref:`capabilities <outmask>` :return: a :class:`~geographiclib.geodesicline.GeodesicLine` This allows points along a geodesic starting at (*lat1*, *lon1*), with azimuth *azi1* to be found. The default value of *caps* is STANDARD | DISTANCE_IN, allowing direct geodesic problem to be solved. """ from geographiclib.geodesicline import GeodesicLine return GeodesicLine(self, lat1, lon1, azi1, caps)
def Position(self, s12, *outmask): d = _GeodesicLine.Position(self, s12, *outmask) return _Adict(d)
def ArcPosition(self, a12, *outmask): d = _GeodesicLine.ArcPosition(self, a12, *outmask) return _Adict(d)