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 <[email protected]> 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 <
> [email protected]> 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 on-the-fly
>> computation of split locations with ones that are pre-determined.
>>
>> 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
>> _______________________________________________
>> Jts-topo-suite-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>>
>>
>
>
> ------------------------------------------------------------------------------
> 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
> _______________________________________________
> Jts-topo-suite-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>
>
------------------------------------------------------------------------------
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
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to