diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt index 98b907e657..d6793299fe 100644 --- a/docs/ref/contrib/gis/install/geolibs.txt +++ b/docs/ref/contrib/gis/install/geolibs.txt @@ -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 diff --git a/tests/gis_tests/geoapp/test_functions.py b/tests/gis_tests/geoapp/test_functions.py index 1a1727dbbc..0e5f2ee693 100644 --- a/tests/gis_tests/geoapp/test_functions.py +++ b/tests/gis_tests/geoapp/test_functions.py @@ -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):