From: John McDonald <mcdonald.alan@gm...>  20131205 02:20:19
Attachments:
Message as HTML

What I would like to do: Given a Polygon (or MultiPolygon) and a Point, p, outside the Polygon, I'd like to find the Polygon boundary line segment (p0,p1) closest to p. Then I'd like to split that boundary segment into 2: (p0,p)(p,p1), emitting a refined (Multi)Polygon Or possibly by (p0,pp)(pp,p1), where pp is the projection of p onto (p0,p1). I want to do this with the a single (Multi)Polygon with a set of points, so an ideal strategy would compute all the split locations first, and then refine the (Multi)Polygon in one pass. The best idea I've come up with is so far is to imitate com.vividsolutions.jts.densify.Densifier, replacing the onthefly computation of split locations with ones that are predetermined. Is there a better way to do this? I'm hoping there's something that already does this kind of refinement, via noding, snapping, unioning, or soemthing like that, and I'm just failing to recognize it. 
From: Martin Davis <mtnclimb@gm...>  20131205 03:23:17
Attachments:
Message as HTML

Sorry, John, there's nothing in JTS which does anything like this. You'll have to code it up more or less from scratch. If performance is an issue, you can look at indexing the segments of the geometry with an STRtree, and then using the nearestNeighbour method to efficiently find the one closest to each point. On Wed, Dec 4, 2013 at 6:20 PM, John McDonald <mcdonald.john.alan@...>wrote: > What I would like to do: > > Given a Polygon (or MultiPolygon) and a Point, p, outside the Polygon, I'd > like to find the Polygon boundary line segment (p0,p1) closest to p. Then > I'd like to split that boundary segment into 2: (p0,p)(p,p1), emitting a > refined (Multi)Polygon Or possibly by (p0,pp)(pp,p1), where pp is the > projection of p onto (p0,p1). > > I want to do this with the a single (Multi)Polygon with a set of points, > so an ideal strategy would compute all the split locations first, and then > refine the (Multi)Polygon in one pass. > > The best idea I've come up with is so far is to imitate > com.vividsolutions.jts.densify.Densifier, replacing the onthefly > computation of split locations with ones that are predetermined. > > Is there a better way to do this? I'm hoping there's something that > already does this kind of refinement, via noding, snapping, unioning, or > soemthing like that, and I'm just failing to recognize it. > > > >  > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: Landon Blake <sunburned.surveyor@gm...>  20131207 02:08:24
Attachments:
Message as HTML

John: Can you tell me a little bit about your use case? What is driving the need for the code? Do you have any sketches or diagrams that explain what you are trying to do? I'm just curious. Landon On Wed, Dec 4, 2013 at 9:23 PM, Martin Davis <mtnclimb@...> wrote: > Sorry, John, there's nothing in JTS which does anything like this. You'll > have to code it up more or less from scratch. > > If performance is an issue, you can look at indexing the segments of the > geometry with an STRtree, and then using the nearestNeighbour method to > efficiently find the one closest to each point. > > > On Wed, Dec 4, 2013 at 6:20 PM, John McDonald < > mcdonald.john.alan@...> wrote: > >> What I would like to do: >> >> Given a Polygon (or MultiPolygon) and a Point, p, outside the Polygon, >> I'd like to find the Polygon boundary line segment (p0,p1) closest to p. >> Then I'd like to split that boundary segment into 2: (p0,p)(p,p1), emitting >> a refined (Multi)Polygon Or possibly by (p0,pp)(pp,p1), where pp is the >> projection of p onto (p0,p1). >> >> I want to do this with the a single (Multi)Polygon with a set of points, >> so an ideal strategy would compute all the split locations first, and then >> refine the (Multi)Polygon in one pass. >> >> The best idea I've come up with is so far is to imitate >> com.vividsolutions.jts.densify.Densifier, replacing the onthefly >> computation of split locations with ones that are predetermined. >> >> Is there a better way to do this? I'm hoping there's something that >> already does this kind of refinement, via noding, snapping, unioning, or >> soemthing like that, and I'm just failing to recognize it. >> >> >> >>  >> Sponsored by Intel(R) XDK >> Develop, test and display web and hybrid apps with a single code base. >> Download it for free now! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk >> _______________________________________________ >> Jtstoposuiteuser mailing list >> Jtstoposuiteuser@... >> https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser >> >> > > >  > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 