pyinterp.geometry.geographic.Point

Contents

pyinterp.geometry.geographic.Point#

class pyinterp.geometry.geographic.Point(self, lon: float = 0.0, lat: float = 0.0)#

Bases: object

A point in geodetic coordinates (longitude, latitude).

The point is represented using geographic coordinates (i.e., on the ellipsoid surface). Longitude and latitude are expressed in degrees.

Examples

>>> from pyinterp.geometry.geographic import Point
>>> point = Point(2.3, 48.9)
>>> point.lon
2.3
>>> point.lat
48.9

Construct a point from longitude and latitude.

Parameters:
  • lon – Longitude in degrees (default: 0.0).

  • lat – Latitude in degrees (default: 0.0).

Attributes

lat

Latitude in degrees.

lon

Longitude in degrees.

Special Methods

__eq__(self, other)

Check if two points are equal.

__getstate__(self)

Return the state of the Point for pickling.

__ne__(self, other)

Check if two points are not equal.

__new__(*args, **kwargs)

__repr__(self)

Return the official string representation of the Point.

__setstate__(self, state)

Restore the state of the Point from pickling.

__str__(self)

Return the string representation of the Point.