#158 closed defect (fixed)
Some external rings dropped during buffer operation
Reported by: | Owned by: | hkaiser | |
---|---|---|---|
Priority: | major | Milestone: | 3.2.0 |
Component: | Core | Version: | main |
Severity: | Critical | Keywords: | imported, phpbugtracker |
Cc: | mloskot |
Description (last modified by )
sample for XMLTester
<run> <!--precisionModel scale="1.0" offsetx="0.0" offsety="0.0"/--> <precisionModel type="FLOATING"/> <case> <desc>
Test One Outer ring is returned instead of two outer rings. One of the Polygons is not in the resultant set
</desc> <a> MULTIPOLYGON ((( 139 819, 485 185, 139 184, 139 819 )), (( 215 1191, 1620 1203, 1483 0, 215 1191 ))) </a> <test> <desc>
Buffer One Outer ring is returned instead of two outer rings. One of the Polygons is not in the resultant set
</desc> <op name="buffer" arg1="a" arg3="0.0"> MULTIPOLYGON ((( 527 725, 349 334, 128 193, 527 725 )), (( 215 1191, 1620 1203, 1483 0, 215 1191 )))</op> </test> </case> </run>
Attachments (2)
Change History (14)
by , 17 years ago
Attachment: | u5small.xml added |
---|
by , 17 years ago
Attachment: | SubgrahpDepthLocater.patch added |
---|
patch with a incomplete hack to fix and lots of comments
comment:1 by , 17 years ago
apply the patch to make SubgraphDepthLocater more chatty Notice that the LineSegments pushed back into the stabbedSegments list are NOT the same as the values retrieved from the list Need to fix this by adding a deep copy to the constructor for DepthSegment bash-3.2$ XMLTester -v u5small.xml SubgraphDepthLocater::findStabbedSegments: evaluate segment 0 (215 1191 1620 1203) segment above or below stabbing line, skipping SubgraphDepthLocater::findStabbedSegments: evaluate segment 1 (1620 1203 1483 0) depth: 1 right:1, left:0 swapped:1 push back: (LINESEGMENT(1483 0,1620 1203) 1) SubgraphDepthLocater::findStabbedSegments: evaluate segment 2 (1483 0 215 1191) depth: 0 right:1, left:0 swapped:0 push back: (LINESEGMENT(1483 0,215 1191) 0) SubgraphDepthLocater::DepthSegmentLessThen LINESEGMENT(1483 0,215 1191):0 LINESEGMENT(1483 0,215 1191):1 == 0 SubgraphDepthLocater::getDepth() found these stabbed segments (0: LINESEGMENT(1483 0,215 1191) 0) (1: LINESEGMENT(1483 0,215 1191) 1) SubgraphDepthLocater::getDepth(485 185): 0
comment:2 by , 17 years ago
Issue was that DepthSegment was not createing a copy of the LineSegment and was only cachign the pointer passed. Except that findStabbedSegments was repeatedly initializing DepthSegments using the same var pointer. This patch causes a copy of the LineSegment to be made. Other corrective techniques exist. --- SNIP --- --- source/operation/buffer/SubgraphDepthLocater.cpp.orig 2007-02-21 05:14:20.000000000 -0500 +++ source/operation/buffer/SubgraphDepthLocater.cpp 2007-07-23 21:36:16.000000000 -0400 @@ -55,7 +55,7 @@ private: - geom::LineSegment& upwardSeg; + geom::LineSegment upwardSeg; /* * Compare two collinear segments for left-most ordering. @@ -81,12 +81,14 @@ int leftDepth; DepthSegment(geom::LineSegment &seg, int depth) - : - upwardSeg(seg), - leftDepth(depth) +// : +// upwardSeg(seg), +// leftDepth(depth) { // input seg is assumed to be normalized //upwardSeg.normalize(); + leftDepth = depth; + upwardSeg = seg; } /**
comment:3 by , 16 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
comment:4 by , 16 years ago
Milestone: | imported |
---|
comment:5 by , 16 years ago
Component: | Build scripts → Core |
---|---|
Milestone: | → 3.0.0 |
Priority: | 1 → major |
Version: | 3.0.0 → svn-trunk |
comment:6 by , 16 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:8 by , 15 years ago
Milestone: | → 3.1.0 |
---|---|
Owner: | set to |
comment:9 by , 15 years ago
Milestone: | 3.1.0 → 3.2.0 |
---|
I'm not competent to work this, kicking to 3.2.
comment:10 by , 15 years ago
Owner: | changed from | to
---|
comment:11 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Oh my god. I've spent *hours* to figure this out, and Carl already found it ! See bug #244.
Well, Carl, happy to have a double-blind confirmation the patch was correct then :) I assume this is fixed, w/out even checking.
comment:12 by , 15 years ago
It appears the relavent patch was r2503 in trunk, I see no sign that it has been backported.
XMLTester file