class AsKML(expression, precision=8, **extra)  
Availability: PostGIS, SpatiaLite
Accepts a single geographic field or expression and returns a Keyhole Markup Language (KML) representation of the geometry.
Example:
>>> qs = Zipcode.objects.annotate(kml=AsKML('poly'))
>>> print(qs[0].kml)
<Polygon><outerBoundaryIs><LinearRing><coordinates>-103.04135,36.217596,0 ...
-103.04135,36.217596,0</coordinates></LinearRing></outerBoundaryIs></Polygon>
| Keyword Argument | Description | 
|---|---|
| precision | This keyword may be used to specify the number of significant digits for the coordinates in the KML representation – the default value is 8. | 
 
          
Please login to continue.