Sources¶
This is package provides the minimum requirements on the classes which can be used as a source.
Base¶
BaseDatabaseSource¶
- class pyramid_oereb.core.sources.BaseDatabaseSource(**kwargs)[source]¶
The plug for addresses which uses a database as source.
- TIMEOUT¶
Seconds to wait until database should be ready
- Type:
int
- __init__(**kwargs)[source]¶
- Keyword Arguments:
db_connection (str) – A rfc1738 conform database connection string in the form of:
<driver_name>://<username>:<password>@<database_host>:<port>/<database_name>
model (str) – A valid dotted name string which leads to an importable representation of sqlalchemy.ext.declarative.DeclarativeMeta or the real class itself.
AddressBaseSource¶
- class pyramid_oereb.core.sources.address.AddressBaseSource[source]¶
Base class for address sources.
- records¶
List of address records.
- Type:
list of pyramid_oereb.lib.records.address.AddressRecord
- __init__()¶
- read(params, street_name, zip_code, street_number)[source]¶
Every address source has to implement a read method. This method must accept the three parameters. If you want adapt to your own source for addresses, this is the point where to hook in.
- Parameters:
params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.
street_name (unicode) – The name of the street for the desired address.
zip_code (int) – The postal zipcode for the desired address.
street_number (str) – The house or so called street number of the desired address.
AvailabilityBaseSource¶
DataIntegrationBaseSource¶
DisclaimerBaseSource¶
DocumentBaseSource¶
- class pyramid_oereb.core.sources.document.DocumentBaseSource[source]¶
Base class for document sources.
- records¶
List of document records.
- Type:
list of pyramid_oereb.lib.records.documents.DocumentRecord
- __init__()¶
- read(office_records)[source]¶
Every document source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for documents, this is the point where to hook in.
- Parameters:
office_records (pyramid_oereb.views.webservice.Parameter) – The office records of the exact request.
DocumentTypesBaseSource¶
GeneralInformationBaseSource¶
GlossaryBaseSource¶
LawStatusBaseSource¶
- class pyramid_oereb.core.sources.law_status.LawStatusBaseSource[source]¶
Base class for law status values source. .. attribute:: records
List of law status
- type:
list of pyramid_oereb.lib.records.law_status.LawStatusRecord
- records.
- __init__()¶
- read(params=None)[source]¶
Every law status source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for real estate type labels, this is the point where to hook in.
- Parameters:
params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.
LegendBaseSource¶
- class pyramid_oereb.core.sources.legend.LegendBaseSource[source]¶
Base class for exclusion of liability sources.
- records¶
List of legend entry records.
- Type:
list of pyramid_oereb.lib.records.view_service.LegendEntryRecord
- __init__()¶
- read(params, **kwargs)[source]¶
Every legend entry source has to implement a read method. If you want adapt to your own source for legend entries, this is the point where to hook in.
- Parameters:
params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.
(kwargs) – Arbitrary keyword arguments.
LogoBaseSource¶
MapLayeringBaseSource¶
MunicipalityBaseSource¶
OfficeBaseSource¶
PlrBaseSource¶
- class pyramid_oereb.core.sources.plr.PlrBaseSource(**kwargs)[source]¶
Base class for public law restriction sources.
- records¶
List of public law restriction records.
- Type:
list of pyramid_oereb.lib.records.plr.EmptyPlrRecord
- datasource¶
List of data source records used for the additional data in flavour embeddable.
- Type:
list of pyramid_oereb.lib.records.embeddable.DatasourceRecord
- __init__(**kwargs)[source]¶
- 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 and units 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 with.
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 configuration dictionary of the law status. It consists of the code and text which must be a dictionary containing language (as configured) as key and text as value.
- property info¶
Return the info dictionary.
- Returns:
The info dictionary.
- Return type:
dict
- read(params, real_estate, bbox)[source]¶
Every public law restriction source has to implement a read method. This method must accept the two key word parameters. If you want adapt to your own source for real estates, this is the point where to hook in.
- Parameters:
params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.
real_estate (pyramid_oereb.lib.records.real_estate.RealEstateRecord) – The real estate which is used as filter to find all related public law restrictions.
bbox (shapely.geometry.base.BaseGeometry) – The bounding box which is used as a pre-filter to find all public law restrictions. This is related to the fact that we need to provide not only the public law restrictions that are related to the real estate but also the ones which are in the visible extent of the map.
RealEstateBaseSource¶
- class pyramid_oereb.core.sources.real_estate.RealEstateBaseSource[source]¶
Base class for real estate sources.
- records¶
List of real estate records.
- Type:
list of pyramid_oereb.lib.records.real_estate.RealEstateRecord
- __init__()¶
- read(params, nb_ident=None, number=None, egrid=None, geometry=None)[source]¶
Every real estate source has to implement a read method. This method must accept the four key word parameters. If you want adapt to your own source for real estates, this is the point where to hook in.
- Parameters:
params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.
nb_ident (int or None) – The identification number of the desired real estate. This parameter is directly related to the number parameter and both must be set! Combination must deliver only one result or must raise an error.
number (str or None) – The number of parcel or also known real estate. This parameter is directly related to the nb_ident parameter and both must be set! Combination must deliver only one result or must raise an error.
egrid (str or None) – The unique identifier of the desired real estate. This must deliver only one result or must raise an error.
geometry (str) – A geometry as WKT string which is used to obtain intersected real estates. This may deliver several results.
RealEstateTypeBaseSource¶
- class pyramid_oereb.core.sources.real_estate_type.RealEstateTypeBaseSource[source]¶
Base class for real estate type values source. .. attribute:: records
List of real estate
- type:
list of pyramid_oereb.lib.records.real_estate_type.RealEstateTypeRecord
- type records.
- __init__()¶
- read(params=None)[source]¶
Every real estate type source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for real estate type labels, this is the point where to hook in. :param params: The parameters of the extract request. :type params: pyramid_oereb.views.webservice.Parameter