From 9231526af4b9825583b0d3cb943f88109fd30551 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 21 Oct 2021 20:23:58 +0200 Subject: [PATCH] Fixed #33215 -- Confirmed support for GEOS 3.10. --- docs/ref/contrib/gis/install/geolibs.txt | 3 ++- tests/gis_tests/geos_tests/test_io.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt index 4226bbc8a93..c06783cc237 100644 --- a/docs/ref/contrib/gis/install/geolibs.txt +++ b/docs/ref/contrib/gis/install/geolibs.txt @@ -8,7 +8,7 @@ geospatial libraries: ======================== ==================================== ================================ ====================================== Program Description Required Supported Versions ======================== ==================================== ================================ ====================================== -:doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.9, 3.8, 3.7, 3.6 +:doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.10, 3.9, 3.8, 3.7, 3.6 `PROJ`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 8.x, 7.x, 6.x, 5.x, 4.x :doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 3.3, 3.2, 3.1, 3.0, 2.4, 2.3, 2.2, 2.1 :doc:`GeoIP <../geoip2>` IP-based geolocation library No 2 @@ -25,6 +25,7 @@ totally fine with GeoDjango. Your mileage may vary. GEOS 3.7.0 2018-09-10 GEOS 3.8.0 2019-10-10 GEOS 3.9.0 2020-12-14 + GEOS 3.10.0 2021-10-20 GDAL 2.1.0 2016-04 GDAL 2.2.0 2017-05 GDAL 2.3.0 2018-05 diff --git a/tests/gis_tests/geos_tests/test_io.py b/tests/gis_tests/geos_tests/test_io.py index 1ab7d6483ea..a2efc650c86 100644 --- a/tests/gis_tests/geos_tests/test_io.py +++ b/tests/gis_tests/geos_tests/test_io.py @@ -3,6 +3,7 @@ import binascii from django.contrib.gis.geos import ( GEOSGeometry, Point, Polygon, WKBReader, WKBWriter, WKTReader, WKTWriter, ) +from django.contrib.gis.geos.libgeos import geos_version_tuple from django.test import SimpleTestCase @@ -40,7 +41,10 @@ class GEOSIOTest(SimpleTestCase): def test_wktwriter_constructor_arguments(self): wkt_w = WKTWriter(dim=3, trim=True, precision=3) ref = GEOSGeometry('POINT (5.34562 23 1.5)') - ref_wkt = 'POINT Z (5.35 23 1.5)' + if geos_version_tuple() > (3, 10): + ref_wkt = 'POINT Z (5.346 23 1.5)' + else: + ref_wkt = 'POINT Z (5.35 23 1.5)' self.assertEqual(ref_wkt, wkt_w.write(ref).decode()) def test03_wkbreader(self):