Package fr.ign.artiscales.pm.division
Class StraightSkeleton
java.lang.Object
fr.ign.artiscales.pm.division.StraightSkeleton
Weighted straight skeleton computation. Uses the campskeleton library. The result is converted to a topological graph using half-edges.
-
Constructor Summary
ConstructorsConstructorDescriptionStraightSkeleton(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 skeletonStraightSkeleton(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 TypeMethodDescriptionstatic org.twak.utils.collections.LoopL<org.twak.camp.Edge>buildEdgeLoops(org.locationtech.jts.geom.Polygon p, double[] angles)static org.twak.camp.SkeletonbuildSkeleton(org.locationtech.jts.geom.Polygon p, double[] angles)static org.locationtech.jts.geom.PolygonconvertCornerLoops(org.twak.utils.collections.LoopL<org.twak.camp.Corner> points, org.locationtech.jts.geom.GeometryFactory factory)static voidexportStraightSkeleton(StraightSkeleton cs, File folderOut)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.TopologicalGraphgetGraph()List<fr.ign.artiscales.tools.graph.recursiveGraph.HalfEdge>org.locationtech.jts.geom.PolygonList<fr.ign.artiscales.tools.graph.recursiveGraph.HalfEdge>static org.locationtech.jts.geom.Polygonshrink(org.locationtech.jts.geom.Polygon p, double value)
-
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 polygoncap- 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
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
- Returns:
- extrait les arcs extérieurs du polygone
-
getInteriorEdges
- Returns:
- extrait les arcs générés lors du calcul du squelette droit
-
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
-