diff --git django/contrib/gis/db/backends/spatialite/operations.py django/contrib/gis/db/backends/spatialite/operations.py
index 449c527..fdd1553 100644
|
|
class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
|
63 | 63 | difference = 'Difference' |
64 | 64 | distance = 'Distance' |
65 | 65 | envelope = 'Envelope' |
| 66 | gml = 'AsGML' |
66 | 67 | intersection = 'Intersection' |
| 68 | kml = 'AsKML' |
67 | 69 | length = 'GLength' # OpenGis defines Length, but this conflicts with an SQLite reserved keyword |
68 | 70 | num_geom = 'NumGeometries' |
69 | 71 | num_points = 'NumPoints' |
diff --git django/contrib/gis/tests/geoapp/tests.py django/contrib/gis/tests/geoapp/tests.py
index b7ce3b7..2ecee07 100644
|
|
class GeoModelTest(TestCase):
|
92 | 92 | |
93 | 93 | def test03a_kml(self): |
94 | 94 | "Testing KML output from the database using GeoQuerySet.kml()." |
95 | | # Only PostGIS supports KML serialization |
96 | | if not postgis: |
| 95 | # Only PostGIS and Spatialite support KML serialization |
| 96 | if not (postgis or spatialite): |
97 | 97 | self.assertRaises(NotImplementedError, State.objects.all().kml, field_name='poly') |
98 | 98 | return |
99 | 99 | |
… |
… |
class GeoModelTest(TestCase):
|
117 | 117 | |
118 | 118 | def test03b_gml(self): |
119 | 119 | "Testing GML output from the database using GeoQuerySet.gml()." |
120 | | if mysql or spatialite: |
| 120 | if mysql: |
121 | 121 | self.assertRaises(NotImplementedError, Country.objects.all().gml, field_name='mpoly') |
122 | 122 | return |
123 | 123 | |
diff --git docs/ref/contrib/gis/db-api.txt docs/ref/contrib/gis/db-api.txt
index fbced8e..871defe 100644
|
|
Method PostGIS Oracle SpatiaLite
|
311 | 311 | :meth:`GeoQuerySet.force_rhr` X |
312 | 312 | :meth:`GeoQuerySet.geohash` X |
313 | 313 | :meth:`GeoQuerySet.geojson` X |
314 | | :meth:`GeoQuerySet.gml` X X |
| 314 | :meth:`GeoQuerySet.gml` X X X |
315 | 315 | :meth:`GeoQuerySet.intersection` X X X |
316 | | :meth:`GeoQuerySet.kml` X |
| 316 | :meth:`GeoQuerySet.kml` X X |
317 | 317 | :meth:`GeoQuerySet.length` X X X |
318 | 318 | :meth:`GeoQuerySet.make_line` X |
319 | 319 | :meth:`GeoQuerySet.mem_size` X |