gws.base.ows.client.parseutil

Parse utilities for OWS XML files.

Source code: gws.base.ows.client.parseutil

Module Contents

gws.base.ows.client.parseutil.default_style(styles: list[gws.SourceStyle]) gws.SourceStyle | None
gws.base.ows.client.parseutil.element_metadata(el: gws.XmlElement) gws.Metadata
gws.base.ows.client.parseutil.parse_style(el: gws.XmlElement) gws.SourceStyle
gws.base.ows.client.parseutil.service_metadata(caps_el: gws.XmlElement) gws.Metadata
gws.base.ows.client.parseutil.service_operations(caps_el: gws.XmlElement) list[gws.OwsOperation]
gws.base.ows.client.parseutil.supported_crs(layer_el: gws.XmlElement, extra_crs_ids: list[str] = None) list[gws.Crs]

Enumerate supported CRS for a Layer/FeatureType element.

For WMS, enumerates CRS/SRS and BoundingBox tags, for OWS, DefaultCRS and OtherCRS.

Parameters:
  • layer_el – ‘Layer’ or ‘FeatureType’ element.

  • extra_crs_ids – additional CRS ids.

Returns:

A list of Crs objects.

gws.base.ows.client.parseutil.to_float(s, default=0.0)
gws.base.ows.client.parseutil.to_float_pair(s)
gws.base.ows.client.parseutil.to_int(s, default=0)
gws.base.ows.client.parseutil.wgs_bounds(layer_el: gws.XmlElement) gws.Bounds | None

Read WGS bounding box from a Layer/FeatureType element.

Extracts coordinates from EX_GeographicBoundingBox (WMS), WGS84BoundingBox (OWS) or LatLonBoundingBox. For the latter, assume x=longitude, y=latitude, as per OGC 01-068r3, 6.5.6.

Parameters:

layer_el – ‘Layer’ or ‘FeatureType’ element.

Returns:

WGS Bounds object.