|
| def | __init__ (self, earth, polyline=False) |
| |
| def | AddEdge (self, azi, s) |
| |
| def | AddPoint (self, lat, lon) |
| |
| def | Clear (self) |
| |
| def | Compute (self, reverse=False, sign=True) |
| |
| def | TestEdge (self, azi, s, reverse=False, sign=True) |
| |
| def | TestPoint (self, lat, lon, reverse=False, sign=True) |
| |
| template<typename T > |
| T | cast () const & |
| |
| template<typename T > |
| T | cast ()&& |
| |
| template<> |
| void | cast () const & |
| |
| template<> |
| void | cast ()&& |
| |
| | object ()=default |
| |
| | object (const object &o) |
| | Copy constructor; always increases the reference count. More...
|
| |
| | object (object &&other) noexcept |
| | Move constructor; steals the object from other and preserves its reference count. More...
|
| |
| | object (handle h, borrowed_t) |
| |
| | object (handle h, stolen_t) |
| |
| object & | operator= (const object &other) |
| |
| object & | operator= (object &&other) noexcept |
| |
| | PYBIND11_DEPRECATED ("Use reinterpret_borrow<object>() or reinterpret_steal<object>()") object(handle h |
| |
| handle | release () |
| |
| | ~object () |
| | Destructor; automatically calls handle::dec_ref() More...
|
| |
Public Member Functions inherited from handle |
| template<typename T > |
| T | cast () const |
| |
| template<> |
| void | cast () const |
| |
| bool | check () const |
| |
| const handle & | dec_ref () const & |
| |
| | handle ()=default |
| | The default constructor creates a handle with a nullptr-valued pointer. More...
|
| |
| | handle (PyObject *ptr) |
| | Creates a handle from the given raw Python object pointer. More...
|
| |
| const handle & | inc_ref () const & |
| |
| | operator bool () const |
| | Return true when the handle wraps a valid Python object. More...
|
| |
| bool | operator!= (const handle &h) const |
| |
| bool | operator== (const handle &h) const |
| |
| PyObject * | ptr () const |
| | Return the underlying PyObject * pointer. More...
|
| |
| PyObject *& | ptr () |
| |
|
Protected Attributes inherited from handle |
| PyObject * | m_ptr = nullptr |
| |
Area of a geodesic polygon
Definition at line 51 of file polygonarea.py.
| def geographiclib.polygonarea.PolygonArea.__init__ |
( |
|
self, |
|
|
|
earth, |
|
|
|
polyline = False |
|
) |
| |
Construct a PolygonArea object
:param earth: a :class:`~geographiclib.geodesic.Geodesic` object
:param polyline: if true, treat object as a polyline instead of a polygon
Initially the polygon has no vertices.
Definition at line 78 of file polygonarea.py.
| def geographiclib.polygonarea.PolygonArea._transit |
( |
|
lon1, |
|
|
|
lon2 |
|
) |
| |
|
private |
Count crossings of prime meridian for AddPoint.
Definition at line 54 of file polygonarea.py.
| def geographiclib.polygonarea.PolygonArea._transitdirect |
( |
|
lon1, |
|
|
|
lon2 |
|
) |
| |
|
private |
Count crossings of prime meridian for AddEdge.
Definition at line 67 of file polygonarea.py.
| def geographiclib.polygonarea.PolygonArea.AddEdge |
( |
|
self, |
|
|
|
azi, |
|
|
|
s |
|
) |
| |
Add the next edge to the polygon
:param azi: the azimuth at the current the point in degrees
:param s: the length of the edge in meters
This specifies the new vertex in terms of the edge from the current
vertex.
Definition at line 139 of file polygonarea.py.
| def geographiclib.polygonarea.PolygonArea.AddPoint |
( |
|
self, |
|
|
|
lat, |
|
|
|
lon |
|
) |
| |
Add the next vertex to the polygon
:param lat: the latitude of the point in degrees
:param lon: the longitude of the point in degrees
This adds an edge from the current vertex to the new vertex.
Definition at line 116 of file polygonarea.py.
| def geographiclib.polygonarea.PolygonArea.Clear |
( |
|
self | ) |
|
| def geographiclib.polygonarea.PolygonArea.Compute |
( |
|
self, |
|
|
|
reverse = False, |
|
|
|
sign = True |
|
) |
| |
Compute the properties of the polygon
:param reverse: if true then clockwise (instead of
counter-clockwise) traversal counts as a positive area
:param sign: if true then return a signed result for the area if the
polygon is traversed in the "wrong" direction instead of returning
the area for the rest of the earth
:return: a tuple of number, perimeter (meters), area (meters^2)
If the object is a polygon (and not a polygon), the perimeter
includes the length of a final edge connecting the current point to
the initial point. If the object is a polyline, then area is nan.
More points can be added to the polygon after this call.
Definition at line 162 of file polygonarea.py.
| def geographiclib.polygonarea.PolygonArea.TestEdge |
( |
|
self, |
|
|
|
azi, |
|
|
|
s, |
|
|
|
reverse = False, |
|
|
|
sign = True |
|
) |
| |
Compute the properties for a tentative additional edge
:param azi: the azimuth at the current the point in degrees
:param s: the length of the edge in meters
:param reverse: if true then clockwise (instead of
counter-clockwise) traversal counts as a positive area
:param sign: if true then return a signed result for the area if the
polygon is traversed in the "wrong" direction instead of returning
the area for the rest of the earth
:return: a tuple of number, perimeter (meters), area (meters^2)
Definition at line 273 of file polygonarea.py.
| def geographiclib.polygonarea.PolygonArea.TestPoint |
( |
|
self, |
|
|
|
lat, |
|
|
|
lon, |
|
|
|
reverse = False, |
|
|
|
sign = True |
|
) |
| |
Compute the properties for a tentative additional vertex
:param lat: the latitude of the point in degrees
:param lon: the longitude of the point in degrees
:param reverse: if true then clockwise (instead of
counter-clockwise) traversal counts as a positive area
:param sign: if true then return a signed result for the area if the
polygon is traversed in the "wrong" direction instead of returning
the area for the rest of the earth
:return: a tuple of number, perimeter (meters), area (meters^2)
Definition at line 216 of file polygonarea.py.
| geographiclib.polygonarea.PolygonArea._areasum |
|
private |
| geographiclib.polygonarea.PolygonArea._crossings |
|
private |
| geographiclib.polygonarea.PolygonArea._lat0 |
|
private |
| geographiclib.polygonarea.PolygonArea._lon0 |
|
private |
| geographiclib.polygonarea.PolygonArea._mask |
|
private |
| geographiclib.polygonarea.PolygonArea._perimetersum |
|
private |
| geographiclib.polygonarea.PolygonArea._transit = staticmethod(_transit) |
|
staticprivate |
| geographiclib.polygonarea.PolygonArea._transitdirect = staticmethod(_transitdirect) |
|
staticprivate |
| geographiclib.polygonarea.PolygonArea.area0 |
| geographiclib.polygonarea.PolygonArea.earth |
| geographiclib.polygonarea.PolygonArea.lat1 |
| geographiclib.polygonarea.PolygonArea.lon1 |
| geographiclib.polygonarea.PolygonArea.num |
| geographiclib.polygonarea.PolygonArea.polyline |
The documentation for this class was generated from the following file: