Class GeometryLengthOp

java.lang.Object
nz.org.riskscape.engine.geo.GeometryLengthOp

public class GeometryLengthOp extends Object
  • Constructor Details

    • GeometryLengthOp

      public GeometryLengthOp(nz.org.riskscape.engine.SRIDSet sridSet)
    • GeometryLengthOp

      public GeometryLengthOp(nz.org.riskscape.engine.SRIDSet sridSet, ProjectGeometryOp projectionOp)
  • 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 of
      targetUnit - units to return the length in (e.g. kilometers)
      Returns:
      length of geometry