gws.gis.gml.writer
¶
GML geometry writer.
Source code: gws.gis.gml.writer
Module Contents¶
- gws.gis.gml.writer.shape_to_element(shape: gws.Shape, version: int = 3, coordinate_precision: int | None = None, always_xy: bool = False, with_xmlns: bool = True, with_inline_xmlns: bool = False, namespace: gws.XmlNamespace | None = None, crs_format: gws.CrsFormat | None = None) gws.XmlElement ¶
Convert a Shape to a GML geometry element.
- Parameters:
shape – A Shape object.
version – GML version (2 or 3).
coordinate_precision – The amount of decimal places.
always_xy – If
True
, coordinates are assumed to be always in the XY (lon/lat) order.with_xmlns – If
True
add the “gml” namespace prefix.with_inline_xmlns – If
True
add inline “xmlns” attributes.namespace – Use this namespace (default “gml”).
crs_format – Crs format to use (default “url” for version 2 and “urn” for version 3).
- Returns:
A GML element.