org.locationtech.jts.triangulate.quadedge.QuadEdgeSubdivision.getPrimaryEdges()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(52)

本文整理了Java中org.locationtech.jts.triangulate.quadedge.QuadEdgeSubdivision.getPrimaryEdges方法的一些代码示例,展示了QuadEdgeSubdivision.getPrimaryEdges的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuadEdgeSubdivision.getPrimaryEdges方法的具体详情如下:
包路径:org.locationtech.jts.triangulate.quadedge.QuadEdgeSubdivision
类名称:QuadEdgeSubdivision
方法名:getPrimaryEdges

QuadEdgeSubdivision.getPrimaryEdges介绍

[英]Gets all primary quadedges in the subdivision. A primary edge is a QuadEdgewhich occupies the 0'th position in its array of associated quadedges. These provide the unique geometric edges of the triangulation.
[中]获取细分中的所有主四边形边。主边是一个四边形,它在其关联四边形数组中占据第0位。它们提供了三角剖分的唯一几何边。

代码示例

代码示例来源:origin: graphhopper/graphhopper

@SuppressWarnings("unchecked") // JTS is not generified
private Collection<QuadEdge> getPrimaryEdges() {
  return (Collection<QuadEdge>) triangulation.getPrimaryEdges(true);
}

代码示例来源:origin: graphhopper/graphhopper

response.polygons.add(feature);
for (QuadEdge edge : (Collection<QuadEdge>) tin.getPrimaryEdges(false)) {
  JsonFeature feature = new JsonFeature();
  feature.setGeometry(edge.toLineSegment().toGeometry(geometryFactory));

代码示例来源:origin: com.graphhopper/graphhopper-isochrone

@SuppressWarnings("unchecked") // JTS is not generified
private Collection<QuadEdge> getPrimaryEdges() {
  return (Collection<QuadEdge>) triangulation.getPrimaryEdges(true);
}

代码示例来源:origin: locationtech/jts

/**
 * Gets the geometry for the edges in the subdivision as a {@link MultiLineString}
 * containing 2-point lines.
 * 
 * @param geomFact the GeometryFactory to use
 * @return a MultiLineString
 */
public Geometry getEdges(GeometryFactory geomFact) {
  List quadEdges = getPrimaryEdges(false);
  LineString[] edges = new LineString[quadEdges.size()];
  int i = 0;
  for (Iterator it = quadEdges.iterator(); it.hasNext();) {
    QuadEdge qe = (QuadEdge) it.next();
    edges[i++] = geomFact.createLineString(new Coordinate[] {
        qe.orig().getCoordinate(), qe.dest().getCoordinate() });
  }
  return geomFact.createMultiLineString(edges);
}

相关文章