[postgis-devel] current_parser_check_flags
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Tue Dec 7 00:34:35 PST 2010
Paul Ramsey wrote:
> - In 2.0 (and in 1.5) the lwgeom_in functions are called with
> PARSER_CHECK_ALL however,
> - In 2.0 (and in 1.5) the checks are not actually run.
...due to an error in Mark's parser branch merge. I see this as being a
mistake rather than a conscious design decision.
> - In 2.0 there is now a clean.sql regression tests that loads in
> polygons with unclosed rings (and then presumably cleans them).
> Because my new WBK reader both declares PARSER_CHECK_ALL and actually
> checks, I cannot pass this regression.
>
> (This is the last regression I have to pass / alter before I can commit back.)
I'm still of the mind that we should *never* accept polygons with
unclosed rings, so I'd remove these parts of the regression tests. I'm
fairly sure I posted about this when I wrote the code originally, but
here's what worked well for me:
- WKT and WKB input should be checked with all flags
- WKT and WKB output should have no output checking (to allow people to
dump databases with invalid geoms)
- Ring closure should only check in 2 dims, as GEOS 2.5D calculations
can produce unclosed rings in the Z plane
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the postgis-devel
mailing list