[postgis-users] Strange Exceptions

David Blasby dblasby at refractions.net
Mon Jan 26 11:33:43 PST 2004


Paul Ramsey wrote:
> Validity is a terrible chicken and egg problem. Ideally, people would 
> only have valid geometries. So we could enforce a "valid-only" load 
> rule. But then how to people load their data, if they have a few invalid 
> geometries? Do we silently drop them? Then how to they find and fix 
> them? If we let people load invalid geometries (and we pretty much have 
> to) then how do we keep people from running validity-sensitive tests on 
> them? Etc, etc, etc.


You can add constraints on the table so it will only allow valid 
geometries in it:

ALTER TABLE <table> ADD CONSTRAINT isvalid(the_geom) == true;

dave




More information about the postgis-users mailing list