Refs #32353, Refs #32352 -- Fixed GIS tests with PROJ 7.X.

Different PROJ versions use different transformations, all are correct
as having a 1 meter accuracy.

These are differences in PROJ versions that cannot and should not be
handled in Django itself.

Thanks Jani Tiainen and David Smith for reports.

See: https://github.com/OSGeo/gdal/issues/3377
This commit is contained in:
Mariusz Felisiak 2021-03-23 09:16:33 +01:00 committed by GitHub
parent 71ec102b01
commit 2cd4026334
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 8 deletions

View file

@ -28,7 +28,9 @@ class GeometryFieldTest(SimpleTestCase):
# Making the field in a different SRID from that of the geometry, and
# asserting it transforms.
fld = forms.GeometryField(srid=32140)
tol = 0.0001
# Different PROJ versions use different transformations, all are
# correct as having a 1 meter accuracy.
tol = 1
xform_geom = GEOSGeometry('POINT (951640.547328465 4219369.26171664)', srid=32140)
# The cleaned geometry is transformed to 32140 (the widget map_srid is 3857).
cleaned_geom = fld.clean('SRID=3857;POINT (-10615777.40976205 3473169.895707852)')