当前位置: 首页>>代码示例>>Java>>正文


Java SegmentIntersector.getProperIntersectionPoint方法代码示例

本文整理汇总了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();
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:21,代码来源:ConsistentAreaTester.java

示例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;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:26,代码来源:IsSimpleOp.java

示例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();
}
 
开发者ID:Semantive,项目名称:jts,代码行数:21,代码来源:ConsistentAreaTester.java

示例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;
}
 
开发者ID:Semantive,项目名称:jts,代码行数:18,代码来源:IsSimpleOp.java

示例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();
}
 
开发者ID:GitHubDroid,项目名称:geodroid_master_update,代码行数:22,代码来源:ConsistentAreaTester.java

示例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;
}
 
开发者ID:GitHubDroid,项目名称:geodroid_master_update,代码行数:19,代码来源:IsSimpleOp.java

示例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;
}
 
开发者ID:alex73,项目名称:OSMemory,代码行数:34,代码来源:ExtendedRelation.java


注:本文中的com.vividsolutions.jts.geomgraph.index.SegmentIntersector.getProperIntersectionPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。