One way to do this is to set the data attribute on the segments input as 
constraints, using the constructor:

http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/triangulate/Segment.html#Segment(com.vividsolutions.jts.geom.Coordinate,%20com.vividsolutions.jts.geom.Coordinate,%20java.lang.Object)

The data attribute is preserved when segments are split, so it can be 
checked to determine the parentage of segments in the triangulation.  An 
easy object to set as the data item is the original segment itself.

Alternatively, constraint subsegments created by splitting with Steiner 
points are always be approximately collinear with an input constraint 
segment (up to a small distance tolerance).  So you can test if both 
endpoints lie near a constraint segment.  This requires a spatial index 
on the input constraint segments to be efficient.

On 10/25/2013 1:21 PM, John McDonald wrote:
> I want to refine the output of ConformingDelaunayTriangulationBuilder, 
> but to do it correctly, I need to know which edges are derived from 
> the input constraint segments. What's the best way to do that?
>
> The best I've come up with is to create a Set of input LineSegments, 
> and convert each QuadEdge to a LineSegment, and look for matches. But 
> that won't handle input segments that have been split with Steiner points.
>
>


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&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