Package nz.org.riskscape.engine.geo
Class RecursiveQuadGridOp
java.lang.Object
nz.org.riskscape.engine.geo.RecursiveQuadGridOp
Alternative to CutGeometryByGridOp that builds a list of geometries that are intersected at a given grid size by breaking a feature up recursively in order to 'throw away' as many useless large areas as possible in order to cut down on the number of intersections required. This capitalizes on the fact that most shapes are featureless except for on their boundary.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
All the bits and pieces involved in the recursive quadding, plus ways of accessing it -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<? extends org.locationtech.jts.geom.Geometry>
apply
(org.locationtech.jts.geom.Geometry originalGeom, double gridSize) List<? extends org.locationtech.jts.geom.Geometry>
apply
(org.locationtech.jts.geom.Geometry originalGeom, double gridSize, org.locationtech.jts.geom.Coordinate alignTo) List<? extends org.locationtech.jts.geom.Geometry>
apply
(org.locationtech.jts.geom.Geometry originalGeom, double gridSize, org.locationtech.jts.geom.Point alignTo) applyDetailed
(org.locationtech.jts.geom.Geometry originalGeom, double gridSize) applyDetailed
(org.locationtech.jts.geom.Geometry originalGeom, double gridSize, org.locationtech.jts.geom.Coordinate alignTo) Compute the intersection of a grid of the given size with the given geometry, aligning the grid to the given coordinatestatic org.locationtech.jts.geom.LinearRing
envelopeToRing
(org.locationtech.jts.geom.GeometryFactory factory, org.locationtech.jts.geom.Envelope envelope)
-
Constructor Details
-
RecursiveQuadGridOp
public RecursiveQuadGridOp()
-
-
Method Details
-
apply
public List<? extends org.locationtech.jts.geom.Geometry> apply(org.locationtech.jts.geom.Geometry originalGeom, double gridSize) -
apply
public List<? extends org.locationtech.jts.geom.Geometry> apply(org.locationtech.jts.geom.Geometry originalGeom, double gridSize, org.locationtech.jts.geom.Point alignTo) -
apply
public List<? extends org.locationtech.jts.geom.Geometry> apply(org.locationtech.jts.geom.Geometry originalGeom, double gridSize, org.locationtech.jts.geom.Coordinate alignTo) -
applyDetailed
public RecursiveQuadGridOp.Result applyDetailed(org.locationtech.jts.geom.Geometry originalGeom, double gridSize) -
applyDetailed
public RecursiveQuadGridOp.Result applyDetailed(org.locationtech.jts.geom.Geometry originalGeom, double gridSize, org.locationtech.jts.geom.Coordinate alignTo) Compute the intersection of a grid of the given size with the given geometry, aligning the grid to the given coordinate
-
envelopeToRing
public static org.locationtech.jts.geom.LinearRing envelopeToRing(org.locationtech.jts.geom.GeometryFactory factory, org.locationtech.jts.geom.Envelope envelope) - Returns:
- a LinearRing that represents the square defined by the given envelope
-