9.3.1.13.1.2.1.11. GeoHealthCheck.plugins.probe.wfs
9.3.1.13.1.2.1.11.1. Classes
do WFS GetFeature in BBOX |
|
Do WFS GetFeature for each FeatureType in WFS. |
9.3.1.13.1.2.1.11.2. Module Contents
- class GeoHealthCheck.plugins.probe.wfs.WfsGetFeatureBbox
Bases:
GeoHealthCheck.probe.Probedo WFS GetFeature in BBOX
- NAME = 'WFS GetFeature in BBOX for SINGLE FeatureType'
Short name of Plugin. TODO: i18n e.g. NAME_nl_NL ?
- DESCRIPTION = Multiline-String
Show Value
""" WFS GetFeature in BBOX for SINGLE FeatureType. """
Longer description of Plugin. TODO: optional i18n e.g. DESCRIPTION_de_DE ?
- RESOURCE_TYPE = 'OGC:WFS'
Type of GHC Resource e.g. ‘OGC:WMS’, default not applicable.
- REQUEST_METHOD = 'POST'
HTTP request method capitalized, GET (default) or POST.
- REQUEST_HEADERS
dict of optional HTTP request headers.
- REQUEST_TEMPLATE = Multiline-String
Show Value
"""<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" maxFeatures="{max_count}" outputFormat="text/xml; subtype=gml/3.1.1" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <wfs:Query typeName="{type_name}" srsName="{srs}" xmlns:{type_ns_prefix}="{type_ns_uri}"> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:BBOX> <gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="{srs}"> <gml:lowerCorner>{bbox[0]} {bbox[1]}</gml:lowerCorner> <gml:upperCorner>{bbox[2]} {bbox[3]}</gml:upperCorner> </gml:Envelope> </ogc:BBOX> </ogc:Filter> </wfs:Query> </wfs:GetFeature> """
Template in standard Python str.format(*args). The variables like {service} and {version} within a template are filled from actual values for parameters defined in PARAM_DEFS and substituted from values or constant values specified by user in GUI and stored in DB.
- PARAM_DEFS
Param defs
- CHECKS_AVAIL
Checks for WFS GetFeature Response available. Optionally override Check PARAM_DEFS using set_params e.g. with specific value or even name.
- layer_count = 0
- get_metadata(resource, version='1.1.0')
Get metadata, specific per Resource type. :param resource: :param version: :return: Metadata object
- expand_params(resource)
Called after creation. Use to expand PARAM_DEFS, e.g. from Resource metadata like WMS Capabilities. See e.g. WmsGetMapV1 class. :param resource: :return: None
- class GeoHealthCheck.plugins.probe.wfs.WfsGetFeatureBboxAll
Bases:
WfsGetFeatureBboxDo WFS GetFeature for each FeatureType in WFS.
- NAME = 'WFS GetFeature in BBOX for ALL FeatureTypes'
Short name of Plugin. TODO: i18n e.g. NAME_nl_NL ?
- DESCRIPTION = Multiline-String
Show Value
""" WFS GetFeature in BBOX for ALL FeatureTypes. """
Longer description of Plugin. TODO: optional i18n e.g. DESCRIPTION_de_DE ?
- PARAM_DEFS
Param defs
- wfs = None
- feature_types = None
- expand_params(resource)
Called after creation. Use to expand PARAM_DEFS, e.g. from Resource metadata like WMS Capabilities. See e.g. WmsGetMapV1 class. :param resource: :return: None
- before_request()
Before request to service, overridden from base class
- perform_request()
Perform actual request to service, overridden from base class