Re: [Jts-topo-suite-user] NegativeArraySizeException from TopologyPreservingSimplifier
Brought to you by:
dr_jts
From: Martin D. <mtn...@gm...> - 2013-01-28 03:38:41
|
Thanks. I agree, empty components should be deleted, but are not being handled correctly. Code is now fixed in SVN (with unit tests). On Sun, Jan 27, 2013 at 3:30 PM, Michaël Michaud <mic...@fr...>wrote: > Hello Martin, > > Here is a reproducible bug encountered with simplifier classes (jts 1.13) > > 1) take a set of polygons > 2) perform a negative buffer so that some polygons are made empty > 3) create a MultiPolygon from the previous result with > GeometryFactory.build() > 4) simplify this MultiPolygon either with TopologyPreservingSimplifier > or DouglasPeuckerSimplifier > > Simplifier throws a java.lang.NegativeArraySizeException > coming from TaggedLineString#init() > > Note that the GeometryCollection containing empty geometries is > considered as valid by the isValid operator > (not sure it is right, maybe the build method should get rid of empty > geometries). > By the way, simplifier code should check for empty geometries before > iterating through coordinates. > > Best regards, > > Michaël > > > > ------------------------------------------------------------------------------ > 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/learnnow-d2d > _______________________________________________ > Jts-topo-suite-user mailing list > Jts...@li... > https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user > |