Class LayerTinfour
- java.lang.Object
-
- org.noise_planet.noisemodelling.pathfinder.delaunay.LayerTinfour
-
- All Implemented Interfaces:
LayerDelaunay
public class LayerTinfour extends Object implements LayerDelaunay
-
-
Field Summary
Fields Modifier and Type Field Description String
dumpFolder
-
Constructor Summary
Constructors Constructor Description LayerTinfour()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLineString(org.locationtech.jts.geom.LineString lineToProcess, int buildingID)
Append a LineString into the triangulationvoid
addPolygon(org.locationtech.jts.geom.Polygon newPoly, int buildingId)
Append a polygon into the triangulationvoid
addVertex(org.locationtech.jts.geom.Coordinate vertexCoordinate)
Append a vertex into the triangulationvoid
dumpData()
String
getDumpFolder()
double
getEpsilon()
List<Triangle>
getNeighbors()
retrieve results Triangle linkList<Triangle>
getTriangles()
When the processDelaunay has been called, retrieve results Triangle link unique vertices by their index.List<org.locationtech.jts.geom.Coordinate>
getVertices()
When the processDelaunay has been called, retrieve results verticesvoid
hintInit(org.locationtech.jts.geom.Envelope bBox, long polygonCount, long verticesCount)
This optional method give an hint of the size of the delaunay process.void
processDelaunay()
Launch delaunay processvoid
reset()
Remove all data, come back to the constructor statevoid
setDumpFolder(String dumpFolder)
void
setEpsilon(double epsilon)
void
setMaxArea(Double maxArea)
Set the maximum area in m²void
setMinAngle(Double minAngle)
Set the minimum angle, if you wish to enforce the quality of the delaunay Call processDelauney after to take account of this method.void
setRetrieveNeighbors(boolean retrieve)
Enable or Disable the collecting of triangles neighboring data.
-
-
-
Field Detail
-
dumpFolder
public String dumpFolder
-
-
Method Detail
-
getDumpFolder
public String getDumpFolder()
- Returns:
- When an exception occur, this folder with receiver the input data
-
setDumpFolder
public void setDumpFolder(String dumpFolder)
- Parameters:
dumpFolder
- When an exception occur, this folder with receiver the input data
-
getEpsilon
public double getEpsilon()
- Returns:
- Merge vertices closer than specified epsilon
-
setEpsilon
public void setEpsilon(double epsilon)
- Parameters:
epsilon
- Merge vertices closer than specified epsilon
-
dumpData
public void dumpData()
-
processDelaunay
public void processDelaunay() throws LayerDelaunayError
Launch delaunay process- Specified by:
processDelaunay
in interfaceLayerDelaunay
- Throws:
LayerDelaunayError
-
addPolygon
public void addPolygon(org.locationtech.jts.geom.Polygon newPoly, int buildingId) throws LayerDelaunayError
Append a polygon into the triangulation- Specified by:
addPolygon
in interfaceLayerDelaunay
- Parameters:
newPoly
- Polygon to append into the mesh, internal rings willb be inserted as holes.buildingId
- Polygon attribute.Triangle.getAttribute()
- Throws:
LayerDelaunayError
-
setMinAngle
public void setMinAngle(Double minAngle)
Description copied from interface:LayerDelaunay
Set the minimum angle, if you wish to enforce the quality of the delaunay Call processDelauney after to take account of this method.- Specified by:
setMinAngle
in interfaceLayerDelaunay
- Parameters:
minAngle
- Minimum angle in radiant
-
hintInit
public void hintInit(org.locationtech.jts.geom.Envelope bBox, long polygonCount, long verticesCount) throws LayerDelaunayError
Description copied from interface:LayerDelaunay
This optional method give an hint of the size of the delaunay process. Call this method before the first call of addPolygon This method is used only for optimization.- Specified by:
hintInit
in interfaceLayerDelaunay
- Parameters:
bBox
- Bounding box of the delaunay meshpolygonCount
- Size of the polygon count- Throws:
LayerDelaunayError
-
getVertices
public List<org.locationtech.jts.geom.Coordinate> getVertices() throws LayerDelaunayError
Description copied from interface:LayerDelaunay
When the processDelaunay has been called, retrieve results vertices- Specified by:
getVertices
in interfaceLayerDelaunay
- Throws:
LayerDelaunayError
-
getTriangles
public List<Triangle> getTriangles() throws LayerDelaunayError
Description copied from interface:LayerDelaunay
When the processDelaunay has been called, retrieve results Triangle link unique vertices by their index.- Specified by:
getTriangles
in interfaceLayerDelaunay
- Throws:
LayerDelaunayError
-
addVertex
public void addVertex(org.locationtech.jts.geom.Coordinate vertexCoordinate) throws LayerDelaunayError
Append a vertex into the triangulation- Specified by:
addVertex
in interfaceLayerDelaunay
- Parameters:
vertexCoordinate
- coordinate of the new vertex- Throws:
LayerDelaunayError
-
setMaxArea
public void setMaxArea(Double maxArea) throws LayerDelaunayError
Set the maximum area in m²- Specified by:
setMaxArea
in interfaceLayerDelaunay
- Parameters:
maxArea
- Maximum area in m²- Throws:
LayerDelaunayError
-
addLineString
public void addLineString(org.locationtech.jts.geom.LineString lineToProcess, int buildingID) throws LayerDelaunayError
Append a LineString into the triangulation- Specified by:
addLineString
in interfaceLayerDelaunay
- Parameters:
buildingID
- Associated ID building that will be available on points- Throws:
LayerDelaunayError
-
reset
public void reset()
Description copied from interface:LayerDelaunay
Remove all data, come back to the constructor state- Specified by:
reset
in interfaceLayerDelaunay
-
getNeighbors
public List<Triangle> getNeighbors() throws LayerDelaunayError
retrieve results Triangle link- Specified by:
getNeighbors
in interfaceLayerDelaunay
- Returns:
- list of triangles neighbor by their index.
- Throws:
LayerDelaunayError
-
setRetrieveNeighbors
public void setRetrieveNeighbors(boolean retrieve)
Enable or Disable the collecting of triangles neighboring data.- Specified by:
setRetrieveNeighbors
in interfaceLayerDelaunay
- Parameters:
retrieve
-
-
-