Ticket #16231: spatialite-kml-gml.diff

File spatialite-kml-gml.diff, 2.4 KB (added by Stefano Costa, 13 years ago)

git diff style patch

  • django/contrib/gis/db/backends/spatialite/operations.py

    diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py
    index f3bf3e5..8c8d807 100644
    a b class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):  
    6363    difference = 'Difference'
    6464    distance = 'Distance'
    6565    envelope = 'Envelope'
     66    gml = 'AsGML'
    6667    intersection = 'Intersection'
     68    kml = 'AsKML'
    6769    length = 'GLength' # OpenGis defines Length, but this conflicts with an SQLite reserved keyword
    6870    num_geom = 'NumGeometries'
    6971    num_points = 'NumPoints'
  • django/contrib/gis/tests/geoapp/tests.py

    diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py
    index 296f128..e66030e 100644
    a b class GeoModelTest(TestCase):  
    9393
    9494    def test03a_kml(self):
    9595        "Testing KML output from the database using GeoQuerySet.kml()."
    96         # Only PostGIS supports KML serialization
    97         if not postgis:
     96        # Only PostGIS and Spatialite support KML serialization
     97        if not postgis or spatialite:
    9898            self.assertRaises(NotImplementedError, State.objects.all().kml, field_name='poly')
    9999            return
    100100
    class GeoModelTest(TestCase):  
    118118
    119119    def test03b_gml(self):
    120120        "Testing GML output from the database using GeoQuerySet.gml()."
    121         if mysql or spatialite:
     121        if mysql:
    122122            self.assertRaises(NotImplementedError, Country.objects.all().gml, field_name='mpoly')
    123123            return
    124124
  • docs/ref/contrib/gis/db-api.txt

    diff --git a/docs/ref/contrib/gis/db-api.txt b/docs/ref/contrib/gis/db-api.txt
    index fbced8e..871defe 100644
    a b Method PostGIS Oracle SpatiaLite  
    311311:meth:`GeoQuerySet.force_rhr`         X
    312312:meth:`GeoQuerySet.geohash`           X
    313313:meth:`GeoQuerySet.geojson`           X
    314 :meth:`GeoQuerySet.gml`               X        X
     314:meth:`GeoQuerySet.gml`               X        X       X
    315315:meth:`GeoQuerySet.intersection`      X        X       X
    316 :meth:`GeoQuerySet.kml`               X
     316:meth:`GeoQuerySet.kml`               X                X
    317317:meth:`GeoQuerySet.length`            X        X       X
    318318:meth:`GeoQuerySet.make_line`         X
    319319:meth:`GeoQuerySet.mem_size`          X
Back to Top