#275 closed defect (fixed)
Topology Exception on valid geometries
Reported by: | yabo | Owned by: | strk |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Default | Version: | main |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
Hi,
I've encoutered a situation where two valid geometries (as stated by IsValidOp) throw a Topology Exception when being unioned. The first geometry is a MultiPolygon and the second a Polygon. Unfortunately I couldn't shrink the geometries down to a human-parsable size.
I have this problem with both geos-3.1.0 and geos-svn-trunk.
The reported error is :
TopologyException: found non-noded intersection between -3138.99 39.9929, -3195.93 131.777 and -3145.05 62.5969, -3138.99 39.9929 -3138.99 39.9929
I've attached the test program source to the ticket.
Thanks,
Attachments (1)
Change History (19)
by , 15 years ago
comment:1 by , 15 years ago
For the record, the test encoded as an XML testcase works fine. Was committed as tests/xmltester/tests/bug275.xml as of r2610.
Martin, is that the same path you took to test JTS ?
comment:2 by , 15 years ago
I tried the C++ version too, and I get a result there as well. The topology exception is cought internally, triggering snapping code:
Overlay op threw TopologyException: found non-noded intersection between -3138.99 39.9929, -3195.93 131.777 and -3145.05 62.5969, -3138.99 39.9929 -3138.99 39.9929. Will try snapping now
...
comment:4 by , 15 years ago
Owner: | changed from | to
---|
comment:5 by , 15 years ago
I experience the same error on Postgis executing an ST_Union on some valid geometry (tested with ST_IsValid).
The system I use was debian 64 bit lenny (intel) + Postgres 8.4 rc2 + Postgis 1.4rc1 + Geos 3.1.1.
Following the suggestion of strk
I pass to Geos 3.2.0-trunk (+ postgres 8.4 + postgis 1.4) and the bug is disappeared.
comment:6 by , 15 years ago
Milestone: | 3.1.1 → 3.1.2 |
---|
follow-up: 8 comment:7 by , 15 years ago
yabo, it does look like nobody can reproduce your problem, are you still experiencing it ? You should get an error on 'make check' if you do. I'd close this if there's no feedback within a week.
comment:8 by , 15 years ago
Replying to strk:
yabo, it does look like nobody can reproduce your problem, are you still experiencing it ? You should get an error on 'make check' if you do. I'd close this if there's no feedback within a week.
I still have the problem with geos-3.1.1. make check output seems normal :
Files: 20 Tests: 2216 Failed: 0 Succeeded: 2216 PASS: testrunner ================== All 1 tests passed ================== [...] Tests summary: - passed: 448 PASS: geos_unit ================== All 1 tests passed ==================
I'm on an amd64 machine with an x86_64 environement (OS, GCC, ...) and g++-4.4.1.
comment:9 by , 15 years ago
Could you please try with current TRUNK ? Also, make sure -ffloat-store or equivalent is set in your compiler flags.
comment:10 by , 15 years ago
The current trunk (r2660) doesn't build :
{{ /bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../source/headers -I../../../source/headers/geos -I../../../source/headers -g -O2 -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -MT SimplePointInAreaLocator.lo -MD -MP -MF .deps/SimplePointInAreaLocator.Tpo -c -o SimplePointInAreaLocator.lo SimplePointInAreaLocator.cpp ../../../libtool: line 861: X--tag=CXX: command not found ../../../libtool: line 861: X--tag=CXX: command not found ../../../libtool: line 894: libtool: ignoring unknown tag : command not found ../../../libtool: line 861: X--mode=compile: command not found ../../../libtool: line 894: libtool: ignoring unknown tag : command not found ../../../libtool: line 861: X--mode=compile: command not found ../../../libtool: line 1028: * Warning: inferring the mode of operation is deprecated.: command not found ../../../libtool: line 861: X--tag=CXX: command not found ../../../libtool: line 1029: * Future versions of Libtool will require --mode=MODE be specified.: command not found ../../../libtool: line 1172: Xg++: command not found ../../../libtool: line 894: libtool: ignoring unknown tag : command not found ../../../libtool: line 861: X--mode=compile: command not found ../../../libtool: line 1172: X-DHAVE_CONFIG_H: command not found ../../../libtool: line 1028: * Warning: inferring the mode of operation is deprecated.: command not found ../../../libtool: line 1029: * Future versions of Libtool will require --mode=MODE be specified.: command not found ../../../libtool: line 1172: Xg++: command not found ../../../libtool: line 1172: X-DHAVE_CONFIG_H: command not found ../../../libtool: line 1172: X-I.: command not found ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-I../../../source/headers/geos: No such file or directory ../../../libtool: line 1172: X-I.: command not found ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-I../../../source/headers/geos: No such file or directory ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-g: command not found ../../../libtool: line 1172: X-O2: command not found ../../../libtool: line 1172: X-DGEOS_INLINE: command not found ../../../libtool: line 1172: X-pedantic: command not found ../../../libtool: line 1172: X-Wall: command not found ../../../libtool: line 1172: X-ansi: command not found ../../../libtool: line 1028: * Warning: inferring the mode of operation is deprecated.: command not found ../../../libtool: line 1172: X-Wno-long-long: command not found ../../../libtool: line 1029: * Future versions of Libtool will require --mode=MODE be specified.: command not found ../../../libtool: line 1172: Xg++: command not found ../../../libtool: line 1172: X-ffloat-store: command not found ../../../libtool: line 1172: X-DHAVE_CONFIG_H: command not found ../../../libtool: line 1172: X-MT: command not found ../../../libtool: line 1172: X-I.: command not found ../../../libtool: line 1172: XSimplePointInAreaLocator.lo: command not found ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-MD: command not found ../../../libtool: line 1172: X-I../../../source/headers/geos: No such file or directory ../../../libtool: line 1172: X-MP: command not found ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-MF: command not found ../../../libtool: line 1172: X-g: command not found ../../../libtool: line 1172: X.deps/SimplePointInAreaLocator.Tpo: No such file or directory ../../../libtool: line 1172: X-O2: command not found ../../../libtool: line 1172: X-c: command not found ../../../libtool: line 1172: X-DGEOS_INLINE: command not found ../../../libtool: line 1225: XSimplePointInAreaLocator.lo: command not found ../../../libtool: line 1172: X-pedantic: command not found ../../../libtool: line 1230: libtool: compile: cannot determine name of library object from `': command not found make[4]: * [SimplePointInAreaLocator.lo] Error 1 }}
comment:11 by , 15 years ago
sorry for the formatting (can't edit :-/).
/bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../source/headers -I../../../source/headers/geos -I../../../source/headers -g -O2 -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -MT SimplePointInAreaLocator.lo -MD -MP -MF .deps/SimplePointInAreaLocator.Tpo -c -o SimplePointInAreaLocator.lo SimplePointInAreaLocator.cpp ../../../libtool: line 861: X--tag=CXX: command not found ../../../libtool: line 861: X--tag=CXX: command not found ../../../libtool: line 894: libtool: ignoring unknown tag : command not found ../../../libtool: line 861: X--mode=compile: command not found ../../../libtool: line 894: libtool: ignoring unknown tag : command not found ../../../libtool: line 861: X--mode=compile: command not found ../../../libtool: line 1028: *** Warning: inferring the mode of operation is deprecated.: command not found ../../../libtool: line 861: X--tag=CXX: command not found ../../../libtool: line 1029: *** Future versions of Libtool will require --mode=MODE be specified.: command not found ../../../libtool: line 1172: Xg++: command not found ../../../libtool: line 894: libtool: ignoring unknown tag : command not found ../../../libtool: line 861: X--mode=compile: command not found ../../../libtool: line 1172: X-DHAVE_CONFIG_H: command not found ../../../libtool: line 1028: *** Warning: inferring the mode of operation is deprecated.: command not found ../../../libtool: line 1029: *** Future versions of Libtool will require --mode=MODE be specified.: command not found ../../../libtool: line 1172: Xg++: command not found ../../../libtool: line 1172: X-DHAVE_CONFIG_H: command not found ../../../libtool: line 1172: X-I.: command not found ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-I../../../source/headers/geos: No such file or directory ../../../libtool: line 1172: X-I.: command not found ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-I../../../source/headers/geos: No such file or directory ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-g: command not found ../../../libtool: line 1172: X-O2: command not found ../../../libtool: line 1172: X-DGEOS_INLINE: command not found ../../../libtool: line 1172: X-pedantic: command not found ../../../libtool: line 1172: X-Wall: command not found ../../../libtool: line 1172: X-ansi: command not found ../../../libtool: line 1028: *** Warning: inferring the mode of operation is deprecated.: command not found ../../../libtool: line 1172: X-Wno-long-long: command not found ../../../libtool: line 1029: *** Future versions of Libtool will require --mode=MODE be specified.: command not found ../../../libtool: line 1172: Xg++: command not found ../../../libtool: line 1172: X-ffloat-store: command not found ../../../libtool: line 1172: X-DHAVE_CONFIG_H: command not found ../../../libtool: line 1172: X-MT: command not found ../../../libtool: line 1172: X-I.: command not found ../../../libtool: line 1172: XSimplePointInAreaLocator.lo: command not found ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-MD: command not found ../../../libtool: line 1172: X-I../../../source/headers/geos: No such file or directory ../../../libtool: line 1172: X-MP: command not found ../../../libtool: line 1172: X-I../../../source/headers: No such file or directory ../../../libtool: line 1172: X-MF: command not found ../../../libtool: line 1172: X-g: command not found ../../../libtool: line 1172: X.deps/SimplePointInAreaLocator.Tpo: No such file or directory ../../../libtool: line 1172: X-O2: command not found ../../../libtool: line 1172: X-c: command not found ../../../libtool: line 1172: X-DGEOS_INLINE: command not found ../../../libtool: line 1225: XSimplePointInAreaLocator.lo: command not found ../../../libtool: line 1172: X-pedantic: command not found ../../../libtool: line 1230: libtool: compile: cannot determine name of library object from `': command not found make[4]: *** [SimplePointInAreaLocator.lo] Error 1
comment:12 by , 15 years ago
Don't pay attention... I just forgot to ./autogen.sh. Sorry.
--ffloat-store is in the compilation flags.
make check works.
tests summary: ok:539 PASS: geos_unit ============= 1 test passed =============
I still have the same error with my test program using the libgeos-3.2.0 though.
follow-up: 14 comment:13 by , 15 years ago
Those 539 tests are just a subset of the available tests. The suite containing your original problem is under test/xmltester and would run when invoking 'make check' from there or any higher-level directory.
You can also try running manually:
cd tests/xmltester; ./XMLTester -v tests/bug275.xml
comment:14 by , 15 years ago
Replying to strk:
You can also try running manually:
cd tests/xmltester; ./XMLTester -v tests/bug275.xml
It seems to work :
$ ./XMLTester -v tests/bug275.xml Files: 1 Tests: 3 Failed: 0 Succeeded: 3
The test.cc file attached still fails though (linked with geos-3.2):
$ g++ -Igeos-trunk/include test.cc -Lgeos-trunk/lib/ -lgeos $ LD_LIBRARY_PATH=$HOME/dev/geos-trunk/lib ldd a.out linux-vdso.so.1 => (0x00007fffb91ff000) libgeos-3.2.0.so => /home/yabo/dev/geos-trunk/lib/libgeos-3.2.0.so (0x00007f47219f8000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f47216ea000) libm.so.6 => /lib/libm.so.6 (0x00007f4721468000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f4721252000) libc.so.6 => /lib/libc.so.6 (0x00007f4720eff000) /lib/ld-linux-x86-64.so.2 (0x00007f4721d73000) $ LD_LIBRARY_PATH=$HOME/dev/geos-trunk/lib ./a.out vg1.isValid() : 1 vg2.isValid() : 1 vg3.isValid() : 1 g1->Union(g2) Overlay op threw TopologyException: found non-noded intersection between -3138.99 39.9929, -3195.93 131.777 and -3145.05 62.5969, -3138.99 39.9929 -3138.99 39.9929. Will try snapping now g1->Union(g3) Overlay op threw TopologyException: found non-noded intersection between -3138.99 39.9929, -3195.93 131.777 and -3145.05 62.5969, -3138.99 39.9929 -3138.99 39.9929. Will try snapping now
follow-up: 16 comment:15 by , 15 years ago
The "TopologyException" message is just an informational one. See it ends with "Will try snapping now" ? The operation is succeeding using snapping algorithm, which is automatic. Please verify the return from those Union to check.
comment:16 by , 15 years ago
Replying to strk:
The "TopologyException" message is just an informational one. See it ends with "Will try snapping now" ? The operation is succeeding using snapping algorithm, which is automatic. Please verify the return from those Union to check.
You're absolutely right. In fact no more exceptions are thrown with geos-3.2. So it seems to be fixed !
However, is there a flag or something to prevent geos from writing such messages ?
comment:17 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
No, no flags. But actually that message is just a debugging one. I've removed it as of r2665.
test program