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


Java SegmentIntersector.hasProperIntersection方法代码示例

本文整理汇总了Java中com.vividsolutions.jts.geomgraph.index.SegmentIntersector.hasProperIntersection方法的典型用法代码示例。如果您正苦于以下问题:Java SegmentIntersector.hasProperIntersection方法的具体用法?Java SegmentIntersector.hasProperIntersection怎么用?Java SegmentIntersector.hasProperIntersection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vividsolutions.jts.geomgraph.index.SegmentIntersector的用法示例。


在下文中一共展示了SegmentIntersector.hasProperIntersection方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: computeProperIntersectionIM

import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
private void computeProperIntersectionIM(SegmentIntersector intersector, IntersectionMatrix im) {
    // If a proper intersection is found, we can set a lower bound on the IM.
    int dimA = this.arg[0].getGeometry().getDimension();
    int dimB = this.arg[1].getGeometry().getDimension();
    boolean hasProper = intersector.hasProperIntersection();
    boolean hasProperInterior = intersector.hasProperInteriorIntersection();

    // For Geometry's of dim 0 there can never be proper intersections.

    /**
     * If edge segments of Areas properly intersect, the areas must properly overlap.
     */
    if (dimA == 2 && dimB == 2) {
        if (hasProper) {
            im.setAtLeast("212101212");
        }
    }
    /**
     * If an Line segment properly intersects an edge segment of an Area,
     * it follows that the Interior of the Line intersects the Boundary of the Area.
     * If the intersection is a proper <i>interior</i> intersection, then
     * there is an Interior-Interior intersection too.
     * Note that it does not follow that the Interior of the Line intersects the Exterior
     * of the Area, since there may be another Area component which contains the rest of the Line.
     */
    else if (dimA == 2 && dimB == 1) {
        if (hasProper) {
            im.setAtLeast("FFF0FFFF2");
        }
        if (hasProperInterior) {
            im.setAtLeast("1FFFFF1FF");
        }
    } else if (dimA == 1 && dimB == 2) {
        if (hasProper) {
            im.setAtLeast("F0FFFFFF2");
        }
        if (hasProperInterior) {
            im.setAtLeast("1F1FFFFFF");
        }
    }
/* If edges of LineStrings properly intersect *in an interior point*, all
    we can deduce is that
    the interiors intersect.  (We can NOT deduce that the exteriors intersect,
    since some other segments in the geometries might cover the points in the
    neighbourhood of the intersection.)
    It is important that the point be known to be an interior point of
    both Geometries, since it is possible in a self-intersecting geometry to
    have a proper intersection on one segment that is also a boundary point of another segment.
*/
    else if (dimA == 1 && dimB == 1) {
        if (hasProperInterior) {
            im.setAtLeast("0FFFFFFFF");
        }
    }
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:56,代码来源:RelateComputer.java

示例8: computeProperIntersectionIM

import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
private void computeProperIntersectionIM(SegmentIntersector intersector, IntersectionMatrix im) {
    // If a proper intersection is found, we can set a lower bound on the IM.
    int dimA = arg[0].getGeometry().getDimension();
    int dimB = arg[1].getGeometry().getDimension();
    boolean hasProper = intersector.hasProperIntersection();
    boolean hasProperInterior = intersector.hasProperInteriorIntersection();

    // For Geometry's of dim 0 there can never be proper intersections.

    /**
     * If edge segments of Areas properly intersect, the areas must properly overlap.
     */
    if (dimA == 2 && dimB == 2) {
        if (hasProper) im.setAtLeast("212101212");
    }
    /**
     * If an Line segment properly intersects an edge segment of an Area,
     * it follows that the Interior of the Line intersects the Boundary of the Area.
     * If the intersection is a proper <i>interior</i> intersection, then
     * there is an Interior-Interior intersection too.
     * Note that it does not follow that the Interior of the Line intersects the Exterior
     * of the Area, since there may be another Area component which contains the rest of the Line.
     */
    else if (dimA == 2 && dimB == 1) {
        if (hasProper) im.setAtLeast("FFF0FFFF2");
        if (hasProperInterior) im.setAtLeast("1FFFFF1FF");
    } else if (dimA == 1 && dimB == 2) {
        if (hasProper) im.setAtLeast("F0FFFFFF2");
        if (hasProperInterior) im.setAtLeast("1F1FFFFFF");
    }
/* If edges of LineStrings properly intersect *in an interior point*, all
    we can deduce is that
    the interiors intersect.  (We can NOT deduce that the exteriors intersect,
    since some other segments in the geometries might cover the points in the
    neighbourhood of the intersection.)
    It is important that the point be known to be an interior point of
    both Geometries, since it is possible in a self-intersecting geometry to
    have a proper intersection on one segment that is also a boundary point of another segment.
*/
    else if (dimA == 1 && dimB == 1) {
        if (hasProperInterior) im.setAtLeast("0FFFFFFFF");
    }
}
 
开发者ID:Semantive,项目名称:jts,代码行数:44,代码来源:RelateComputer.java

示例9: computeProperIntersectionIM

import com.vividsolutions.jts.geomgraph.index.SegmentIntersector; //导入方法依赖的package包/类
private void computeProperIntersectionIM(SegmentIntersector intersector, IntersectionMatrix im)
{
  // If a proper intersection is found, we can set a lower bound on the IM.
  int dimA = arg[0].getGeometry().getDimension();
  int dimB = arg[1].getGeometry().getDimension();
  boolean hasProper         = intersector.hasProperIntersection();
  boolean hasProperInterior = intersector.hasProperInteriorIntersection();

    // For Geometry's of dim 0 there can never be proper intersections.

    /**
     * If edge segments of Areas properly intersect, the areas must properly overlap.
     */
  if (dimA == 2 && dimB == 2) {
    if (hasProper) im.setAtLeast("212101212");
  }
    /**
     * If an Line segment properly intersects an edge segment of an Area,
     * it follows that the Interior of the Line intersects the Boundary of the Area.
     * If the intersection is a proper <i>interior</i> intersection, then
     * there is an Interior-Interior intersection too.
     * Note that it does not follow that the Interior of the Line intersects the Exterior
     * of the Area, since there may be another Area component which contains the rest of the Line.
     */
  else if (dimA == 2 && dimB == 1) {
    if (hasProper)          im.setAtLeast("FFF0FFFF2");
    if (hasProperInterior)  im.setAtLeast("1FFFFF1FF");
  }
  else if (dimA == 1 && dimB == 2) {
    if (hasProper)          im.setAtLeast("F0FFFFFF2");
    if (hasProperInterior)  im.setAtLeast("1F1FFFFFF");
  }
  /* If edges of LineStrings properly intersect *in an interior point*, all
      we can deduce is that
      the interiors intersect.  (We can NOT deduce that the exteriors intersect,
      since some other segments in the geometries might cover the points in the
      neighbourhood of the intersection.)
      It is important that the point be known to be an interior point of
      both Geometries, since it is possible in a self-intersecting geometry to
      have a proper intersection on one segment that is also a boundary point of another segment.
  */
  else if (dimA == 1 && dimB == 1) {
    if (hasProperInterior)    im.setAtLeast("0FFFFFFFF");
  }
}
 
开发者ID:GitHubDroid,项目名称:geodroid_master_update,代码行数:46,代码来源:RelateComputer.java


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