mirror of https://github.com/django/django.git
Confirmed support for PostGIS 2.3.
This commit is contained in:
parent
cc282fa731
commit
79c91070e5
|
@ -12,7 +12,7 @@ Program Description Required
|
|||
`PROJ.4`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 4.9, 4.8, 4.7, 4.6, 4.5, 4.4
|
||||
:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 2.1, 2.0, 1.11, 1.10, 1.9, 1.8, 1.7
|
||||
:doc:`GeoIP <../geoip>` IP-based geolocation library No 1.4
|
||||
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.2, 2.1
|
||||
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.3, 2.2, 2.1
|
||||
`SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.3, 4.2, 4.1, 4.0
|
||||
======================== ==================================== ================================ ===================================
|
||||
|
||||
|
@ -37,6 +37,7 @@ totally fine with GeoDjango. Your mileage may vary.
|
|||
GDAL 2.1.0 2016-04
|
||||
PostGIS 2.1.0 2013-08-17
|
||||
PostGIS 2.2.0 2015-10-17
|
||||
PostGIS 2.3.0 2016-09-26
|
||||
SpatiaLite 4.0.0 2012-11-25
|
||||
SpatiaLite 4.1.0 2013-06-04
|
||||
SpatiaLite 4.2.0 2014-07-25
|
||||
|
|
|
@ -147,13 +147,16 @@ class GISFunctionsTests(TestCase):
|
|||
|
||||
@skipUnlessDBFeature("has_BoundingCircle_function")
|
||||
def test_bounding_circle(self):
|
||||
# The weak precision in the assertions is because the BoundingCircle
|
||||
# calculation changed on PostGIS 2.3.
|
||||
qs = Country.objects.annotate(circle=functions.BoundingCircle('mpoly')).order_by('name')
|
||||
self.assertAlmostEqual(qs[0].circle.area, 168.89, 2)
|
||||
self.assertAlmostEqual(qs[1].circle.area, 135.95, 2)
|
||||
self.assertAlmostEqual(qs[0].circle.area, 169, 0)
|
||||
self.assertAlmostEqual(qs[1].circle.area, 136, 0)
|
||||
|
||||
qs = Country.objects.annotate(circle=functions.BoundingCircle('mpoly', num_seg=12)).order_by('name')
|
||||
self.assertAlmostEqual(qs[0].circle.area, 168.44, 2)
|
||||
self.assertAlmostEqual(qs[1].circle.area, 135.59, 2)
|
||||
self.assertGreater(qs[0].circle.area, 168.4, 0)
|
||||
self.assertLess(qs[0].circle.area, 169.5, 0)
|
||||
self.assertAlmostEqual(qs[1].circle.area, 136, 0)
|
||||
|
||||
@skipUnlessDBFeature("has_Centroid_function")
|
||||
def test_centroid(self):
|
||||
|
|
Loading…
Reference in New Issue