java.lang.Object
org.noise_planet.noisemodelling.pathfinder.utils.geometry.Densifier3D

public class Densifier3D extends Object
Densifies a Geometry by inserting extra vertices along the line segments contained in the geometry. All segments in the created densified geometry will be no longer than than the given distance tolerance. Densified polygonal geometries are guaranteed to be topologically correct. The coordinates created during densification respect the input geometry's PrecisionModel.

Note: At some future point this class will offer a variety of densification strategies.

Author:
Martin Davis
  • Constructor Summary

    Constructors
    Constructor
    Description
    Densifier3D(org.locationtech.jts.geom.Geometry inputGeom)
    Creates a new densifier instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.locationtech.jts.geom.Geometry
    densify(org.locationtech.jts.geom.Geometry geom, double distanceTolerance)
    Densifies a geometry using a given distance tolerance, and respecting the input geometry's PrecisionModel.
    org.locationtech.jts.geom.Geometry
    Gets the densified geometry.
    void
    setDistanceTolerance(double distanceTolerance)
    Sets the distance tolerance for the densification.

    Methods inherited from class java.lang.Object

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

    • Densifier3D

      public Densifier3D(org.locationtech.jts.geom.Geometry inputGeom)
      Creates a new densifier instance.
      Parameters:
      inputGeom -
  • Method Details

    • densify

      public static org.locationtech.jts.geom.Geometry densify(org.locationtech.jts.geom.Geometry geom, double distanceTolerance)
      Densifies a geometry using a given distance tolerance, and respecting the input geometry's PrecisionModel.
      Parameters:
      geom - the geometry to densify
      distanceTolerance - the distance tolerance to densify
      Returns:
      the densified geometry
    • setDistanceTolerance

      public void setDistanceTolerance(double distanceTolerance)
      Sets the distance tolerance for the densification. All line segments in the densified geometry will be no longer than the distance tolerance. simplified geometry will be within this distance of the original geometry. The distance tolerance must be positive.
      Parameters:
      distanceTolerance - the densification tolerance to use
    • getResultGeometry

      public org.locationtech.jts.geom.Geometry getResultGeometry()
      Gets the densified geometry.
      Returns:
      the densified geometry