[postgis-devel] SVN trunk parser modifications stage 2

Obe, Regina robe.dnd at cityofboston.gov
Mon Oct 27 14:53:17 PDT 2008


> Right, if the default behavior is not to validate, then it will load 
> just fine.  But I have been assuming that the default behavior will be 
> to validate, since all of Mark's comments point in this direction:

On 2008-10-20, Mark Cave-Ayland wrote:
 >     0 - No checking; all checks are disabled
 >     1 - OGC level checking; check for minimum numbers of points and
 >         closure of polygons
 >     2 - GEOS level validation; check input geometries are valid as
 >         per the GEOS IsValid() function
 >
 > The first time the parser/unparser is invoked then we check to see if
 > this setting is present; if it is then the current parser check level is
 > set this value. Otherwise a default value of 1 is chosen.

Hmm I interpreted that to mean 1 is the current non-breaking behavior which is mild checking for non-closed rings etc..  
For example if I were to stuff this in

SELECT ST_GeomFromEWKT('POLYGON((1 2 3, 4 5 6, 2 3 4))')

Even in current installs it would not load.  So the 0 is actually a new feature - where we let true aliens such as the above into the mixture.

I was thinking of overloading instead of GeomFrom..WithStrict, because I figured first pass around
we will not be able to control at the GUC level because of Mark's observations, but by overloading we will not be changing interfaces.

So an install with no postgis GUC ability would default the ST_GeomFromEWKT, ST_GeomFromEWKB to (hmm I guess 1) or use the overloaded functions to force stricter or less strict behavior and one with GUC ability later on would be
able to read default from GUC instead of assuming 1.

Hope that helps,
Regina









-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20081027/71cc4f10/attachment.html>


More information about the postgis-devel mailing list