Package nz.org.riskscape.engine.geo
Class GeometryLengthOp
java.lang.Object
nz.org.riskscape.engine.geo.GeometryLengthOp
-
Constructor Summary
ConstructorDescriptionGeometryLengthOp
(nz.org.riskscape.engine.SRIDSet sridSet) GeometryLengthOp
(nz.org.riskscape.engine.SRIDSet sridSet, ProjectGeometryOp projectionOp) -
Method Summary
Modifier and TypeMethodDescriptiondouble
apply
(org.locationtech.jts.geom.Geometry geometry, javax.measure.Unit<javax.measure.quantity.Length> targetUnit) Calculates the length of geometry in targetUnit.
-
Constructor Details
-
GeometryLengthOp
public GeometryLengthOp(nz.org.riskscape.engine.SRIDSet sridSet) -
GeometryLengthOp
-
-
Method Details
-
apply
public double apply(org.locationtech.jts.geom.Geometry geometry, javax.measure.Unit<javax.measure.quantity.Length> targetUnit) Calculates the length of geometry in targetUnit.
This method will re-project geometry if that is deemed necessary.
- Parameters:
geometry
- to calculate length oftargetUnit
- units to return the length in (e.g. kilometers)- Returns:
- length of geometry
-