java.lang.Object
org.noise_planet.noisemodelling.pathfinder.profilebuilder.CutProfile

public class CutProfile extends Object
  • Field Details

    • cutPoints

      public ArrayList<CutPoint> cutPoints
      List of cut points. First point is source, last point is receiver
    • hasBuildingIntersection

      public boolean hasBuildingIntersection
      True if Source-Receiver linestring is below building intersection, only used at the generation of the profile to skip searching for lateral cut planes
    • hasTopographyIntersection

      public boolean hasTopographyIntersection
      True if Source-Receiver linestring is below topography cutting point., only used at the generation of the profile to skip searching for lateral cut planes
    • curvedPath

      public boolean curvedPath
      True if the path between source and receiver is curved, the coordinates are the original, only the cutting planes for left and right are not the same
    • profileType

      public CutProfile.PROFILE_TYPE profileType
  • Constructor Details

    • CutProfile

      public CutProfile()
      Empty constructor for deserialization
    • CutProfile

      public CutProfile(CutPointSource source, CutPointReceiver receiver)
  • Method Details

    • getProfileType

      public CutProfile.PROFILE_TYPE getProfileType()
      Returns:
      Cut Profile type
    • setProfileType

      public void setProfileType(CutProfile.PROFILE_TYPE profileType)
      Parameters:
      profileType - The cut profile type
    • setCurvedPath

      public void setCurvedPath(boolean curvedPath)
      Parameters:
      curvedPath - True if the path between source and receiver is curved, the coordinates are the original, only the cutting planes for left and right are not the same
    • isCurvedPath

      public boolean isCurvedPath()
      Returns:
      True if the path between source and receiver is curved
    • getCutPoints

      public ArrayList<CutPoint> getCutPoints()
      Returns:
      the cutPoints
    • insertCutPoint

      public void insertCutPoint(boolean sortBySourcePosition, CutPoint... cutPointsToInsert)
      Insert and sort cut points,
      Parameters:
      sortBySourcePosition - After inserting points, sort the by the distance from the source
      cutPointsToInsert -
    • sort

      public void sort(org.locationtech.jts.geom.Coordinate c0)
      Sort the CutPoints by distance with c0
    • getGPath

      public double getGPath(CutPoint p0, CutPoint p1, double buildingRoofG)
      compute the path between two points
      Parameters:
      p0 -
      p1 -
      Returns:
      the absorption coefficient of this path
    • getGPath

      public double getGPath()
    • getGPathByIndex

      public double getGPathByIndex(int i0, int i1, double buildingRoofG)
      Compute the G coefficient for path segment using indices instead of CutPoint references. This avoids indexOf() calls that fail when using transformed CutPoints.
      Parameters:
      i0 - Index of first CutPoint in segment
      i1 - Index of last CutPoint in segment
      buildingRoofG - Ground absorption coefficient for building roofs
      Returns:
      Weighted average of ground absorption coefficients along the segment
    • isFreeField

      public boolean isFreeField()
      Returns:
    • hasCloseReflectionBeforeReceiver

      public boolean hasCloseReflectionBeforeReceiver(double maximumReceiverWallDistance)
      Parameters:
      maximumReceiverWallDistance - Maximum horizontal receiver-to-wall distance in meters
      Returns:
      True if this reflection profile contains a last reflection before the receiver and the receiver is closer than the provided distance to that reflective wall, even if other events occur afterwards
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • computePts2DGround

      public List<org.locationtech.jts.geom.Coordinate> computePts2DGround()
      From the vertical plane cut, extract only the top elevation points (buildings/walls top or ground if no buildings) then re-project it into a 2d coordinate system. The first point is always x=0.
      Returns:
      the computed 2D coordinate list of DEM
    • computePts2D

      public List<org.locationtech.jts.geom.Coordinate> computePts2D(boolean curvedPath)
      Returns:
      @return the computed coordinate list
    • computePts2D

      public List<org.locationtech.jts.geom.Coordinate> computePts2D(boolean curvedPath, List<CutPoint> transformedCutPointsOut)
      Compute 2D coordinates, optionally applying curved transformation
      Parameters:
      curvedPath - Whether to apply curved transformation
      transformedCutPointsOut - If not null and curvedPath is true, will be populated with transformed CutPoints
      Returns:
      The computed 2D coordinate list
    • computePts2D

      public List<org.locationtech.jts.geom.Coordinate> computePts2D()
      Returns:
      @return the computed coordinate list
    • getConvexHullIndices

      public List<Integer> getConvexHullIndices(List<org.locationtech.jts.geom.Coordinate> coordinates2d)
    • getConvexHullIndices

      public List<Integer> getConvexHullIndices(List<org.locationtech.jts.geom.Coordinate> coordinates2d, boolean ignoreWall)
    • computePts2DGround

      public List<org.locationtech.jts.geom.Coordinate> computePts2DGround(List<Integer> index)
      From the vertical plane cut, extract only the top elevation points (buildings/walls top or ground if no buildings) then re-project it into a 2d coordinate system. The first point is always x=0.
      Parameters:
      index - Corresponding index from parameter to return list items
      Returns:
      the computed 2D coordinate list of DEM
    • computePtsGround

      public static List<org.locationtech.jts.geom.Coordinate> computePtsGround(List<CutPoint> pts, List<Integer> index)
      From the vertical plane cut, extract only the top elevation points (buildings/walls top or ground if no buildings)
      Parameters:
      pts - Cut points
      index - Corresponding index from parameter to return list items
      Returns:
      the computed coordinate list of the vertical cut
    • computePts2DGround

      public static List<org.locationtech.jts.geom.Coordinate> computePts2DGround(List<CutPoint> pts, double tolerance, List<Integer> index)
      From the vertical plane cut, extract only the top elevation points (buildings/walls top or ground if no buildings) then re-project it into a 2d coordinate system. The first point is always x=0.
      Parameters:
      pts - Cut points
      tolerance - Simplify the point list by not adding points where the distance from the line segments formed from the previous and the next point is inferior to this tolerance (remove intermediate collinear points)
      index - Corresponding index from parameter to return list items
      Returns:
      the computed 2D coordinate list of DEM
    • computePts2DGround

      public List<org.locationtech.jts.geom.Coordinate> computePts2DGround(double tolerance, List<Integer> index)
      From the vertical plane cut, extract only the top elevation points (buildings/walls top or ground if no buildings) then re-project it into a 2d coordinate system. The first point is always x=0.
      Parameters:
      tolerance - Simplify the point list by not adding points where the distance from the line segments formed from the previous and the next point is inferior to this tolerance (remove intermediate collinear points)
      index - Corresponding index from parameter to return list items
      Returns:
      the computed 2D coordinate list of DEM
    • getSource

      public CutPointSource getSource()
    • getReceiver

      public CutPointReceiver getReceiver()