本文整理汇总了Java中com.vividsolutions.jts.geomgraph.index.SegmentIntersector.getProperIntersectionPoint方法的典型用法代码示例。如果您正苦于以下问题:Java SegmentIntersector.getProperIntersectionPoint方法的具体用法?Java SegmentIntersector.getProperIntersectionPoint怎么用?Java SegmentIntersector.getProperIntersectionPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vividsolutions.jts.geomgraph.index.SegmentIntersector
的用法示例。
在下文中一共展示了SegmentIntersector.getProperIntersectionPoint方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isNodeConsistentArea
import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
/**
* Check all nodes to see if their labels are consistent with area topology.
*
* @return <code>true</code> if this area has a consistent node labelling
*/
public boolean isNodeConsistentArea() {
/**
* To fully check validity, it is necessary to
* compute ALL intersections, including self-intersections within a single edge.
*/
SegmentIntersector intersector = this.geomGraph.computeSelfNodes(this.li, true);
if (intersector.hasProperIntersection()) {
this.invalidPoint = intersector.getProperIntersectionPoint();
return false;
}
this.nodeGraph.build(this.geomGraph);
return this.isNodeEdgeAreaLabelsConsistent();
}
示例2: isSimpleLinearGeometry
import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
private boolean isSimpleLinearGeometry(Geometry geom) {
if (geom.isEmpty()) {
return true;
}
GeometryGraph graph = new GeometryGraph(0, geom);
LineIntersector li = new RobustLineIntersector();
SegmentIntersector si = graph.computeSelfNodes(li, true);
// if no self-intersection, must be simple
if (!si.hasIntersection()) {
return true;
}
if (si.hasProperIntersection()) {
this.nonSimpleLocation = si.getProperIntersectionPoint();
return false;
}
if (this.hasNonEndpointIntersection(graph)) {
return false;
}
if (this.isClosedEndpointsInInterior) {
if (this.hasClosedEndpointIntersection(graph)) {
return false;
}
}
return true;
}
示例3: isNodeConsistentArea
import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
/**
* Check all nodes to see if their labels are consistent with area topology.
*
* @return <code>true</code> if this area has a consistent node labelling
*/
public boolean isNodeConsistentArea() {
/**
* To fully check validity, it is necessary to
* compute ALL intersections, including self-intersections within a single edge.
*/
SegmentIntersector intersector = geomGraph.computeSelfNodes(li, true);
if (intersector.hasProperIntersection()) {
invalidPoint = intersector.getProperIntersectionPoint();
return false;
}
nodeGraph.build(geomGraph);
return isNodeEdgeAreaLabelsConsistent();
}
示例4: isSimpleLinearGeometry
import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
private boolean isSimpleLinearGeometry(Geometry geom) {
if (geom.isEmpty()) return true;
GeometryGraph graph = new GeometryGraph(0, geom);
LineIntersector li = new RobustLineIntersector();
SegmentIntersector si = graph.computeSelfNodes(li, true);
// if no self-intersection, must be simple
if (!si.hasIntersection()) return true;
if (si.hasProperIntersection()) {
nonSimpleLocation = si.getProperIntersectionPoint();
return false;
}
if (hasNonEndpointIntersection(graph)) return false;
if (isClosedEndpointsInInterior) {
if (hasClosedEndpointIntersection(graph)) return false;
}
return true;
}
示例5: isNodeConsistentArea
import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
/**
* Check all nodes to see if their labels are consistent with area topology.
*
* @return <code>true</code> if this area has a consistent node labelling
*/
public boolean isNodeConsistentArea()
{
/**
* To fully check validity, it is necessary to
* compute ALL intersections, including self-intersections within a single edge.
*/
SegmentIntersector intersector = geomGraph.computeSelfNodes(li, true);
if (intersector.hasProperIntersection()) {
invalidPoint = intersector.getProperIntersectionPoint();
return false;
}
nodeGraph.build(geomGraph);
return isNodeEdgeAreaLabelsConsistent();
}
示例6: isSimpleLinearGeometry
import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
private boolean isSimpleLinearGeometry(Geometry geom)
{
if (geom.isEmpty()) return true;
GeometryGraph graph = new GeometryGraph(0, geom);
LineIntersector li = new RobustLineIntersector();
SegmentIntersector si = graph.computeSelfNodes(li, true);
// if no self-intersection, must be simple
if (! si.hasIntersection()) return true;
if (si.hasProperIntersection()) {
nonSimpleLocation = si.getProperIntersectionPoint();
return false;
}
if (hasNonEndpointIntersection(graph)) return false;
if (isClosedEndpointsInInterior) {
if (hasClosedEndpointIntersection(graph)) return false;
}
return true;
}
示例7: fullClosedLine
import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
LineString fullClosedLine(List<LineString> lines) {
List<Coordinate> tail = new ArrayList<>();
boolean found;
do {
found = false;
for (int i = 0; i < lines.size(); i++) {
if (addToClosed(tail, lines.get(i))) {
lines.remove(i);
i--;
found = true;
}
}
} while (found);
LineString s = GeometryHelper.createLine(tail);
if (!s.isClosed()) {
throw new RuntimeException("Non-closed line starts from " + tail.get(0) + " ends to "
+ tail.get(tail.size() - 1));
}
if (!s.isSimple()) {
GeometryGraph graph = new GeometryGraph(0, s);
LineIntersector li = new RobustLineIntersector();
SegmentIntersector si = graph.computeSelfNodes(li, true);
if (si.hasProperInteriorIntersection()) {
throw new RuntimeException("Self-intersection for " + relation.getObjectCode()
+ " near point " + si.getProperIntersectionPoint());
}else {
throw new RuntimeException("Self-intersected line: " + s);
}
}
return s;
}