Opened 5 years ago
Last modified 5 years ago
#30649 closed New feature
Implement geometry validation in GIS database backend — at Version 2
Reported by: | milosu | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
PostGIS provides function ST_MakeValid, that can be used in Django as a PostGISOperator.
There is however no way how to use ST_MakeValid to simply repair GEOS Geometry.
Note that there is also no comparable function in the GEOS library itself (not counting something simple like buffer(0)).
This missing feature is also subject to Stackoverflow questions, like:
https://stackoverflow.com/questions/45631855/equivalent-of-postgis-st-makevalid-in-django-geos/45633779
Attached patch implements new PostGISOperations method called "make_valid", that can be run from implementation code simply by:
from django.db import connection repaired_geos_geometry = connection.ops.make_valid(some_goes_geometry)
Change History (3)
by , 5 years ago
Attachment: | make_valid_patch.diff added |
---|
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|