pyufunc.calc_area_from_wkt_geometry#

pyufunc.calc_area_from_wkt_geometry(wkt_geometry, unit='sqm', verbose=False)#

Calculate the area of a geometry in WKT format.

Parameters:
  • wkt_geometry (str) – The geometry in WKT format.

  • unit (str) – The unit of the area. Default is “sqm”. Options are “sqm”, “sqft”

  • verbose (bool) – Whether to print the calculated area. Defaults to False.

Example

>>> from pyufunc import calc_area_from_wkt_geometry
>>> from pyproj import Transformer
>>> wkt_geometry = "POLYGON ((-74.006 40.712, -74.006 40.712, -74.006 40.712, -74.006 40.712))"
>>> calc_area_from_wkt_geometry(wkt_geometry, unit="sqm")
Returns:

The area of the geometry in specified unit.

Return type:

float