Well, the buffer(0) trick is a bit of a hack, and does have some known
failure cases - and this is another one!
That said, the geometry is certainly in better shape after going through
buffer(0). The remaining problem is that there are holes in the main
polygon which are filled by other polygons. Not sure why this is
happening. Anyway, you can merge these by running union() on the resulting
geometry.
In code this looks like:
Geometry fix = poly.buffer(0).union();
(But you'll probably want to test validity before running union()).
On Thu, Jan 10, 2013 at 10:28 AM, Yuri <yuri.lupol@...> wrote:
> Hi Martin and list!
>
> I need to fix polygonal topology and saw that it can be done by
> applying zero-buffer on invalid polygonal, but I didn't manage to fix
> it that way.
> Some overlay artifacts remain in buffer result.
> Is there any other way to fix it?
>
> Please take a look into that geometry - link to WKT:
> http://dl.dropbox.com/u/1233939/geomUT.txt
>
> --
> Thanks,
> Yuri Lupol
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> Jts-topo-suite-user mailing list
> Jts-topo-suite-user@...
> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>
|