Polygons

class PlanePolygon(vertices)[source]

Plane polygon class.

Parameters

vertices (array of shape (n, 2)) – Coordinates (x, y) of the vertices.

property area

Polygon area.

property bbox

Returns a tuple (x_min, y_min, x_max, y_max).

property bbox_center

Returns a tuple (x_cen, y_cen).

property dx

Entent in x-direction.

property dy

Entent in y-direction.

property perimeter

Perimeter of the polygon.

property summary

Summary properties.

property x

x-coordinates of the vertices.

property y

y-coordinates of the vertices.

class SphericalPolygon(vertices, deg=True)[source]

Spherical polygon class.

Parameters
  • vertices (array of shape (n, 2)) – Coordinates (lat, long) of the vertices.

  • deg (bool) – True if coordinates are in degrees. False for radians.

property area

Polygon area in millionth of the solar hemisphere.

property bbox

Returns a tuple (min lat, min lon, max lat, max lon).

property bbox_center

Returns a tuple (lat_cen, lon_cen).

property deg

True if coordinates are in dergees.

property dlat

Latitudinal extent.

property dlon

Longitudinal extent.

property lats

Latitude of the vertices.

property lons

Longitude of the vertices.

property perimeter

Perimeter of the polygon on a unit sphere.

property summary

Summary properties.