Hi Sean If you need other test values, let me know.
Another amazing thing that could help you (maybe) : with libgeos built with g++4.3, I have found intersection results that are Point instances, MultiPoint instances and GeometryCollection instances (with Point and LineString inside) for which is_empty is True ?!?! >>> p1.wkt 'POLYGON ((610280.5735101677710190 2512149.2914927634410560, 610286.6154681897023693 2512144.7399290697649121, 610282.4602618018398061 2512139.1018543466925621, 610276.5217483023880050 2512143.2546086502261460, 610280.5735101677710190 2512149.2914927634410560))' >>> p2.wkt 'POLYGON ((610294.6172674818662927 2512168.9214593893848360, 610280.5735101677710190 2512149.2914927634410560, 610277.9494478163542226 2512151.9708353686146438, 610291.4012882739771158 2512170.5960850822739303, 610294.6172674818662927 2512168.9214593893848360))' >>> p1.intersects(p2) True >>> inter = p1.intersection(p2) >>> inter.is_empty True >>> inter.wkt 'POINT (610280.5735101677710190 2512149.2914927634410560)' >>> p3.wkt 'POLYGON ((615954.5978750727372244 2503714.4684905251488090, 615938.6507441399153322 2503707.0301242996938527, 615912.0813686493784189 2503701.4034161432646215, 615910.9317604897078127 2503707.1973435538820922, 615922.8067917893640697 2503711.0996138113550842, 615931.8936709887348115 2503713.2773373625241220, 615934.2901800723047927 2503713.8975521801039577, 615937.8821432964177802 2503715.1284330920316279, 615943.3708786140196025 2503716.8756814240477979, 615941.9413295296253636 2503720.2658828212879598, 615950.2196434140205383 2503723.4376552742905915, 615954.5978750727372244 2503714.4684905251488090))' >>> p4.wkt 'POLYGON ((615937.8821432964177802 2503715.1284330920316279, 615931.8936709887348115 2503713.2773373625241220, 615930.9428318694699556 2503719.2727762204594910, 615935.8380441379267722 2503720.2145777060650289, 615937.8821432964177802 2503715.1284330920316279))' >>> p3.intersects(p4) True >>> inter = p3.intersection(p4) >>> inter.is_empty True >>> inter.wkt 'MULTIPOINT (615931.8936709887348115 2503713.2773373625241220, 615937.8821432964177802 2503715.1284330920316279)' >>> p5.wkt 'POLYGON ((586447.6854052192065865 2510363.8194001195952296, 586439.8964315544581041 2510362.0535588269121945, 586438.6534897035453469 2510366.8458589268848300, 586431.2654117653146386 2510365.0833780895918608, 586430.3256291303550825 2510369.7774783144704998, 586444.5045534061500803 2510373.1988828647881746, 586447.6854052192065865 2510363.8194001195952296))' >>> p6.wkt 'POLYGON ((586431.2654117653146386 2510365.0833780895918608, 586436.5568152188789099 2510366.3278640368953347, 586438.6534897035453469 2510366.8458589268848300, 586439.8964315544581041 2510362.0535588269121945, 586432.7130689054029062 2510359.3915997985750437, 586431.2654117653146386 2510365.0833780895918608))' >>> p5.intersects(p6) True >>> inter=p5.intersection(p6) >>> inter.is_empty True >>> inter.wkt 'GEOMETRYCOLLECTION (POINT (586431.2654117653146386 2510365.0833780895918608), LINESTRING (586439.8964315544581041 2510362.0535588269121945, 586438.6534897035453469 2510366.8458589268848300))' Pascal 2009/3/21 Sean Gillies <[email protected]> > Hi Pascal, > > I wonder if there is a build problem or whether the algorithm is > unstable. I'm going to be hacking on Shapely one evening this weekend > and will try to see about adding a test for this scenario. > > Sean > > On Mar 21, 2009, at 6:54 AM, Pascal Leroux wrote: > > > I couldn't reproduce the issue on a MacOSX system and on another > > Ubuntu system !!! > > > > BUT, on the SAME Ubuntu system, > > > > - if I build libgeos with (g++ as a symbolic link to) g++4.2 : no > > problem, no empty geometry collection > > - if I build libgeos with (g++ as a symbolic link to) g++4.3 : the > > issue occurs ! > > > > (it was one of the differences between my two Ubuntu systems) > > > > With libgeos built with g++4.3, the issue desn't occur with a C > > program > > > > Is this problem known with g++4.3 on a linux system ? > > > > 2009/3/20 Pascal Leroux <[email protected]> > > Sorry, I meant that, when you use Rtree, the "intersects" predicate > > is always True for each polygon obtained with the "intersection" > > method of Rtree. > > > > So if two polygons don't intersect each other, if their "minimum > > bounding rectangle" intersects each other, the "intersects" > > predicate is True. > > > > 2009/3/20 Pascal Leroux <[email protected]> > > > > Hi all, > > > > With the geos library version 3.1, it seems that the "intersects" > > predicate (used with polygons) always returns True. For more than > > 135,000 couples of polygons (got with the "intersection" method of > > Rtree), I always got True but about 125,000 intersections were empty > > geometry collections. > > > > When I use the version 3.0.3, it doesn't happen : each time > > "intersects" returns True, the intersection is not empty. > > > > I couldn't reproduce this issue in C with version 3.1 : when > > GEOSintersects return 1 (True), the intersection returned by > > GEOSIntersection is not empty. > > > > All these tests have been done on Ubuntu with Shapely version 1.0.11 > > > > Here's a couple of polygons for which intersects return True with an > > empty intersection > > > > POLYGON ((599801.1221290760440752 2546550.0634658345952630, > > 599806.0258591863093898 2546538.0948937772773206, > > 599780.3041890829335898 2546526.9730210378766060, > > 599777.5322963981889188 2546499.6322209336794913, > > 599807.2772084334865212 2546496.2815793519839644, > > 599804.4406587256817147 2546476.6445081932470202, > > 599760.1544660580111668 2546483.7799901803955436, > > 599769.8198137159924954 2546536.2887050621211529, > > 599801.1221290760440752 2546550.0634658345952630)) > > > > POLYGON ((599758.8006132490700111 2546478.1623347853310406, > > 599772.7430304150329903 2546474.0790138356387615, > > 599760.4723994010128081 2546410.1387482765130699, > > 599767.0911384929204360 2546408.3941536685451865, > > 599762.7293910720618442 2546391.5474267113022506, > > 599740.1731945683714002 2546396.7629298437386751, > > 599758.8006132490700111 2546478.1623347853310406)) > > > > Pascal > > > > > > _______________________________________________ > > Community mailing list > > [email protected] > > http://lists.gispython.org/mailman/listinfo/community > > _______________________________________________ > Community mailing list > [email protected] > http://lists.gispython.org/mailman/listinfo/community >
_______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
