Class CornerZCollector
java.lang.Object
org.noise_planet.noisemodelling.jdbc.utils.CornerZCollector
This class collects coordinates and keeps the Z values of points nearest to each corner of the envelope.
It stores only the 4 best candidates found so far, avoiding a full list in memory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCoordinate(org.locationtech.jts.geom.Coordinate c) Adds a coordinate to the collector.voidexpandEnvelope(double distance) org.locationtech.jts.geom.Coordinate[]Returns the coordinates of the corners with the best Z values.
-
Constructor Details
-
CornerZCollector
public CornerZCollector()
-
-
Method Details
-
addCoordinate
public void addCoordinate(org.locationtech.jts.geom.Coordinate c) Adds a coordinate to the collector.- Parameters:
c- The coordinate to add.
-
expandEnvelope
public void expandEnvelope(double distance) -
getCorners
public org.locationtech.jts.geom.Coordinate[] getCorners()Returns the coordinates of the corners with the best Z values.- Returns:
- An array of coordinates representing the corners with the best Z values or null if no points have been added.
-