:tocdepth: 3 :py:mod:`gws.gis.gml.parser` ============================ .. py:module:: gws.gis.gml.parser .. autoapi-nested-parse:: GML geometry parsers. **Source code:** :source:`gws.gis.gml.parser` Module Contents --------------- .. py:exception:: Error Bases: :py:obj:`gws.Error` GWS error. .. py:function:: is_geometry_element(el: gws.XmlElement) -> bool Checks if the current element is a valid geometry type. :param el: A GML element. :returns: ``True`` if the element is a geometry type. .. py:function:: parse_envelope(el: gws.XmlElement, default_crs: gws.Crs = None, always_xy: bool = False) -> gws.Bounds Parse a gml:Box/gml:Envelope element :param el: A xml-Element. :param default_crs: A Crs object. :param always_xy: If ``True``, coordinates are assumed to be in the XY (lon/lat) order. :returns: A Bounds object. .. py:function:: parse_geometry(el: gws.XmlElement) -> dict Convert a GML geometry element to a geometry dict. :param el: A GML element. :returns: The GML geometry as a geometry dict. .. py:function:: parse_shape(el: gws.XmlElement, default_crs: gws.Crs = None, always_xy: bool = False) -> gws.Shape Convert a GML geometry element to a Shape. :param el: A GML element. :param default_crs: A Crs object. :param always_xy: If ``True``, coordinates are assumed to be in the XY (lon/lat) order. :returns: A GWS shape object.