Re: [geos-devel] CascadedPolygonUnion XML testing
also another_dump2 seems to execute well with JTS. I'm using its wkt representation as a collected multipolygon: http://www.giovanniallegri.it/share/another_dump2_collect_wkt.txt giovanni 2010/6/27 strk s...@keybit.net: 35 points version (2 geoms): http://strk.keybit.net/tmp/another_dump2.sql ... still finds non-noded intersections ... --strk; On Sun, Jun 27, 2010 at 12:18:22AM +0200, G. Allegri wrote: I'm getting mad. The same geometries, run in a basic test written by me works fine: http://www.giovanniallegri.it/share/test_wkt.java The same geometries give errors in Postgis (+GEOS?) and with TestRunner... giovanni 2010/6/26 strk s...@keybit.net: On Sat, Jun 26, 2010 at 12:26:11AM +0200, G. Allegri wrote: Before going to bed... a snapshot of the location causing the exception: http://www.giovanniallegri.it/share/error_condition_snapshot.png Just in case mine is smaller, another reduction here: http://strk.keybit.net/tmp/another_dump1.sql (201 points in 3 geoms) NOTE: my version is a database dump, failure happens on st_union which fails with original geoms and fails with snapped overlay. dropping any of the 3 geoms makes the operation succeed, haven't checked if that's a special handling within postgis. It'd be worth filing a ticket on trac for better handling. --strk; 2010/6/25 G. Allegri gioha...@gmail.com: This is the reduced version of the test xml: http://www.giovanniallegri.it/share/TestUnionMultiPolygon_red.xml Now it contains only two geometries. It tries to node them but fails, so a second try is done with the SnapOverlay, but it fails too. I don't know the algorithm so I'm not able, yet, to say what is failing. giovanni 2010/6/25 G. Allegri gioha...@gmail.com: Here is a test xml: http://www.giovanniallegri.it/share/TestUnionMultiPolygon.xml It's big, but I will reduce it nex time :) Notes: 1 - this multipolygon comes from an st_collect on 95 rows in a postgis table. The test on it fails with Topology Expection found non-noded intersection, because the MP is invalid. I've tested it on jts from trunk. 2 - I've run a cascadedunion.union operation on a List of the same geometries (picked with Geotools directly from the DB). It works fine. In this test I've used jts 1.10 shipped with Geotools. I will try it agains the trunk version as soon as possible. Giovanni 2010/6/25 strk s...@keybit.net: On Fri, Jun 25, 2010 at 04:39:17PM +0200, strk wrote: Martin, is there any support for testing CascadedUnion with the XML format ? Would help comparing GEOS/JTS. I've found TestUnaryUnion.xml in JTS repository. I guess that's what GEOS should be using for testing CascadedPolygonUnion. Only need to actually port UnaryUnion ... --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
An this is the polygon resulting from Union. It is valid for JTS: http://www.giovanniallegri.it/share/another_dump2_collect_wkt_resultfromJTS.txt 2010/6/27 G. Allegri gioha...@gmail.com: also another_dump2 seems to execute well with JTS. I'm using its wkt representation as a collected multipolygon: http://www.giovanniallegri.it/share/another_dump2_collect_wkt.txt giovanni 2010/6/27 strk s...@keybit.net: 35 points version (2 geoms): http://strk.keybit.net/tmp/another_dump2.sql ... still finds non-noded intersections ... --strk; On Sun, Jun 27, 2010 at 12:18:22AM +0200, G. Allegri wrote: I'm getting mad. The same geometries, run in a basic test written by me works fine: http://www.giovanniallegri.it/share/test_wkt.java The same geometries give errors in Postgis (+GEOS?) and with TestRunner... giovanni 2010/6/26 strk s...@keybit.net: On Sat, Jun 26, 2010 at 12:26:11AM +0200, G. Allegri wrote: Before going to bed... a snapshot of the location causing the exception: http://www.giovanniallegri.it/share/error_condition_snapshot.png Just in case mine is smaller, another reduction here: http://strk.keybit.net/tmp/another_dump1.sql (201 points in 3 geoms) NOTE: my version is a database dump, failure happens on st_union which fails with original geoms and fails with snapped overlay. dropping any of the 3 geoms makes the operation succeed, haven't checked if that's a special handling within postgis. It'd be worth filing a ticket on trac for better handling. --strk; 2010/6/25 G. Allegri gioha...@gmail.com: This is the reduced version of the test xml: http://www.giovanniallegri.it/share/TestUnionMultiPolygon_red.xml Now it contains only two geometries. It tries to node them but fails, so a second try is done with the SnapOverlay, but it fails too. I don't know the algorithm so I'm not able, yet, to say what is failing. giovanni 2010/6/25 G. Allegri gioha...@gmail.com: Here is a test xml: http://www.giovanniallegri.it/share/TestUnionMultiPolygon.xml It's big, but I will reduce it nex time :) Notes: 1 - this multipolygon comes from an st_collect on 95 rows in a postgis table. The test on it fails with Topology Expection found non-noded intersection, because the MP is invalid. I've tested it on jts from trunk. 2 - I've run a cascadedunion.union operation on a List of the same geometries (picked with Geotools directly from the DB). It works fine. In this test I've used jts 1.10 shipped with Geotools. I will try it agains the trunk version as soon as possible. Giovanni 2010/6/25 strk s...@keybit.net: On Fri, Jun 25, 2010 at 04:39:17PM +0200, strk wrote: Martin, is there any support for testing CascadedUnion with the XML format ? Would help comparing GEOS/JTS. I've found TestUnaryUnion.xml in JTS repository. I guess that's what GEOS should be using for testing CascadedPolygonUnion. Only need to actually port UnaryUnion ... --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
Ok, I've found the difference between the tests. I set up a test run with precisionModel FIXED and scale 1.0. With this model the union fails. While, the default precisionModel for the UnionOp is FLOATING (scale=0.0) and this runs ok... What is the model used by GEOS? 2010/6/27 G. Allegri gioha...@gmail.com: An this is the polygon resulting from Union. It is valid for JTS: http://www.giovanniallegri.it/share/another_dump2_collect_wkt_resultfromJTS.txt 2010/6/27 G. Allegri gioha...@gmail.com: also another_dump2 seems to execute well with JTS. I'm using its wkt representation as a collected multipolygon: http://www.giovanniallegri.it/share/another_dump2_collect_wkt.txt giovanni 2010/6/27 strk s...@keybit.net: 35 points version (2 geoms): http://strk.keybit.net/tmp/another_dump2.sql ... still finds non-noded intersections ... --strk; On Sun, Jun 27, 2010 at 12:18:22AM +0200, G. Allegri wrote: I'm getting mad. The same geometries, run in a basic test written by me works fine: http://www.giovanniallegri.it/share/test_wkt.java The same geometries give errors in Postgis (+GEOS?) and with TestRunner... giovanni 2010/6/26 strk s...@keybit.net: On Sat, Jun 26, 2010 at 12:26:11AM +0200, G. Allegri wrote: Before going to bed... a snapshot of the location causing the exception: http://www.giovanniallegri.it/share/error_condition_snapshot.png Just in case mine is smaller, another reduction here: http://strk.keybit.net/tmp/another_dump1.sql (201 points in 3 geoms) NOTE: my version is a database dump, failure happens on st_union which fails with original geoms and fails with snapped overlay. dropping any of the 3 geoms makes the operation succeed, haven't checked if that's a special handling within postgis. It'd be worth filing a ticket on trac for better handling. --strk; 2010/6/25 G. Allegri gioha...@gmail.com: This is the reduced version of the test xml: http://www.giovanniallegri.it/share/TestUnionMultiPolygon_red.xml Now it contains only two geometries. It tries to node them but fails, so a second try is done with the SnapOverlay, but it fails too. I don't know the algorithm so I'm not able, yet, to say what is failing. giovanni 2010/6/25 G. Allegri gioha...@gmail.com: Here is a test xml: http://www.giovanniallegri.it/share/TestUnionMultiPolygon.xml It's big, but I will reduce it nex time :) Notes: 1 - this multipolygon comes from an st_collect on 95 rows in a postgis table. The test on it fails with Topology Expection found non-noded intersection, because the MP is invalid. I've tested it on jts from trunk. 2 - I've run a cascadedunion.union operation on a List of the same geometries (picked with Geotools directly from the DB). It works fine. In this test I've used jts 1.10 shipped with Geotools. I will try it agains the trunk version as soon as possible. Giovanni 2010/6/25 strk s...@keybit.net: On Fri, Jun 25, 2010 at 04:39:17PM +0200, strk wrote: Martin, is there any support for testing CascadedUnion with the XML format ? Would help comparing GEOS/JTS. I've found TestUnaryUnion.xml in JTS repository. I guess that's what GEOS should be using for testing CascadedPolygonUnion. Only need to actually port UnaryUnion ... --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sun, Jun 27, 2010 at 12:22:35PM +0200, G. Allegri wrote: also another_dump2 seems to execute well with JTS. I'm using its wkt representation as a collected multipolygon: http://www.giovanniallegri.it/share/another_dump2_collect_wkt.txt Don't ! WKT representation is lossy. SELECT ST_Union(ST_AsText(g)); would succeed too (and does)... -- strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sun, Jun 27, 2010 at 02:18:57PM +0200, G. Allegri wrote: Ok, I've found the difference between the tests. I set up a test run with precisionModel FIXED and scale 1.0. With this model the union fails. While, the default precisionModel for the UnionOp is FLOATING (scale=0.0) and this runs ok... What is the model used by GEOS? FLOATING (the model used by the C-AP, thus postgis) --strk;; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
Are you sure it works? select st_union(st_astext(the_geom)) from selezione_exp1_red2 (one of your reductions) doesn't give any output... Anyway, do you suggest using wkb? 2010/6/27 strk s...@keybit.net: On Sun, Jun 27, 2010 at 12:22:35PM +0200, G. Allegri wrote: also another_dump2 seems to execute well with JTS. I'm using its wkt representation as a collected multipolygon: http://www.giovanniallegri.it/share/another_dump2_collect_wkt.txt Don't ! WKT representation is lossy. SELECT ST_Union(ST_AsText(g)); would succeed too (and does)... -- strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sun, Jun 27, 2010 at 10:57:37PM +0200, G. Allegri wrote: Are you sure it works? select st_union(st_astext(the_geom)) from selezione_exp1_red2 (one of your reductions) doesn't give any output... Doesn't _always_ work, did for another_dump2: strk=# select st_isvalid(st_union(g)) from another_dump2; ERROR: GEOSUnionCascaded: TopologyException: found non-noded intersection between LINESTRING (184.319 2038.88, 186.647 2046.15) and LINESTRING (186.647 2046.15, 186.647 2046.15) at 186.647 2046.15 strk=# select st_isvalid(st_union(st_astext(g))) from another_dump2; st_isvalid t (1 row) Anyway, do you suggest using wkb? Yes. HEXEWKB (the canonical output) is handled by JTS just fine. --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sun, Jun 27, 2010 at 11:14:22PM +0200, strk wrote: On Sun, Jun 27, 2010 at 10:57:37PM +0200, G. Allegri wrote: Are you sure it works? select st_union(st_astext(the_geom)) from selezione_exp1_red2 (one of your reductions) doesn't give any output... Doesn't _always_ work, did for another_dump2: For the record, using SnapToGrid gives you more control over the roundup. 1e-6 gridding works in the exp1_red2 case too: # select st_isvalid(st_union(snaptogrid(the_geom, 0.001))) from selezione_exp1_red2; st_isvalid t (1 row) --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
For the record, using SnapToGrid gives you more control over the roundup. 1e-6 gridding works in the exp1_red2 case too: Well, this is like using a FIXED precision model with scale 1e6, if I'm not wrong. Anyway I would expect a FLOATING model to work well too, as it does in JTS. I've tested HEXWKB from exp1_red2, and it works fine, so I think the result in JTS doesn't depend on the lossy wkt representation. ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel