Class LayerTinfour
java.lang.Object
org.noise_planet.noisemodelling.pathfinder.delaunay.LayerTinfour
- All Implemented Interfaces:
LayerDelaunay
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLineString(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 triangulationvoidintfindPolygonIndexByPoint(org.locationtech.jts.geom.Point point) Find polygon index by pointdoubleretrieve results Triangle linkWhen the processDelaunay has been called, retrieve results Triangle link unique vertices by their index.List<org.locationtech.jts.geom.Coordinate> 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.booleanvoidLaunch delaunay processvoidRead dump filevoidreset()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.voidsetVerbose(boolean verbose)
-
Field Details
-
dumpFolder
-
-
Constructor Details
-
LayerTinfour
public LayerTinfour()
-
-
Method Details
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
getDumpFolder
- Returns:
- When an exception occur, this folder with receiver the input data
-
setDumpFolder
- 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
-
findPolygonIndexByPoint
public int findPolygonIndexByPoint(org.locationtech.jts.geom.Point point) Find polygon index by point- Parameters:
point- Point to search- Returns:
- Polygon index or -1 if not found
-
readDump
public void readDump(File dumpPath) throws IOException, LayerDelaunayError, org.locationtech.jts.io.ParseException Read dump file- Parameters:
dumpPath- Path to dump file- Throws:
IOException- Read errorLayerDelaunayError- Error in delaunay processingorg.locationtech.jts.io.ParseException- Error in WKT parsing
-
processDelaunay
Launch delaunay process- Specified by:
processDelaunayin 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:
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
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 LayerDelaunayError Description 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
Description copied from interface:LayerDelaunayWhen the processDelaunay has been called, retrieve results vertices- Specified by:
getVerticesin interfaceLayerDelaunay- Throws:
LayerDelaunayError
-
getTriangles
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 LayerDelaunayError Append a vertex into the triangulation- Specified by:
addVertexin interfaceLayerDelaunay- Parameters:
vertexCoordinate- coordinate of the new vertex- Throws:
LayerDelaunayError
-
setMaxArea
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 LayerDelaunayError Append 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
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-
-