Opened 10 months ago
Closed 2 months ago
#36009 closed New feature (fixed)
Add support for PostGIS 3.5
Reported by: | David Smith | Owned by: | |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
PostGIS 3.5 was released on 26 September 2024.
My initial try showed that there is one test failure when using this new version that needs to be investigated.
====================================================================== ERROR: test_relate_lookup (gis_tests.geoapp.tests.GeoLookupTest.test_relate_lookup) Testing the 'relate' lookup type. ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\smith\projects\django\tests\gis_tests\geoapp\tests.py", line 581, in test_relate_lookup "Lawrence", City.objects.get(point__relate=(ks.poly, within_mask)).name ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\smith\projects\django\django\db\models\manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\smith\projects\django\django\db\models\query.py", line 633, in get raise self.model.DoesNotExist( gis_tests.geoapp.models.City.DoesNotExist: City matching query does not exist.
Change History (11)
comment:1 by , 10 months ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Uncategorized → New feature |
Version: | 5.1 → dev |
comment:3 by , 4 months ago
PR to run tests with PostGIS 3.5 (test pass) via a label-triggered GH action.
comment:5 by , 3 months ago
The test_relate_lookup
is failing with PostGIS, and (I'm fairly sure) with GEOS 3.13+. PostGIS made a change to the way "relate" works when GEOS 3.13 is available so I'm guessing this is relavent https://trac.osgeo.org/postgis/ticket/5770. PostGIS will now use the new implementation for "relate" which is available in GEOS 3.13. see docs on RelateNG
Running the tests with --debug-sql
, I get the output seen here. Happy to post to trac, but the "wkb" for Kansas is quite big.
If I connect to the database, load the values for Lawrence and run the same query, I get one result (Lawrence). However, that same query being run by Django's returns 0 results. I'm unsure how to continue to debug this.
insert into geoapp_city values (1, 'Lawrence', 'POINT (-95.235060 38.971823)')
comment:6 by , 3 months ago
Thank you David for the debugging information. One thing I'm not sure I follow is:
test_relate_lookup
works with PostGIS 3.5 and GEOS 3.9 (this is the confg in the new GHA workflow), buttest_relate_lookup
fails with PostGIS 3.5 and GEOS 3.13 (this is the failure posted in this ticket).
Given the above, and given than RelateNG
is provided by GEOS and its implementation changed in 3.13, shouldn't the issue be that we need to (re) confirm support for GEOS 3.13? Seems like we should close this ticket as fixed
and re-open #35775.
comment:7 by , 3 months ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
comment:8 by , 2 months ago
Patch needs improvement: | unset |
---|
comment:9 by , 2 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
I want to contribute on this issue