gisserver.operations.wfs20 module¶
Operations that implement the WFS 2.0 specification.
These operations are called by the WFSView,
and receive the request that was parsed using gisserver.parsers.wfs20.
Thus, there is nearly no difference between GET/POST requests here.
In a way this looks like an MVC (Model-View-Controller) design:
gisserver.parsers.wfs20parsed the request, and provides the “model”.gisserver.operations.wfs20orchestrates here what to do (the controller).gisserver.outputperforms the rendering (the view).
- class gisserver.operations.wfs20.BaseWFSGetDataOperation(view: WFSView, ows_request: ows.BaseOwsRequest)¶
Bases:
OutputFormatMixin,WFSOperationBase class for GetFeature / GetPropertyValue
- bind_query(query: QueryExpression, feature_types: list[FeatureType])¶
Allow to be overwritten in GetFeatureValue
- get_hits() FeatureCollection¶
Handle the resultType=hits query. This creates the QuerySet and counts the number of results.
- get_results() FeatureCollection¶
Handle the resultType=results query. This creates the queryset, allowing to read over all results.
- process_request(ows_request: GetFeature | GetPropertyValue)¶
Process the query, and generate the output.
- set_pagination_links(collection: FeatureCollection)¶
Assign the pagination links to the collection. This happens within the operation logic, as it can access the original GET request.
- validate_request(ows_request: GetFeature | GetPropertyValue)¶
Validate the incoming data before execution.
- class gisserver.operations.wfs20.DescribeFeatureType(view: WFSView, ows_request: ows.BaseOwsRequest)¶
Bases:
OutputFormatMixin,WFSOperationThis returns an XML Schema for the provided objects. Each feature is exposed as an XSD definition with its fields.
- get_output_formats()¶
List all output formats. This is exposed in GetCapabilities, and used for internal rendering.
- process_request(ows_request: DescribeFeatureType)¶
Default call implementation: render an XML template.
- validate_request(ows_request: DescribeFeatureType)¶
Validate the request.
- class gisserver.operations.wfs20.DescribeStoredQueries(view: WFSView, ows_request: ows.BaseOwsRequest)¶
Bases:
WFSOperationThis describes the available queries
- process_request(ows_request: BaseOwsRequest)¶
Default call implementation: render an XML template.
- validate_request(ows_request: DescribeStoredQueries)¶
Validate the request.
- class gisserver.operations.wfs20.GetCapabilities(view: WFSView, ows_request: ows.BaseOwsRequest)¶
Bases:
XmlTemplateMixin,OutputFormatMixin,WFSOperationThis operation returns map features, and available operations this WFS server supports.
- get_output_formats()¶
List all output formats. This is exposed in GetCapabilities, and used for internal rendering.
- get_parameters()¶
Parameters to advertise in the capabilities for this method.
- validate_request(ows_request: GetCapabilities)¶
Validate the request.
- xml_template_name = 'get_capabilities.xml'¶
Default template to use for rendering This is resolved as
gisserver/service/version/xml_template_name.
- class gisserver.operations.wfs20.GetFeature(view: WFSView, ows_request: ows.BaseOwsRequest)¶
Bases:
BaseWFSGetDataOperationThis returns all properties of the feature.
Various query parameters allow limiting the data.
- get_custom_output_formats(output_formats_setting: dict) list[OutputFormat]¶
Add custom output formats defined in the settings.
- get_output_formats() list[OutputFormat]¶
Return the default output formats. This selects a different rendering depending on the
GISSERVER_USE_DB_RENDERINGsetting.
- class gisserver.operations.wfs20.GetPropertyValue(view: WFSView, ows_request: ows.BaseOwsRequest)¶
Bases:
BaseWFSGetDataOperationThis returns a limited set of properties of the feature. It works almost identical to GetFeature, except that it returns a single field.
- bind_query(query: QueryExpression, feature_types: list[FeatureType])¶
Allow to be overwritten in GetFeatureValue
- get_output_formats() list[OutputFormat]¶
Define the output format for GetPropertyValue.
- validate_request(ows_request: GetPropertyValue)¶
Validate the incoming data before execution.
- class gisserver.operations.wfs20.ListStoredQueries(view: WFSView, ows_request: ows.BaseOwsRequest)¶
Bases:
WFSOperationThis describes the available queries
- process_request(ows_request: BaseOwsRequest)¶
Default call implementation: render an XML template.