Re: [Jts-topo-suite-user] Subtracting lots of small polygons from a large one
Brought to you by:
dr_jts
From: Karel B. <kar...@gm...> - 2012-12-07 10:49:38
|
Hi Martin, The holes intersect each other and the shell, so I'll definitely have to go for the second option. The problem there is that unary union has not been fully ported yet in jsts. How much faster do you think it will be with the unary union? If its worth it I could dig into the code and try to do the port myself. Thanks Karel On Dec 6, 2012, at 6:35 PM, Martin Davis wrote: > This is probably obvious, but if you know the holes do not intersect the polygon shell or other holes, then you can simply construct a new polygon with the holes created explicitly. > > In the more general case, one way to improve performance is to union all the hole polygons first (using Unary Union), and then do a single difference operation. > > On Thu, Dec 6, 2012 at 9:28 AM, Karel Bruneel <kar...@gm...> wrote: > Hi Everybody, > Hi Martin, :) > > I'm trying to make a polygon with a lot of holes in it and it is extremely slow. I'm doing it in jsts (javascript), what makes it even more crucial to get the algorithm right. > > The way I do it now is: > - I create the polygon (poly) > - and then punch the holes in it one by one using: poly.difference(hole_poly) > > Is there a better way to do this? I've been thinking triangulation, but I'm reluctant to try that because I really don't know if it will help. > > What is the fastest way to punch a lot of holes in a polygon using jts? I'm not afraid of some programming as long as there is a decent chance of it running fast. > > Maybe I need an algorithm that is not available in jst at this point? > > Thanks a lot! > Karel > > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Jts-topo-suite-user mailing list > Jts...@li... > https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d_______________________________________________ > Jts-topo-suite-user mailing list > Jts...@li... > https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user |