gws.base.ows.client.featureinfo¶
Parser for WMS/WFS feature info responses.
Source code: gws.base.ows.client.featureinfo
Module Contents¶
- gws.base.ows.client.featureinfo.parse(text: str, default_crs: gws.Crs = None, always_xy=False) list[gws.FeatureRecord]¶
Parse a GetFeatureInfo or GetFeature response into feature records.
The format is detected from the name of the XML root element. An empty response yields an empty list.
- Parameters:
text – Response text.
default_crs – CRS for geometries that do not specify one.
always_xy – If true, coordinates are read in XY order regardless of the CRS axis order.
- Returns:
A list of feature records.
- Raises:
Error – If the response is not valid XML or the format is not recognized.