Re: [Jts-topo-suite-user] Fwd: speeding up unions/intersections with bounding boxes
Brought to you by:
dr_jts
From: Dave P. <dav...@pi...> - 2011-03-25 13:12:52
|
Hi Martin, Thanks for the advice I will have a play this weekend. I am using small polygon to represent the possible movement off an object, I union these small polygons and calculate the areas where your allowed to travel by deriving intersection with a much larger polygon which defines which areas your allowed to travel in. I think I will have a play with the PreparedGeometry and see what happens. Dave. > Interesting question.... > > Without seeing your exact data, it's hard to be specific, but here's some > comments: > > - The JTS intersection method does check for bounding box intersection > initially. Union does as well, in order to carry out trivial union if > possible > > - In general it's probably not efficient to clip a polygon to the bounding > box of another polygon before doing the full intersection. However, if you > are intersecting a lot of small polygons in the same general area to a > much > larger polygon (e.g. a study area against a coastline), it would be > worthwhile clipping the large poly to the overall envelope of the smaller > ones > > - Another thing you can do in the above situation is to use > PreparedGeometry.intersects() as a pre-test for the possibllity of > intersection. Prepare the large polygon, then check intersects on the > smaller ones before actually computing the intersection. You can also > check > covers() - if that is true then the intersection is just the small polygon > itself. > > (It would be nice to add an intersection() method to PreparedGeometry > which > performs all these checks automatically. I'll add that to the ToDo list) > > If you do try any of the above, it would be great to hear back about what > worked and how well. > > > Martin > > > On Thu, Mar 24, 2011 at 12:06 AM, Dave Potts <dav...@pi...> > wrote: > >> >> >> I do a lot of processing with the unioning of polygon geometries and the >> intersections of a coastline polygon. >> >> I was just wondering if I applied a bounding box to the intersection or >> unionioning construct to clip the area that would have qny effect on the >> speed processing? >> >> Is jts already smart enough to do this type of thing by default? >> >> > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! > http://p.sf.net/sfu/intel-dev2devmar_______________________________________________ > Jts-topo-suite-user mailing list > Jts...@li... > https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user > ------------------------------------------------------------------------- Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Pinan Software |