Package pygeodesy :: Module geodesici :: Class Intersector
[frames] | no frames]

Class Intersector

  object --+        
           |        
named._Named --+    
               |    
named._NamedBase --+
                   |
                  Intersector

Finder of intersections between two goedesic lines, each an instance of GeodesicLineExact, wrapped GeodesicLine or GeodesicLineSolve.


See Also: Karney's C++ class Intersect for more details.

Instance Methods
 
__init__(self, geodesic, **name)
New Intersector.
 
All(self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0), **sMax)
Find all intersection of two geodesic lines up to a limit.
 
All5(self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0), aMax=0, **sMax)
Find all intersection of two geodesic lines up to a limit.
 
Closest(self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0))
Find the closest intersection of two geodesic lines.
 
Closest5(self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0))
Find the closest intersection of two geodesic lines.
 
Line(self, lat1, lon1, azi_lat2, *lon2, **name)
Return a geodesic line from this Intersector's geodesic, specified by two (goedetic) points or a (goedetic) point and an (initial) azimuth.
 
Next(self, glA, glB, **eps)
Yield the next intersection of two intersecting geodesic lines.
 
Next5(self, glA, glB, eps=6.66133814775e-16)
Yield the next intersection of two intersecting geodesic lines.
 
Next5s(self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0), aMax=1801, sMax=0, avg=False, **Delta)
Yield Next intersections up to a maximal (angular) distance.
 
toStr(self, **prec_sep_name)
Return this Intersector as string.

Inherited from named._NamedBase: __repr__, __str__, others, toRepr

Inherited from named._Named: __imatmul__, __matmul__, __rmatmul__, attrs, classof, copy, dup, methodname, rename, renamed, toStr2

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties
  a
Get the equatorial radius, semi-axis (meter).
  equatoradius
Get the equatorial radius, semi-axis (meter).
  Delta
Get the equality and tiling margin (meter).
  ellipsoid
Get the geodesic's ellipsoid (Ellipsoid).
  f
Get the flattening (scalar), 0 for spherical, negative for prolate.
  flattening
Get the flattening (scalar), 0 for spherical, negative for prolate.
  geodesic
Get the geodesic (Geodesic...).
  R
Get the authalic earth radius (meter).

Inherited from named._Named: classname, classnaming, iteration, name, named, named2, named3, named4, sizeof

Inherited from object: __class__

Method Details

__init__ (self, geodesic, **name)
(Constructor)

 

New Intersector.

Arguments:
Raises:
  • GeodesicError - The eccentricity of the geodesic's ellipsoid is too large or no initial convergence.
Overrides: object.__init__

See Also: The Note at Karney's C++ Intersect.

All (self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0), **sMax)

 

Find all intersection of two geodesic lines up to a limit.

Arguments:
  • glA - A geodesic line (Line).
  • glB - An other geodesic line (Line).
  • X0 - Optional offsets along the geodesic lines (XDist).
  • sMax - Optional, upper limit sMax=2*PI*R for the distance (meter).
Returns:
Yield an XDist for each intersection found.
Raises:

All5 (self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0), aMax=0, **sMax)

 

Find all intersection of two geodesic lines up to a limit.

Arguments:
  • aMax - Upper limit for the angular distance (degrees) or None or 0 for unlimited.
Returns:
Yield an Intersector5Tuple(A, B, sAB, aAB, c) for each intersection found.

See Also: Methods All for further details.

Closest (self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0))

 

Find the closest intersection of two geodesic lines.

Arguments:
  • glA - A geodesic line (Line).
  • glB - An other geodesic line (Line).
  • X0 - Optional offsets along the geodesic lines (XDist).
Returns:
The intersection (XDist) or None if none found.
Raises:

Closest5 (self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0))

 

Find the closest intersection of two geodesic lines.

Returns:
An Intersector5Tuple(A, B, sAB, aAB, c) or None if none found.

See Also: Method Closest for further details.

Line (self, lat1, lon1, azi_lat2, *lon2, **name)

 

Return a geodesic line from this Intersector's geodesic, specified by two (goedetic) points or a (goedetic) point and an (initial) azimuth.

Arguments:
  • lat1 - Latitude of the first point (degrees).
  • lon1 - Longitude of the first point (degrees).
  • azi_lat2 - Azimuth at the first point (compass degrees) if no lon2 argument is given, otherwise the latitude of the second point (degrees).
  • lon2 - If given, the longitude of the second point (degrees).
  • name - Optional name=NN (str).
Returns:
A line (from geodesic.Line or -.InverseLine), properly configured for Intersector.

Next (self, glA, glB, **eps)

 

Yield the next intersection of two intersecting geodesic lines.

Arguments:
  • glA - A geodesic line (Line).
  • glB - An other geodesic line (Line).
  • eps - Optional equality margin eps=Delta (degrees).
Returns:
The intersection (XDist) or None if none found.
Raises:

Note: Offset X0 is implicit, zeros.

Next5 (self, glA, glB, eps=6.66133814775e-16)

 

Yield the next intersection of two intersecting geodesic lines.

Returns:
An Intersector5Tuple(A, B, sAB, aAB, c) or None if none found.

See Also: Method Next for further details.

Next5s (self, glA, glB, X0=XDist(c=0, sA=0, sB=0, sX0=0), aMax=1801, sMax=0, avg=False, **Delta)

 

Yield Next intersections up to a maximal (angular) distance.

Arguments:
  • aMax - Upper limit for the angular distance (degrees) or None or 0 for unlimited.
  • sMax - Upper limit for the distance (meter) or None or 0 for unlimited.
  • avg - If True, set the next intersection lat- and longitude to the mid-point of the previous ones (bool).
  • Delta - Optional, margin overrding this margin (meter), see prpoerty Delta.
Returns:
Yield an Intersector5Tuple(A, B, sAB, aAB, c) for every intersection found.

See Also: Methods Next5 for further details.

toStr (self, **prec_sep_name)

 

Return this Intersector as string.

Returns:
Intersector (str).
Overrides: named._Named.toStr

See Also: Ellipsoid.toStr for further details.


Property Details

a

Get the equatorial radius, semi-axis (meter).

Get method:
a(self) - Get the equatorial radius, semi-axis (meter).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

equatoradius

Get the equatorial radius, semi-axis (meter).

Get method:
a(self) - Get the equatorial radius, semi-axis (meter).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

Delta

Get the equality and tiling margin (meter).

Get method:
Delta(self) - Get the equality and tiling margin (meter).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

ellipsoid

Get the geodesic's ellipsoid (Ellipsoid).

Get method:
ellipsoid(self) - Get the geodesic's ellipsoid (Ellipsoid).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

f

Get the flattening (scalar), 0 for spherical, negative for prolate.

Get method:
f(self) - Get the flattening (scalar), 0 for spherical, negative for prolate.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

flattening

Get the flattening (scalar), 0 for spherical, negative for prolate.

Get method:
f(self) - Get the flattening (scalar), 0 for spherical, negative for prolate.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

geodesic

Get the geodesic (Geodesic...).

Get method:
geodesic(self) - Get the geodesic (Geodesic...).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

R

Get the authalic earth radius (meter).

Get method:
R(self) - Get the authalic earth radius (meter).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.