Module: safe.common.geodesy

point.py - Represents a generic point on a sphere as a Python object.

See documentation of class Point for details. Ole Nielsen, ANU 2002

class safe.common.geodesy.Point(latitude=None, longitude=None)[source]

Definition of a generic point on the sphere.

Defines a point in terms of latitude and longitude and computes distances to other points on the sphere.

Initialise as
Point(lat, lon), where lat and lon are in decimal degrees (dd.dddd)
Public Methods:
distance_to(P) bearing_to(P) dist(P)

Author: Ole Nielsen, ANU 2002

AZ(P)[source]

Compute Azimuth bearing (AZ) from current point to P

GCA(P)[source]

Compute the Creat Circle Angle (GCA) between current point and P

approximate_distance_to(P)[source]

Very cheap and rough approximation to distance

bearing_to(P)[source]

Bearing (in degrees) to point P

distance_to(P)[source]

Distance to point P

generate_circle(radius, resolution=1)[source]

Make a circle about this point.

Args:
  • radius: The desired cirle radius [m]
  • resolution (optional): Radial distance (degrees) between points on circle. Default is 1 making the circle consist of 360 points
Returns:
list of lon, lat coordinates defining the circle
Note:
The circle is defined in geographic coordinates so the distance in meters will be greater than the specified radius in the north south direction.
safe.common.geodesy.acos(c)[source]

acos - Safe inverse cosine

Input argument c is shrunk to admissible interval to avoid case where a small rounding error causes a math domain error.

This module forms part of the InaSAFE tool.

Previous topic

Module: safe.common.testing

Next topic

Module: safe.common.test_tables

This Page