<div dir="ltr">Thanks all for the quick reply and sorry for my late response.<div><br></div><div>Thanks, Paul and Martin for clarifying the behavior to me. I'll see if I can change my workflow to handle these edge cases.</div><div><br></div><div>Also thanks to Darafei for the link to pprepair. I'll have a look at it, but I'm running Windows so it is a bit more complex to quickly test ;)<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br></div><div dir="ltr">Regards,<br>
<br>Paul<br>
<br>
<div style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="border:1px solid #e5e5e5;background-color:#f8f8f8;padding:0.8em 0.8em 0.3em 0.8em"><div style="margin:0 0 8px 0"><p style="margin:0"><span><b><img style="float:left;margin-left:5px;margin-right:5px" src="http://www.bontepaarden.nl/bontepaarden/images/newButton.png" alt="" height="120" width="160">Paul Meems </b><br><span>Release manager, configuration manager</span><br><span>and forum moderator of MapWindow GIS.</span><br><a href="http://www.mapwindow.org/" target="_blank"><span>www.mapwindow.org</span></a><br><br><span>Owner of MapWindow.nl - Support for</span><br><span>Dutch speaking users.</span><br><a href="http://www.mapwindow.nl/" target="_blank"><span>www.mapwindow.nl</span></a><br></span></p>
<p style="margin:0px"><b><br></b></p><p style="margin:0px"><b>The MapWindow GIS project has moved to <a href="https://github.com/MapWindow" target="_blank">GitHub</a>!</b></p><p style="font-size:13.3px;margin:0px"><br><a href="https://github.com/MapWindow/MapWinGIS/releases" target="_blank">Download the latest MapWinGIS mapping engine.</a><br></p><p style="font-size:13.3px;margin:0px"><span style="font-size:13.3px"><a href="https://github.com/MapWindow/MapWindow5/releases" target="_blank">Download the latest MapWindow 5 open source desktop application.</a></span></p></div></div><img src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=3.9.12&t=1322134056890&u=482737fd0c4ca423" height="1" width="1"></div>
</div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Op wo 2 jan. 2019 om 18:26 schreef Martin Davis <<a href="mailto:mtnclimb@gmail.com">mtnclimb@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">As Paul says, this is expected behaviour, due to the fact that in general constructed intersection vertices do not lie exactly on the line segments which intersect. Furthermore, this can't be solved by using a coarser precision model - that just makes the problem worse!<div><br></div><div>So the only way to "solve" this is to ask a different question. One possibility is to to process all or some of the input polygons to form a properly noded coverage. Or, use a tolerance value in the overlaps predicate, and accept that the output coverage will only be approximately accurate.</div><div><br></div><div>Both of these solutions will require some new algorithms in GEOS...</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 2, 2019 at 7:48 AM Paul Meems <<a href="mailto:bontepaarden@gmail.com" target="_blank">bontepaarden@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi List,</div><div dir="ltr"><br></div><div dir="ltr">I'm creating irregular polygons and I don't want to let them overlap.</div><div dir="ltr">So before adding the polygon to my list of 'good' polygons, I do an overlap check first.</div><div dir="ltr">When the polygon overlaps with an existing polygon I do a clip difference and add the clipped polygon to my good list.</div><div dir="ltr"><br></div><div dir="ltr">Sometimes two polygons still overlap after a clip difference.</div><div dir="ltr"><br></div><div dir="ltr">I managed to extract two sets that barely overlap. The first set doesn't overlap anymore after clipping the second one is still overlapping.</div><div dir="ltr"><br></div><div dir="ltr">Set 1:</div><div dir="ltr"><div dir="ltr">shp = POLYGON ((259449.071118579 543868.469050065,259460.460699968 543878.23006619,259463.245769758 543873.768560297,259455.578068317 543860.876455946,259449.071118579 543868.469050065))</div><div dir="ltr">shp2 = POLYGON ((259463.243735243 543856.317227775,259458.0148573 543864.973555723,259462.906856719 543873.198728218,259471.741696109 543861.450443661,259463.243735243 543856.317227775))</div><div><div dir="ltr" class="gmail-m_-4944843245836372814gmail-m_-1683050172748907535gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>shp3 (clipped result) = POLYGON ((259463.243735243 543856.317227775,259458.014857301 543864.973555722,259462.906856719 543873.198728217,259471.741696109 543861.450443661,259463.243735243 543856.317227775))</div><div dir="ltr"><br></div><div dir="ltr">Set 2:</div><div dir="ltr"><div dir="ltr">shp = POLYGON ((259073.014081524 544320.092508488,259085.267633063 544321.677731439,259085.942168897 544320.308101652,259074.192475622 544310.983687036,259073.014081524 544320.092508488))</div><div dir="ltr">shp2 = POLYGON ((259087.677538158 544333.393525226,259097.260135269 544321.853428493,259090.546766392 544316.354731347,259079.984140336 544327.005127152,259087.677538158 544333.393525226))</div>
<div dir="ltr">shp3 (clipped result) = POLYGON ((259087.677538158 544333.393525226,259097.260135269 544321.853428493,259090.546766392 544316.354731347,259085.267633064 544321.677731438,259085.267633063 544321.677731439,259085.267633062 544321.677731439,259079.984140336 544327.005127152,259087.677538158 544333.393525226))<br></div><div dir="ltr"><br></div><div>I'm using C# with MapWinGIS to do the actions:</div><div><div> if (shp.Overlaps(shp2))</div><div> {</div><div> var shp3 = shp2.Clip(shp, tkClipOperation.clDifference);<br></div><div> Assert.IsFalse(shp.Overlaps(shp3), "New shape still overlaps");<br></div><div> }<br></div></div><div><br></div><div>MapWinGIS is using the GDAL v2.3.3 binaries from GisInternals which in turn is using geos-3.4 </div><div>MapWinGIS is directly porting its functions to the GEOS functions:</div><div><a href="https://github.com/MapWindow/MapWinGIS/blob/master/src/COM%20classes/Shape.cpp#L1194" target="_blank">https://github.com/MapWindow/MapWinGIS/blob/master/src/COM%20classes/Shape.cpp#L1194</a><br></div><div><a href="https://github.com/MapWindow/MapWinGIS/blob/master/src/COM%20classes/Shape.cpp#L1302" target="_blank">https://github.com/MapWindow/MapWinGIS/blob/master/src/COM%20classes/Shape.cpp#L1302</a><br></div><div><br></div><div>Before I report this as a defect I want to know if my workflow and expectations are correct.</div><div><br></div><div>Thanks,</div><br>Paul<br>
</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a></blockquote></div>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a></blockquote></div>