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
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addLineString(org.locationtech.jts.geom.LineString lineToProcess, int buildingID)
    Append a LineString into the triangulation
    void
    addPolygon(org.locationtech.jts.geom.Polygon newPoly, int buildingId)
    Append a polygon into the triangulation
    void
    addVertex(org.locationtech.jts.geom.Coordinate vertexCoordinate)
    Append a vertex into the triangulation
    void
    dumpData(File destinationCsv)
     
    int
    findPolygonIndexByPoint(org.locationtech.jts.geom.Point point)
    Find polygon index by point
     
    double
     
    retrieve results Triangle link
    When 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 vertices
    void
    hintInit(org.locationtech.jts.geom.Envelope bBox, long polygonCount, long verticesCount)
    This optional method give an hint of the size of the delaunay process.
    boolean
     
    void
    Launch delaunay process
    void
    readDump(File dumpPath)
    Read dump file
    void
    Remove all data, come back to the constructor state
    void
    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.
    void
    setVerbose(boolean verbose)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • dumpFolder

      public String dumpFolder
  • Constructor Details

    • LayerTinfour

      public LayerTinfour()
  • Method Details

    • isVerbose

      public boolean isVerbose()
    • setVerbose

      public void setVerbose(boolean verbose)
    • 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(File destinationCsv)
    • 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 error
      LayerDelaunayError - Error in delaunay processing
      org.locationtech.jts.io.ParseException - Error in WKT parsing
    • processDelaunay

      public void processDelaunay() throws LayerDelaunayError
      Launch delaunay process
      Specified by:
      processDelaunay in interface LayerDelaunay
      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 interface LayerDelaunay
      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 interface LayerDelaunay
      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 interface LayerDelaunay
      Parameters:
      bBox - Bounding box of the delaunay mesh
      polygonCount - 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 interface LayerDelaunay
      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 interface LayerDelaunay
      Throws:
      LayerDelaunayError
    • addVertex

      public void addVertex(org.locationtech.jts.geom.Coordinate vertexCoordinate) throws LayerDelaunayError
      Append a vertex into the triangulation
      Specified by:
      addVertex in interface LayerDelaunay
      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 interface LayerDelaunay
      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 interface LayerDelaunay
      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 interface LayerDelaunay
    • getNeighbors

      public List<Triangle> getNeighbors() throws LayerDelaunayError
      retrieve results Triangle link
      Specified by:
      getNeighbors in interface LayerDelaunay
      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 interface LayerDelaunay
      Parameters:
      retrieve -