[postgis-users] Re: Only allowing valid geometries to be created

Peter Bayley peterb at homer.com.au
Tue Apr 22 18:11:08 PDT 2003

My $0.02 on this topic..

While a clean, correct data set is what everyone wants ultimately, it is
necessary to support intermediate, non-ideal data states (AKA Spaghetti).
Note also that spaghetti is a valid and useful data type as context, even if
it is not analysable.  The best way to support these two cases would be to
allow the user the option to impose or not impose acceptance rules that
govern whether a particular geometry "passes" and is inserted, updated or
deleted.  These could be implemented as Insert, Update and Delete triggers
as is the case with Laserscan's Radius product for Oracle.  You choose to
impose or not impose rules on a column-by-column basis.  You can optionally
choose to add a rule after having cleaned some data.  If all the data passes
the test, the new rule becomes established on the column, otherwise it
doesn't.  Note that these same triggers could, in theory, do some of the
cleaning and structuring for you, based on another set of rules (move a node
only by this much; move old data to new data; move new data to old data.
Split a line-line intersection, etc).  The user can then choose their own
way of managing structure.  Either apply rigorous rule checking to
newly-created columns so that no "dirt" gets in, or load a bunch of data and
clean it subsequently.  Both scenarios need to be supported.

For analysis, the GEOS would only allow topological operations on "clean"
data (ie data that has "passed" suitable rule-based tests).  Other
non-topological operations such as display would be available for a wider
range of datasets.


Peter Bayley
Homer Systems
"An eye for an eye and soon all the world is blind" - Mahatma Gandhi

More information about the postgis-users mailing list