use of com.revolsys.elevation.tin.quadedge.QuadEdgeDelaunayTinBuilder in project com.revolsys.open by revolsys.
the class TriangulationFunctions method delaunayEdges.
public static Lineal delaunayEdges(final Geometry geom) {
GeometryFactory geometryFactory = geom.getGeometryFactory();
geometryFactory = geometryFactory.convertScales(0, 0, 0);
final QuadEdgeDelaunayTinBuilder builder = new QuadEdgeDelaunayTinBuilder(geometryFactory);
builder.insertVertices(geom);
final Lineal edges = builder.getEdges();
return edges;
}
use of com.revolsys.elevation.tin.quadedge.QuadEdgeDelaunayTinBuilder in project com.revolsys.open by revolsys.
the class TriangulationFunctions method delaunayEdgesWithTolerance.
public static Geometry delaunayEdgesWithTolerance(final Geometry geom, final double tolerance) {
GeometryFactory geometryFactory = geom.getGeometryFactory();
geometryFactory = geometryFactory.convertScales(tolerance, tolerance, tolerance);
final QuadEdgeDelaunayTinBuilder builder = new QuadEdgeDelaunayTinBuilder(geometryFactory);
builder.insertVertices(geom);
final Lineal edges = builder.getEdges();
return edges;
}
use of com.revolsys.elevation.tin.quadedge.QuadEdgeDelaunayTinBuilder in project com.revolsys.open by revolsys.
the class TriangulationFunctions method delaunayTrianglesWithTolerance.
public static Polygonal delaunayTrianglesWithTolerance(final Geometry geom, final double tolerance) {
GeometryFactory geometryFactory = geom.getGeometryFactory();
geometryFactory = geometryFactory.convertScales(tolerance, tolerance, tolerance);
final QuadEdgeDelaunayTinBuilder builder = new QuadEdgeDelaunayTinBuilder(geometryFactory);
builder.insertVertices(geom);
final Polygonal triangles = builder.getTrianglesPolygonal();
return triangles;
}
use of com.revolsys.elevation.tin.quadedge.QuadEdgeDelaunayTinBuilder in project com.revolsys.open by revolsys.
the class PointCloud method newTriangulatedIrregularNetwork.
default TriangulatedIrregularNetwork newTriangulatedIrregularNetwork(final Predicate<? super Point> filter) {
final GeometryFactory geometryFactory = getGeometryFactory();
final QuadEdgeDelaunayTinBuilder tinBuilder = new QuadEdgeDelaunayTinBuilder(geometryFactory);
forEachPoint((point) -> {
if (filter.test(point)) {
tinBuilder.insertVertex(point);
}
});
final TriangulatedIrregularNetwork tin = tinBuilder.newTriangulatedIrregularNetwork();
return tin;
}
use of com.revolsys.elevation.tin.quadedge.QuadEdgeDelaunayTinBuilder in project com.revolsys.open by revolsys.
the class LasPointCloud method newTriangulatedIrregularNetwork.
@Override
public TriangulatedIrregularNetwork newTriangulatedIrregularNetwork() {
final GeometryFactory geometryFactory = getGeometryFactory();
final QuadEdgeDelaunayTinBuilder tinBuilder = new QuadEdgeDelaunayTinBuilder(geometryFactory);
forEachPoint((lasPoint) -> {
tinBuilder.insertVertex(lasPoint);
});
final TriangulatedIrregularNetwork tin = tinBuilder.newTriangulatedIrregularNetwork();
return tin;
}
Aggregations