Class CutProfile
java.lang.Object
org.noise_planet.noisemodelling.pathfinder.profilebuilder.CutProfile
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumProfile type from source to receiver Left and Right are a path using the convex hull on the intersection plane with buildings -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanTrue 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 sameList of cut points.booleanTrue if Source-Receiver linestring is below building intersection, only used at the generation of the profile to skip searching for lateral cut planesbooleanTrue if Source-Receiver linestring is below topography cutting point., only used at the generation of the profile to skip searching for lateral cut planes -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for deserializationCutProfile(CutPointSource source, CutPointReceiver receiver) -
Method Summary
Modifier and TypeMethodDescriptionList<org.locationtech.jts.geom.Coordinate> List<org.locationtech.jts.geom.Coordinate> computePts2D(boolean curvedPath) List<org.locationtech.jts.geom.Coordinate> computePts2D(boolean curvedPath, List<CutPoint> transformedCutPointsOut) Compute 2D coordinates, optionally applying curved transformationList<org.locationtech.jts.geom.Coordinate> 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.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.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.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.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)getConvexHullIndices(List<org.locationtech.jts.geom.Coordinate> coordinates2d) getConvexHullIndices(List<org.locationtech.jts.geom.Coordinate> coordinates2d, boolean ignoreWall) doublegetGPath()doublecompute the path between two pointsdoublegetGPathByIndex(int i0, int i1, double buildingRoofG) Compute the G coefficient for path segment using indices instead of CutPoint references.booleanhasCloseReflectionBeforeReceiver(double maximumReceiverWallDistance) voidinsertCutPoint(boolean sortBySourcePosition, CutPoint... cutPointsToInsert) Insert and sort cut points,booleanbooleanvoidsetCurvedPath(boolean curvedPath) voidsetProfileType(CutProfile.PROFILE_TYPE profileType) voidsort(org.locationtech.jts.geom.Coordinate c0) Sort the CutPoints by distance with c0toString()
-
Field Details
-
cutPoints
List of cut points. First point is source, last point is receiver -
hasBuildingIntersection
public boolean hasBuildingIntersectionTrue 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 hasTopographyIntersectionTrue 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 curvedPathTrue 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
-
-
Constructor Details
-
CutProfile
public CutProfile()Empty constructor for deserialization -
CutProfile
-
-
Method Details
-
getProfileType
- Returns:
- Cut Profile type
-
setProfileType
- 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
- Returns:
- the cutPoints
-
insertCutPoint
Insert and sort cut points,- Parameters:
sortBySourcePosition- After inserting points, sort the by the distance from the sourcecutPointsToInsert-
-
sort
public void sort(org.locationtech.jts.geom.Coordinate c0) Sort the CutPoints by distance with c0 -
getGPath
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 segmenti1- Index of last CutPoint in segmentbuildingRoofG- 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
-
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
- 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 transformationtransformedCutPointsOut- If not null and curvedPath is true, will be populated with transformed CutPoints- Returns:
- The computed 2D coordinate list
-
computePts2D
- Returns:
- @return the computed coordinate list
-
getConvexHullIndices
-
getConvexHullIndices
-
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.- 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 pointsindex- 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 pointstolerance- 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
-
getReceiver
-