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:

class gisserver.operations.wfs20.BaseWFSGetDataOperation(view: WFSView, ows_request: ows.BaseOwsRequest)

Bases: OutputFormatMixin, WFSOperation

Base 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_pagination() tuple[int, int]

Tell what the requested page size is.

get_parameters() list[Parameter]

Parameters to advertise in the capabilities for this method.

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.

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, WFSOperation

This 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: WFSOperation

This 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, WFSOperation

This operation returns map features, and available operations this WFS server supports.

get_context_data() dict

Collect all arguments to use for rendering the XML template

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: BaseWFSGetDataOperation

This 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_RENDERING setting.

get_parameters() list[Parameter]

Extend Parameters with outputFormat to support ArcGISOnline.

class gisserver.operations.wfs20.GetPropertyValue(view: WFSView, ows_request: ows.BaseOwsRequest)

Bases: BaseWFSGetDataOperation

This 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: WFSOperation

This describes the available queries

process_request(ows_request: BaseOwsRequest)

Default call implementation: render an XML template.