Class LinearGeometryProjection

java.lang.Object
nz.org.riskscape.engine.projection.LinearGeometryProjection
All Implemented Interfaces:
nz.org.riskscape.engine.projection.Projection

public class LinearGeometryProjection extends Object implements nz.org.riskscape.engine.projection.Projection

Projector that prevents CurvedGeometry from entering RiskScape.

If a CurvedGeometry is encountered then: - an InvalidTupleException will be thrown if tolerance is empty - or the geometry will be linearized by calling CurvedGeometry.linearize(double)

  • Field Details

  • Constructor Details

    • LinearGeometryProjection

      public LinearGeometryProjection(Optional<Double> tolerance)

      Creates a new LinearGeometryProjection instance.

      Parameters:
      tolerance - Tolerance to use when linearizing CurvedGeometry.

      If this value is empty then any CurvedGeometry encountered will result in an InvalidTupleException being thrown.

  • Method Details

    • getProjectionFunction

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.projection.Projector> getProjectionFunction(nz.org.riskscape.engine.types.Struct sourceType)
      Specified by:
      getProjectionFunction in interface nz.org.riskscape.engine.projection.Projection