standard.sources.plr

Module Contents

Classes

DatabaseSource(self,**kwargs)
class DatabaseSource(**kwargs)
__init__(**kwargs)

Keyword Arguments: name (str): The name. You are free to choose one. code (str): The official code. Regarding to the federal specifications. geometry_type (str): The geometry type. Possible are: POINT, POLYGON, LINESTRING,

GEOMETRYCOLLECTION

thresholds (dict): The configuration of limits, units and precision which is used for processing. text (dict of str): The speaking title. It must be a dictionary containing language (as

configured) as key and text as value.

language (str): The language this public law restriction is originally shipped whith. federal (bool): Switch if it is a federal topic. This will be taken into account in processing

steps.

source (dict): The configuration dictionary of the public law restriction hooks (dict of str): The hook methods: get_symbol, get_symbol_ref. They have to be provided as

dotted string for further use with dotted name resolver of pyramid package.
law_status (dict of str): The multiple match configuration to provide more flexible use of the
federal specified classifiers ‘inForce’ and ‘runningModifications’.
from_db_to_legend_entry_record(theme, legend_entries_from_db)
from_db_to_view_service_record(view_service_from_db, legend_entry_records)
unwrap_multi_geometry_(law_status, published_from, multi_geom, geo_metadata, office)
unwrap_geometry_collection_(law_status, published_from, collection, geo_metadata, office)
create_geometry_records_(law_status, published_from, geom, geo_metadata, office)
from_db_to_geometry_records(geometries_from_db)
from_db_to_office_record(offices_from_db)
from_db_to_article_records(articles_from_db)
from_db_to_document_records(legal_provisions_from_db, article_numbers=None)
from_db_to_plr_record(public_law_restriction_from_db)
extract_geometry_collection_db(real_estate_geometry)

Decides the geometry collection cases of geometric filter operations when the database contains multi geometries but the passed geometry does not. The multi geometry will be extracted to it’s sub parts for operation.

Args:
db_path (str): The point separated string of schema_name.table_name.column_name from
which we can construct a correct SQL statement.
real_estate_geometry (shapely.geometry.base.BaseGeometry): The shapely geometry
representation which is used for comparison.
Returns:
sqlalchemy.sql.elements.BooleanClauseList: The clause element.
Raises:
HTTPBadRequest
handle_collection(geometry_results, session, collection_types, bbox)
read(real_estate, bbox)

The read point which creates a extract, depending on a passed real estate.

Args:
real_estate (pyramid_oereb.lib.records.real_estate.RealEstateRecord): The real
estate in its record representation.

bbox (shapely.geometry.base.BaseGeometry): The bbox to search the records.

_is_available(real_estate)

Checks if the topic is available for the specified real estate.

Args:
real_estate (pyramid_oereb.lib.records.real_estate.RealEstateRecord): The real
estate in its record representation.
Returns:
bool: True if the topic is available, false otherwise.