Package gavo :: Package stc :: Module bboxes :: Class GCSegment
[frames] | no frames]

Class GCSegment

source code

object --+
         |
        GCSegment

A great circle segment on a sphere. It is assumed that it's no larger than pi.

Construction is long,lat, long, lat in rad (or use the fromDegrees class method.

Very small (<1e-8 rad, say) segments are not supported. You should probably work in the tangential plane on that kind of scale.

Instance Methods
 
__init__(self, long1, lat1, long2, lat2)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
latForLong(self, long)
returns the latitude the great circle is on for a given longitude.
source code
 
getBBs(self)
returns a sequence of bounding boxes for this great circle segment.
source code

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

Class Methods
 
fromDegrees(cls, long1, lat1, long2, lat2) source code
Properties

Inherited from object: __class__

Method Details

__init__(self, long1, lat1, long2, lat2)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

latForLong(self, long)

source code 

returns the latitude the great circle is on for a given longitude.

Input and output is in rad.

If the pole is part of the great circle, a constant (but fairly meaningless) value is returned.

getBBs(self)

source code 

returns a sequence of bounding boxes for this great circle segment.

Actually, the sequence contains one box for a segment that does not cross the stitching line, two boxes for those that do.