class AsGML(expression, version=2, precision=8, **extra)
Availability: Oracle, PostGIS, SpatiaLite
Accepts a single geographic field or expression and returns a Geographic Markup Language (GML) representation of the geometry.
Example:
>>> qs = Zipcode.objects.annotate(gml=AsGML('poly'))
>>> print(qs[0].gml)
<gml:Polygon srsName="EPSG:4326"><gml:OuterBoundaryIs>-147.78711,70.245363 ...
-147.78711,70.245363</gml:OuterBoundaryIs></gml:Polygon>
| Keyword Argument | Description |
|---|---|
precision | Not used on Oracle. It may be used to specify the number of significant digits for the coordinates in the GML representation – the default value is 8. |
version | Not used on Oracle. It may be used to specify the GML version used, and may only be values of 2 or 3. The default value is 2. |
Please login to continue.