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 StringdumpFolder
-
Constructor Summary
Constructors Constructor Description LayerTinfour()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLineString(org.locationtech.jts.geom.LineString lineToProcess, int buildingID)Append a LineString into the triangulationvoidaddPolygon(org.locationtech.jts.geom.Polygon newPoly, int buildingId)Append a polygon into the triangulationvoidaddVertex(org.locationtech.jts.geom.Coordinate vertexCoordinate)Append a vertex into the triangulationvoiddumpData()StringgetDumpFolder()doublegetEpsilon()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 verticesvoidhintInit(org.locationtech.jts.geom.Envelope bBox, long polygonCount, long verticesCount)This optional method give an hint of the size of the delaunay process.voidprocessDelaunay()Launch delaunay processvoidreset()Remove all data, come back to the constructor statevoidsetDumpFolder(String dumpFolder)voidsetEpsilon(double epsilon)voidsetMaxArea(Double maxArea)Set the maximum area in m²voidsetMinAngle(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.voidsetRetrieveNeighbors(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 LayerDelaunayErrorLaunch delaunay process- Specified by:
processDelaunayin interfaceLayerDelaunay- Throws:
LayerDelaunayError
-
addPolygon
public void addPolygon(org.locationtech.jts.geom.Polygon newPoly, int buildingId) throws LayerDelaunayErrorAppend a polygon into the triangulation- Specified by:
addPolygonin 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:LayerDelaunaySet the minimum angle, if you wish to enforce the quality of the delaunay Call processDelauney after to take account of this method.- Specified by:
setMinAnglein interfaceLayerDelaunay- Parameters:
minAngle- Minimum angle in radiant
-
hintInit
public void hintInit(org.locationtech.jts.geom.Envelope bBox, long polygonCount, long verticesCount) throws LayerDelaunayErrorDescription copied from interface:LayerDelaunayThis 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:
hintInitin 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:LayerDelaunayWhen the processDelaunay has been called, retrieve results vertices- Specified by:
getVerticesin interfaceLayerDelaunay- Throws:
LayerDelaunayError
-
getTriangles
public List<Triangle> getTriangles() throws LayerDelaunayError
Description copied from interface:LayerDelaunayWhen the processDelaunay has been called, retrieve results Triangle link unique vertices by their index.- Specified by:
getTrianglesin interfaceLayerDelaunay- Throws:
LayerDelaunayError
-
addVertex
public void addVertex(org.locationtech.jts.geom.Coordinate vertexCoordinate) throws LayerDelaunayErrorAppend a vertex into the triangulation- Specified by:
addVertexin 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:
setMaxAreain interfaceLayerDelaunay- Parameters:
maxArea- Maximum area in m²- Throws:
LayerDelaunayError
-
addLineString
public void addLineString(org.locationtech.jts.geom.LineString lineToProcess, int buildingID) throws LayerDelaunayErrorAppend a LineString into the triangulation- Specified by:
addLineStringin interfaceLayerDelaunay- Parameters:
buildingID- Associated ID building that will be available on points- Throws:
LayerDelaunayError
-
reset
public void reset()
Description copied from interface:LayerDelaunayRemove all data, come back to the constructor state- Specified by:
resetin interfaceLayerDelaunay
-
getNeighbors
public List<Triangle> getNeighbors() throws LayerDelaunayError
retrieve results Triangle link- Specified by:
getNeighborsin 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:
setRetrieveNeighborsin interfaceLayerDelaunay- Parameters:
retrieve-
-
-