Package nz.org.riskscape.defaults.geo
Class CutGeometryByGridOp
java.lang.Object
nz.org.riskscape.defaults.geo.CutGeometryByGridOp
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCutGeometryByGridOp(nz.org.riskscape.engine.SRIDSet sridSet) CutGeometryByGridOp(nz.org.riskscape.engine.SRIDSet sridSet, EnumSet<CutGeometryByGridOp.Options> options) -
Method Summary
Modifier and TypeMethodDescriptionList<org.locationtech.jts.geom.Geometry>apply(org.locationtech.jts.geom.Geometry geometry, double gridDistance) Cut the geometry up into a grid with mesh size of gridDistance.List<org.locationtech.jts.geom.Geometry>apply(org.locationtech.jts.geom.Geometry geometry, double gridDistance, org.locationtech.jts.geom.Point origin) Cut the geometry up into a grid with mesh size of gridDistance.
-
Field Details
-
DEFAULT_OPTIONS
-
-
Constructor Details
-
CutGeometryByGridOp
public CutGeometryByGridOp(nz.org.riskscape.engine.SRIDSet sridSet) -
CutGeometryByGridOp
public CutGeometryByGridOp(nz.org.riskscape.engine.SRIDSet sridSet, EnumSet<CutGeometryByGridOp.Options> options)
-
-
Method Details
-
apply
public List<org.locationtech.jts.geom.Geometry> apply(org.locationtech.jts.geom.Geometry geometry, double gridDistance) Cut the geometry up into a grid with mesh size of gridDistance. The grid is centred on the geometry being cut which should reduce the number of pieces it is cut into.
- Parameters:
geometry- the geometry to cut upgridDistance- the grid size- Returns:
- list of new geometries that have been cut to the grid
-
apply
public List<org.locationtech.jts.geom.Geometry> apply(org.locationtech.jts.geom.Geometry geometry, double gridDistance, org.locationtech.jts.geom.Point origin) Cut the geometry up into a grid with mesh size of gridDistance.
The grid is formed from the origin. The advantage of this is that many geometries can be cut to the same grid.
- Parameters:
geometry- the geometry to cut upgridDistance- the grid sizeorigin- the point to align the segmenting relative to- Returns:
- list of new geometries that have been cut to the grid
-