本文整理匯總了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;
}