Ticket #16231: spatialite-kml-gml.2.diff

File spatialite-kml-gml.2.diff, 2.4 KB (added by John Paulett, 13 years ago)

Fix test

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

    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):  
    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 django/contrib/gis/tests/geoapp/tests.py django/contrib/gis/tests/geoapp/tests.py
    index b7ce3b7..2ecee07 100644
    class GeoModelTest(TestCase):  
    9292
    9393    def test03a_kml(self):
    9494        "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):
    9797            self.assertRaises(NotImplementedError, State.objects.all().kml, field_name='poly')
    9898            return
    9999
    class GeoModelTest(TestCase):  
    117117
    118118    def test03b_gml(self):
    119119        "Testing GML output from the database using GeoQuerySet.gml()."
    120         if mysql or spatialite:
     120        if mysql:
    121121            self.assertRaises(NotImplementedError, Country.objects.all().gml, field_name='mpoly')
    122122            return
    123123
  • docs/ref/contrib/gis/db-api.txt

    diff --git docs/ref/contrib/gis/db-api.txt docs/ref/contrib/gis/db-api.txt
    index fbced8e..871defe 100644
    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