GeometryRecord(law_status, published_from, geom, geo_metadata=None, public_law_restriction=None, office=None)¶
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 lawrestriction
office (pyramid_oereb.lib.records.office.Office): The office
- AttributeError: Error when a wrong geometry type was passed.
__init__(law_status, published_from, geom, geo_metadata=None, public_law_restriction=None, office=None)¶
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.
- 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.
- bool: True if intersection fits the limits.
float or None: Returns the area of this geometry.
float or None: Returns the length of this geometry.