Class GeometryFixer.Base

java.lang.Object
nz.org.riskscape.engine.geo.GeometryFixer.Base
All Implemented Interfaces:
GeometryFixer
Enclosing interface:
GeometryFixer

public static class GeometryFixer.Base extends Object implements GeometryFixer

A base implementation. Package private to allow for test access.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface nz.org.riskscape.engine.geo.GeometryFixer

    GeometryFixer.Base
  • Field Summary

    Fields inherited from interface nz.org.riskscape.engine.geo.GeometryFixer

    DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Base(Function<org.locationtech.jts.geom.Geometry,org.locationtech.jts.geom.Geometry> fixer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.locationtech.jts.geom.Geometry
    fix(org.locationtech.jts.geom.Geometry geom)
    Attempt to fix geom (which ought to be invalid).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Base

      public Base(Function<org.locationtech.jts.geom.Geometry,org.locationtech.jts.geom.Geometry> fixer)
  • Method Details

    • fix

      public org.locationtech.jts.geom.Geometry fix(org.locationtech.jts.geom.Geometry geom)
      Description copied from interface: GeometryFixer

      Attempt to fix geom (which ought to be invalid).

      Specified by:
      fix in interface GeometryFixer
      Parameters:
      geom - geometry to fix
      Returns:
      a fixed version of geom if fixing was possible, else null