lib.records.geometry

Module Contents

Classes

GeometryRecord(self,law_status,published_from,geom,geo_metadata=None,public_law_restriction=None,office=None) Geometry record
class GeometryRecord(law_status, published_from, geom, geo_metadata=None, public_law_restriction=None, office=None)

Geometry record

Args:

law_status (pyramid_oereb.lib.records.law_status.LawStatusRecord): The law status of this record. published_from (datetime.date): Date from/since when the PLR record is published. geom (Point or LineString or Polygon):

The geometry which must be of type POINT, LINESTRING or POLYGON, everything else
will raise an error.

geo_metadata (uri): The metadata. public_law_restriction (pyramid_oereb.lib.records.plr.PlrRecord): The public law

restriction

office (pyramid_oereb.lib.records.office.Office): The office

Raises:
AttributeError: Error when a wrong geometry type was passed.
__init__(law_status, published_from, geom, geo_metadata=None, public_law_restriction=None, office=None)
published()

bool: True if geometry is published.

calculate(real_estate, min_length, min_area, length_unit, area_unit)

Entry method for calculation. It checks if the geometry type of this instance is a geometry collection which has to be unpacked first in case of collection.

Args:
real_estate (pyramid_oereb.lib.records.real_estate.RealEstateRecord): The real estate record. min_length (float): The threshold to consider or not a line element. min_area (float): The threshold to consider or not a surface element. length_unit (unicode): The thresholds unit for area calculation. area_unit (unicode): The thresholds unit for area calculation.
Returns:
bool: True if intersection fits the limits.
area()

float or None: Returns the area of this geometry.

length()

float or None: Returns the length of this geometry.