4.1.1. BaseCoordinate

class pyprom.lib.locations.base_coordinate.BaseCoordinate(latitude, longitude, *args, **kwargs)[source]

Base Coordinate, intended to be inherited from. This contains basic latitude and longitude

__eq__(other)[source]

Determines if this object is equal to another.

Parameters

other (BaseCoordinate) – BaseCoordinate to be compared against

Returns

equality

Return type

bool

__hash__()[source]

Produces the hash representation of this object.

Returns

Hash representation of this object

Return type

str

__init__(latitude, longitude, *args, **kwargs)[source]
Parameters
  • latitude (int, float) – latitude in dotted decimal

  • longitude (int, float) – longitude in dotted decimal

__ne__(other)[source]

Determines if this object is not equal to another.

Parameters

other (BaseCoordinate) – BaseCoordinate to be compared against

Returns

inequality

Return type

bool

__repr__()[source]
Returns

String representation of this object

__str__()
Returns

String representation of this object

__unicode__()
Returns

String representation of this object

__weakref__

list of weak references to the object (if defined)

property dms

Returns the coordinate of this BaseCoordinate in degrees minutes seconds format

Returns

((d, m, s), (d, m, s) Tuple of lat/long in dms.

Return type

tuple

to_dict()[source]

Create the dictionary representation of this object.

Returns

dict() representation of BaseCoordinate

Return type

dict()

property utm

Returns Tuple of utm coordinate for this BaseCoordinate.

Returns

utm coordinate

Return type

str