Class StraightSkeleton

java.lang.Object
fr.ign.artiscales.pm.division.StraightSkeleton

public class StraightSkeleton extends Object
Weighted straight skeleton computation. Uses the campskeleton library. The result is converted to a topological graph using half-edges.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StraightSkeleton​(org.locationtech.jts.geom.Polygon p)
    Compute a straight skeleton from the input polygon.
    StraightSkeleton​(org.locationtech.jts.geom.Polygon p, double cap)
    Straight skelton calculation with cap parameters that defines a perpendicular distance from the block contours that won't be taken into the creation of a skeleton
    StraightSkeleton​(org.locationtech.jts.geom.Polygon p, double[] angles)
     
    StraightSkeleton​(org.locationtech.jts.geom.Polygon p, double[] angles, double cap)
    Calcul du squelette droit, le résultat est obtenu par le getCarteTopo() Une pondération est appliquée
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.twak.utils.collections.LoopL<org.twak.camp.Edge>
    buildEdgeLoops​(org.locationtech.jts.geom.Polygon p, double[] angles)
     
    static org.twak.camp.Skeleton
    buildSkeleton​(org.locationtech.jts.geom.Polygon p, double[] angles)
     
    static org.locationtech.jts.geom.Polygon
    convertCornerLoops​(org.twak.utils.collections.LoopL<org.twak.camp.Corner> points, org.locationtech.jts.geom.GeometryFactory factory)
     
    static void
     
    static List<org.twak.camp.Edge>
    fromDPLToEdges​(org.locationtech.jts.geom.Coordinate[] dpl)
    Convertit une liste de sommets formant un cycle en arrêtes.
    List<fr.ign.artiscales.tools.graph.recursiveGraph.HalfEdge>
     
    fr.ign.artiscales.tools.graph.recursiveGraph.TopologicalGraph
     
    List<fr.ign.artiscales.tools.graph.recursiveGraph.HalfEdge>
     
    org.locationtech.jts.geom.Polygon
     
    List<fr.ign.artiscales.tools.graph.recursiveGraph.HalfEdge>
     
    static org.locationtech.jts.geom.Polygon
    shrink​(org.locationtech.jts.geom.Polygon p, double value)
     

    Methods inherited from class java.lang.Object

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

    • StraightSkeleton

      public StraightSkeleton(org.locationtech.jts.geom.Polygon p)
      Compute a straight skeleton from the input polygon.
      Parameters:
      p - input polygon
    • StraightSkeleton

      public StraightSkeleton(org.locationtech.jts.geom.Polygon p, double cap)
      Straight skelton calculation with cap parameters that defines a perpendicular distance from the block contours that won't be taken into the creation of a skeleton
      Parameters:
      p - initial polygon
      cap - distance from border to ignore
    • StraightSkeleton

      public StraightSkeleton(org.locationtech.jts.geom.Polygon p, double[] angles)
    • StraightSkeleton

      public StraightSkeleton(org.locationtech.jts.geom.Polygon p, double[] angles, double cap)
      Calcul du squelette droit, le résultat est obtenu par le getCarteTopo() Une pondération est appliquée
      Parameters:
      p -
      angles - : la pondération appliquée pour le calcul de squelette droit. Le nombre d'élément du tableaux doit être au moins égal au nombre de côté (intérieurs inclus du polygone)
  • Method Details

    • getInputPolygon

      public org.locationtech.jts.geom.Polygon getInputPolygon()
    • buildSkeleton

      public static org.twak.camp.Skeleton buildSkeleton(org.locationtech.jts.geom.Polygon p, double[] angles)
    • buildEdgeLoops

      public static org.twak.utils.collections.LoopL<org.twak.camp.Edge> buildEdgeLoops(org.locationtech.jts.geom.Polygon p, double[] angles)
    • fromDPLToEdges

      public static List<org.twak.camp.Edge> fromDPLToEdges(org.locationtech.jts.geom.Coordinate[] dpl)
      Convertit une liste de sommets formant un cycle en arrêtes.
      Parameters:
      dpl -
    • getGraph

      public fr.ign.artiscales.tools.graph.recursiveGraph.TopologicalGraph getGraph()
      Returns:
      perment d'obtenir la carte topo générée
    • getExteriorEdges

      public List<fr.ign.artiscales.tools.graph.recursiveGraph.HalfEdge> getExteriorEdges()
      Returns:
      extrait les arcs extérieurs du polygone
    • getInteriorEdges

      public List<fr.ign.artiscales.tools.graph.recursiveGraph.HalfEdge> getInteriorEdges()
      Returns:
      extrait les arcs générés lors du calcul du squelette droit
    • getIncludedEdges

      public List<fr.ign.artiscales.tools.graph.recursiveGraph.HalfEdge> getIncludedEdges()
      Returns:
      extrait les arcs générés ne touchant pas la frontière du polygone
    • convertCornerLoops

      public static org.locationtech.jts.geom.Polygon convertCornerLoops(org.twak.utils.collections.LoopL<org.twak.camp.Corner> points, org.locationtech.jts.geom.GeometryFactory factory)
    • shrink

      public static org.locationtech.jts.geom.Polygon shrink(org.locationtech.jts.geom.Polygon p, double value)
    • exportStraightSkeleton

      public static void exportStraightSkeleton(StraightSkeleton cs, File folderOut)