Dropped support for GEOS 3.4.

This commit is contained in:
Tim Graham 2019-02-09 08:40:55 -05:00 committed by GitHub
parent b2333426de
commit ea87a85fad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 19 deletions

View File

@ -5,9 +5,8 @@
from ctypes import byref, c_int, c_uint
from django.contrib.gis.geos import prototypes as capi
from django.contrib.gis.geos.error import GEOSException
from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin
from django.contrib.gis.geos.libgeos import GEOM_PTR, geos_version_tuple
from django.contrib.gis.geos.libgeos import GEOM_PTR
from django.contrib.gis.geos.linestring import LinearRing, LineString
from django.contrib.gis.geos.point import Point
from django.contrib.gis.geos.polygon import Polygon
@ -98,12 +97,6 @@ class MultiLineString(LinearGeometryMixin, GeometryCollection):
_allowed = (LineString, LinearRing)
_typeid = 5
@property
def closed(self):
if geos_version_tuple() < (3, 5):
raise GEOSException("MultiLineString.closed requires GEOS >= 3.5.0.")
return super().closed
class MultiPolygon(GeometryCollection):
_allowed = Polygon

View File

@ -8,7 +8,7 @@ geospatial libraries:
======================== ==================================== ================================ ===================================
Program Description Required Supported Versions
======================== ==================================== ================================ ===================================
:doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.7, 3.6, 3.5, 3.4
:doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.7, 3.6, 3.5
`PROJ.4`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 5.2, 5.1, 5.0, 4.x
:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 2.4, 2.3, 2.2, 2.1, 2.0
:doc:`GeoIP <../geoip2>` IP-based geolocation library No 2
@ -21,7 +21,6 @@ totally fine with GeoDjango. Your mileage may vary.
..
Libs release dates:
GEOS 3.4.0 2013-08-11
GEOS 3.5.0 2015-08-15
GEOS 3.6.0 2016-10-25
GEOS 3.7.0 2018-09-10

View File

@ -229,7 +229,7 @@ backends.
* Support for SpatiaLite 4.1 and 4.2 is removed.
* Support for GDAL 1.11 is removed.
* Support for GDAL 1.11 and GEOS 3.4 is removed.
Dropped support for PostgreSQL 9.4
----------------------------------

View File

@ -725,14 +725,6 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
self.assertFalse(ls_not_closed.closed)
self.assertTrue(ls_closed.closed)
if geos_version_tuple() >= (3, 5):
self.assertFalse(MultiLineString(ls_closed, ls_not_closed).closed)
self.assertTrue(MultiLineString(ls_closed, ls_closed).closed)
with mock.patch('django.contrib.gis.geos.libgeos.geos_version', lambda: b'3.4.9'):
with self.assertRaisesMessage(GEOSException, "MultiLineString.closed requires GEOS >= 3.5.0."):
MultiLineString().closed
def test_srid(self):
"Testing the SRID property and keyword."
# Testing SRID keyword on Point