本文整理了Java中com.vividsolutions.jts.triangulate.quadedge.QuadEdgeSubdivision.visitTriangles
方法的一些代码示例,展示了QuadEdgeSubdivision.visitTriangles
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuadEdgeSubdivision.visitTriangles
方法的具体详情如下:
包路径:com.vividsolutions.jts.triangulate.quadedge.QuadEdgeSubdivision
类名称:QuadEdgeSubdivision
方法名:visitTriangles
[英]Visitors
[中]访客
代码示例来源:origin: com.vividsolutions/jts
/**
* Gets the coordinates for each triangle in the subdivision as an array.
*
* @param includeFrame
* true if the frame triangles should be included
* @return a list of Coordinate[4] representing each triangle
*/
public List getTriangleCoordinates(boolean includeFrame) {
TriangleCoordinatesVisitor visitor = new TriangleCoordinatesVisitor();
visitTriangles(visitor, includeFrame);
return visitor.getTriangles();
}
代码示例来源:origin: com.vividsolutions/jts
/**
* Gets a list of the triangles
* in the subdivision, specified as
* an array of the primary quadedges around the triangle.
*
* @param includeFrame
* true if the frame triangles should be included
* @return a List of QuadEdge[3] arrays
*/
public List getTriangleEdges(boolean includeFrame) {
TriangleEdgesListVisitor visitor = new TriangleEdgesListVisitor();
visitTriangles(visitor, includeFrame);
return visitor.getTriangleEdges();
}
代码示例来源:origin: com.vividsolutions/jts
/**
* Gets a list of the triangles in the subdivision,
* specified as an array of the triangle {@link Vertex}es.
*
* @param includeFrame
* true if the frame triangles should be included
* @return a List of Vertex[3] arrays
*/
public List getTriangleVertices(boolean includeFrame) {
TriangleVertexListVisitor visitor = new TriangleVertexListVisitor();
visitTriangles(visitor, includeFrame);
return visitor.getTriangleVertices();
}
代码示例来源:origin: com.vividsolutions/jts
/**
* Creates {@link QuadEdgeTriangle}s for all facets of a
* {@link QuadEdgeSubdivision} representing a triangulation.
* The <tt>data</tt> attributes of the {@link QuadEdge}s in the subdivision
* will be set to point to the triangle which contains that edge.
* This allows tracing the neighbour triangles of any given triangle.
*
* @param subdiv
* the QuadEdgeSubdivision to create the triangles on.
* @return a List of the created QuadEdgeTriangles
*/
public static List createOn(QuadEdgeSubdivision subdiv)
{
QuadEdgeTriangleBuilderVisitor visitor = new QuadEdgeTriangleBuilderVisitor();
subdiv.visitTriangles(visitor, false);
return visitor.getTriangles();
}
代码示例来源:origin: com.vividsolutions/jts
/**
* Gets a List of {@link Polygon}s for the Voronoi cells
* of this triangulation.
* <p>
* The userData of each polygon is set to be the {@link Coordinate}
* of the cell site. This allows easily associating external
* data associated with the sites to the cells.
*
* @param geomFact a geometry factory
* @return a List of Polygons
*/
public List getVoronoiCellPolygons(GeometryFactory geomFact)
{
/*
* Compute circumcentres of triangles as vertices for dual edges.
* Precomputing the circumcentres is more efficient,
* and more importantly ensures that the computed centres
* are consistent across the Voronoi cells.
*/
visitTriangles(new TriangleCircumcentreVisitor(), true);
List cells = new ArrayList();
Collection edges = getVertexUniqueEdges(false);
for (Iterator i = edges.iterator(); i.hasNext(); ) {
QuadEdge qe = (QuadEdge) i.next();
cells.add(getVoronoiCellPolygon(qe, geomFact));
}
return cells;
}
代码示例来源:origin: com.vividsolutions/jts-core
/**
* Gets a list of the triangles in the subdivision,
* specified as an array of the triangle {@link Vertex}es.
*
* @param includeFrame
* true if the frame triangles should be included
* @return a List of Vertex[3] arrays
*/
public List getTriangleVertices(boolean includeFrame) {
TriangleVertexListVisitor visitor = new TriangleVertexListVisitor();
visitTriangles(visitor, includeFrame);
return visitor.getTriangleVertices();
}
代码示例来源:origin: com.vividsolutions/jts-core
/**
* Gets the coordinates for each triangle in the subdivision as an array.
*
* @param includeFrame
* true if the frame triangles should be included
* @return a list of Coordinate[4] representing each triangle
*/
public List getTriangleCoordinates(boolean includeFrame) {
TriangleCoordinatesVisitor visitor = new TriangleCoordinatesVisitor();
visitTriangles(visitor, includeFrame);
return visitor.getTriangles();
}
代码示例来源:origin: com.vividsolutions/jts-core
/**
* Gets a list of the triangles
* in the subdivision, specified as
* an array of the primary quadedges around the triangle.
*
* @param includeFrame
* true if the frame triangles should be included
* @return a List of QuadEdge[3] arrays
*/
public List getTriangleEdges(boolean includeFrame) {
TriangleEdgesListVisitor visitor = new TriangleEdgesListVisitor();
visitTriangles(visitor, includeFrame);
return visitor.getTriangleEdges();
}
代码示例来源:origin: com.vividsolutions/jts-core
/**
* Creates {@link QuadEdgeTriangle}s for all facets of a
* {@link QuadEdgeSubdivision} representing a triangulation.
* The <tt>data</tt> attributes of the {@link QuadEdge}s in the subdivision
* will be set to point to the triangle which contains that edge.
* This allows tracing the neighbour triangles of any given triangle.
*
* @param subdiv
* the QuadEdgeSubdivision to create the triangles on.
* @return a List of the created QuadEdgeTriangles
*/
public static List createOn(QuadEdgeSubdivision subdiv)
{
QuadEdgeTriangleBuilderVisitor visitor = new QuadEdgeTriangleBuilderVisitor();
subdiv.visitTriangles(visitor, false);
return visitor.getTriangles();
}
代码示例来源:origin: com.vividsolutions/jts-core
/**
* Gets a List of {@link Polygon}s for the Voronoi cells
* of this triangulation.
* <p>
* The userData of each polygon is set to be the {@link Coordinate}
* of the cell site. This allows easily associating external
* data associated with the sites to the cells.
*
* @param geomFact a geometry factory
* @return a List of Polygons
*/
public List getVoronoiCellPolygons(GeometryFactory geomFact)
{
/*
* Compute circumcentres of triangles as vertices for dual edges.
* Precomputing the circumcentres is more efficient,
* and more importantly ensures that the computed centres
* are consistent across the Voronoi cells.
*/
visitTriangles(new TriangleCircumcentreVisitor(), true);
List cells = new ArrayList();
Collection edges = getVertexUniqueEdges(false);
for (Iterator i = edges.iterator(); i.hasNext(); ) {
QuadEdge qe = (QuadEdge) i.next();
cells.add(getVoronoiCellPolygon(qe, geomFact));
}
return cells;
}
代码示例来源:origin: org.orbisgis/h2gis-functions
subdivision.visitTriangles(new TriangleVisitorCircumCenter(circumcenter), false);
return geomCollection.getFactory().createMultiPoint(circumcenter.toArray(new Coordinate[circumcenter.size()]));
代码示例来源:origin: org.orbisgis/h2gis
subdivision.visitTriangles(new TriangleVisitorCircumCenter(circumcenter), false);
return geomCollection.getFactory().createMultiPoint(circumcenter.toArray(new Coordinate[circumcenter.size()]));
内容来源于网络,如有侵权,请联系作者删除!