[postgis-devel] Now that we have moved on - getting regression failure on 1.4

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue Nov 25 05:51:03 PST 2008


Obe, Regina wrote:

> I compiled 1.4 on OpenSUSE 10.3 with 3.1.0 Geos SVN and all tests pass
> except one. regress_bdpoly.
> 
> *** regress_bdpoly_expected	2008-11-25 05:38:32.000000000 -0700
> --- /tmp/pgis_reg_10751/test_36_out	2008-11-25 06:23:00.000000000
> -0700
> ***************
> *** 1,19 ****
> ! BuildArea|SRID=2;POLYGON((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2))
> ! BuildArea|SRID=3;POLYGON((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2),(2 2 5,4
> 2 4,4 4 3,2 4 2,2 2 1),(5 5 6,7 5 7,7 7 8,5 7 9,5 5 10))
>   BuildArea|SRID=3;POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2
> 2),(5 5,7 5,7 7,5 7,5 5))
> ! BuildArea|SRID=3;POLYGON((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2),(2 2 5,4
> 2 4,4 4 3,2 4 2,2 2 1),(5 5 6,7 5 7,7 7 8,5 7 9,5 5 10))
> ! BuildArea|SRID=3;MULTIPOLYGON(((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2),(2
> 2 5,4 2 4,4 4 3,2 4 2,2 2 1),(5 5 6,7 5 7,7 7 8,5 7 9,5 5 10)),((20 0
> 10,20 10 8,30 10 6,30 0 4,20 0 2),(22 2 5,24 2 4,24 4 3,22 4 2,22 2
> 1),(25 5 6,27 5 7,27 7 8,25 7 9,25 5 10)))
>   BdMPolyFromText|SRID=3;MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,4
> 2,4 4,2 4,2 2),(5 5,7 5,7 7,5 7,5 5)),((20 0,20 10,30 10,30 0,20 0),(22
> 2,24 2,24 4,22 4,22 2),(25 5,27 5,27 7,25 7,25 5)))
>   BdPolyFromText|SRID=3;POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2
> 4,2 2),(5 5,7 5,7 7,5 7,5 5))
>   ERROR:  Input is not a MultiLinestring
>   ERROR:  Input is not a MultiLinestring
>   ERROR:  Input returns more then a single polygon, try using
> BdMPolyFromText instead
>   BdMPolyFromText|SRID=3;MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,4
> 2,4 4,2 4,2 2),(5 5,7 5,7 7,5 7,5 5)))
> ! BuildArea|SRID=2;POLYGON((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2))
> ! BuildArea|SRID=3;POLYGON((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2),(2 2 5,4
> 2 4,4 4 3,2 4 2,2 2 1),(5 5 6,7 5 7,7 7 8,5 7 9,5 5 10))
>   BuildArea|SRID=3;POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2
> 2),(5 5,7 5,7 7,5 7,5 5))
> ! BuildArea|SRID=3;POLYGON((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2),(2 2 5,4
> 2 4,4 4 3,2 4 2,2 2 1),(5 5 6,7 5 7,7 7 8,5 7 9,5 5 10))
> ! BuildArea|SRID=3;MULTIPOLYGON(((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2),(2
> 2 5,4 2 4,4 4 3,2 4 2,2 2 1),(5 5 6,7 5 7,7 7 8,5 7 9,5 5 10)),((20 0
> 10,20 10 8,30 10 6,30 0 4,20 0 2),(22 2 5,24 2 4,24 4 3,22 4 2,22 2
> 1),(25 5 6,27 5 7,27 7 8,25 7 9,25 5 10)))
>   BdMPolyFromText|SRID=3;MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,4
> 2,4 4,2 4,2 2),(5 5,7 5,7 7,5 7,5 5)),((20 0,20 10,30 10,30 0,20 0),(22
> 2,24 2,24 4,22 4,22 2),(25 5,27 5,27 7,25 7,25 5)))
>   BdPolyFromText|SRID=3;POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2
> 4,2 2),(5 5,7 5,7 7,5 7,5 5))
>   ERROR:  Input is not a MultiLinestring
> --- 1,19 ----
> ! ERROR:  geometry contains non-closed rings
> ! ERROR:  geometry contains non-closed rings
>   BuildArea|SRID=3;POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2
> 2),(5 5,7 5,7 7,5 7,5 5))
> ! ERROR:  geometry contains non-closed rings
> ! ERROR:  geometry contains non-closed rings
>   BdMPolyFromText|SRID=3;MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,4
> 2,4 4,2 4,2 2),(5 5,7 5,7 7,5 7,5 5)),((20 0,20 10,30 10,30 0,20 0),(22
> 2,24 2,24 4,22 4,22 2),(25 5,27 5,27 7,25 7,25 5)))
>   BdPolyFromText|SRID=3;POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2
> 4,2 2),(5 5,7 5,7 7,5 7,5 5))
>   ERROR:  Input is not a MultiLinestring
>   ERROR:  Input is not a MultiLinestring
>   ERROR:  Input returns more then a single polygon, try using
> BdMPolyFromText instead
>   BdMPolyFromText|SRID=3;MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,4
> 2,4 4,2 4,2 2),(5 5,7 5,7 7,5 7,5 5)))
> ! ERROR:  geometry contains non-closed rings
> ! ERROR:  geometry contains non-closed rings
>   BuildArea|SRID=3;POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2 4,2
> 2),(5 5,7 5,7 7,5 7,5 5))
> ! ERROR:  geometry contains non-closed rings
> ! ERROR:  geometry contains non-closed rings
>   BdMPolyFromText|SRID=3;MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(2 2,4
> 2,4 4,2 4,2 2),(5 5,7 5,7 7,5 7,5 5)),((20 0,20 10,30 10,30 0,20 0),(22
> 2,24 2,24 4,22 4,22 2),(25 5,27 5,27 7,25 7,25 5)))
>   BdPolyFromText|SRID=3;POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,4 4,2
> 4,2 2),(5 5,7 5,7 7,5 7,5 5))
>   ERROR:  Input is not a MultiLinestring

Yup, this is a known issue - the unparser is complaining about an 
invalid input geometry, and this is actually correct. If run one of the 
example SQL statements against 1.3 you get this:


postgis13=# select 'BuildArea', asewkt(buildarea('SRID=2;LINESTRING(0 0 
2, 10 0 4, 10 10 6, 0 10 8, 0 0 10)'));
  ?column?  |                        asewkt
-----------+------------------------------------------------------
  BuildArea | SRID=2;POLYGON((0 0 10,0 10 8,10 10 6,10 0 4,0 0 2))
(1 row)


This shows that GEOS can produce non-OGC compliant geometries :(  This 
only shows up in 1.4 since all invocations of the parser/unparser now 
use the same set of checks. It's on my TODO list to resolve this, but 
it'll need some time to look it...


ATB,

Mark.

-- 
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063



More information about the postgis-devel mailing list