本文整理汇总了Java中com.vividsolutions.jts.geom.LineString.intersects方法的典型用法代码示例。如果您正苦于以下问题:Java LineString.intersects方法的具体用法?Java LineString.intersects怎么用?Java LineString.intersects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vividsolutions.jts.geom.LineString
的用法示例。
在下文中一共展示了LineString.intersects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isEdgesMatched
import com.vividsolutions.jts.geom.LineString; //导入方法依赖的package包/类
private boolean isEdgesMatched(int edgeId, RoutingProfile rp4tmc, int newEdgeId, RoutingProfile rp4routing){
// check the validity of the edge
//boolean flag1 = rp4tmc.getGraphhopper().getGraphHopperStorage().isValidEdge(edgeId);
//boolean flag2 = rp4routing.getGraphhopper().getGraphHopperStorage().isValidEdge(newEdgeId); // Runge: it has been commented out as the meaning of this check is not entirely clear
if (EdgeIterator.Edge.isValid(edgeId) && EdgeIterator.Edge.isValid(newEdgeId)){
LineString edge_geom = (LineString) rp4tmc.getEdgeGeometry(edgeId, 3, Integer.MIN_VALUE);
LineString new_edge_geom = (LineString) rp4routing.getEdgeGeometry(newEdgeId, 3, Integer.MIN_VALUE);
if (edge_geom.intersects(new_edge_geom)){
return true;
}
}
return false;
}