### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe »
- Package::safe.common »

# 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)

  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)

    Compute Azimuth bearing (AZ) from current point to P

  `GCA`(P)

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

  `approximate_distance_to`(P)

    Very cheap and rough approximation to distance

  `bearing_to`(P)

    Bearing (in degrees) to point P

  `distance_to`(P)

    Distance to point P

  `generate_circle`(radius, resolution=1)

    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)

  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.

### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe »
- Package::safe.common »