Package sabx10 :: Package oxm :: Module geom :: Class Point
[hide private]
[frames] | no frames]

Class Point

source code

object --+
         |
        Point
Known Subclasses:

A Point object is a (lat,lon) pair that can optionally have elevations and an id.

Instance Methods [hide private]
 
__init__(self, lat=0.0, lon=0.0, ele=None, usgs=None, id=None)
Save the passed-in data and make sure elevations are filled-in properly.
source code
float
calculate_distance(self, point)
Calculate the distance from this point to the given point, in statue miles.
source code
Point
pt_dist_from(self, distance, true_course)
Calculate a point distance statute miles from this point along a course true_course degrees
source code

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

Instance Variables [hide private]
float ele
observed elevation for this point (meters above see level)
string id
id of point
float lat
decimal degrees
float lon
decimal degrees (west is negative)
float usgs
USGS elevation for this point (meters above see level)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, lat=0.0, lon=0.0, ele=None, usgs=None, id=None)
(Constructor)

source code 

Save the passed-in data and make sure elevations are filled-in properly.

This class is agnostic about what units ele and usgs are supplied in, but SABX specifies them as meters.

Parameters:
  • id (string) - id of point
  • lat (float) - degrees
  • lon (float) - degrees (west is negative)
  • usgs (float) - USGS elevation for this point (meters above see level)
  • ele (float) - observed elevation for this point (meters above see level)
Overrides: object.__init__

calculate_distance(self, point)

source code 

Calculate the distance from this point to the given point, in statue miles.

Parameters:
  • point (Point) - point to calculate distance to
Returns: float
distance in statute miles

pt_dist_from(self, distance, true_course)

source code 

Calculate a point distance statute miles from this point along a course true_course degrees

Some useful true_course values:

  • 0.0 - north
  • 90.0 - east
  • 180.0 - south
  • 270.0 - west
Parameters:
  • distance (float) - distance from this point in statute miles
  • true_course (float) - true course from this point in degrees
Returns: Point
Point object representing calculated point