Interface ConstraintSplitPointFinder

 1 /*
 2  * Copyright (c) 2016 Vivid Solutions.
 3  *
 4  * All rights reserved. This program and the accompanying materials
 5  * are made available under the terms of the Eclipse Public License 2.0
 6  * and Eclipse Distribution License v. 1.0 which accompanies this distribution.
 7  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v20.html
 8  * and the Eclipse Distribution License is available at
 9  *
10  * http://www.eclipse.org/org/documents/edl-v10.php.
11  */
12  
13 package org.locationtech.jts.triangulate;
14  
15  
16 import org.locationtech.jts.geom.Coordinate;
17  
18 /**
19  * An interface for strategies for determining the location of split points on constraint segments.
20  * The location of split points has a large effect on the performance and robustness of enforcing a
21  * constrained Delaunay triangulation. Poorly chosen split points can cause repeated splitting,
22  * especially at narrow constraint angles, since the split point will end up encroaching on the
23  * segment containing the original encroaching point. With detailed knowledge of the geometry of the
24  * constraints, it is sometimes possible to choose better locations for splitting.
25  * 
26  * @author mbdavis
27  */
28 public interface ConstraintSplitPointFinder {
29     /**
30      * Finds a point at which to split an encroached segment to allow the original segment to appear
31      * as edges in a constrained Delaunay triangulation.
32      * 
33      * @param seg the encroached segment
34      * @param encroachPt the encroaching point
35      * @return the point at which to split the encroached segment
36      */
37     Coordinate findSplitPoint(Segment seg, Coordinate encroachPt);
38 }
39