Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#26455 closed New feature (fixed)

Add lookups and database functions to check for valid geometries and repairing them.

Reported by: Daniel Wiesmann Owned by: Daniel Wiesmann
Component: GIS Version: 1.9
Severity: Normal Keywords: isvalid, makevalid, valid, geometry
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

There are many data sources that come with geometries that are not valid, and clipping or intersecting functions may lead to invalid geometries sometimes. At the same time, geographic operations often require valid input.

The python geometries in GeoDjango have a valid property, but the same property is not available during database queries.

To avoid errors during geoprocessing on large datasets the database side, it can be essential to be able to filter valid geometries and possibly repair them as well.

Change History (5)

comment:1 by Daniel Wiesmann, 9 years ago

Here is the pr: https://github.com/django/django/pull/6412

I tried to find equivalent functions in the other spatial backends, the only function I found was SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT. The result of this function is an error code for invalid geometries. Unfortunately I am not familiar with oracle so I dont know how to use this properly.

https://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_objgeom.htm#BGHFDDBF

comment:2 by Tim Graham, 9 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham, 9 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In c12a00e:

Fixed #26455 -- Allowed filtering and repairing invalid geometries.

Added the IsValid and MakeValid database functions, and the isvalid lookup,
all for PostGIS.

Thanks Tim Graham for the review.

comment:5 by Tim Graham <timograham@…>, 9 years ago

In 65006e0b:

Refs #26455 -- Documented isvalid/makevalid in compatibility table.

Note: See TracTickets for help on using tickets.
Back to Top