Nom

CG_StraightSkeletonPartition — Calcule la partition du squelette droit d'un polygone.

Synopsis

geometry CG_StraightSkeletonPartition(geometry geom, boolean auto_orientation);

Description

Calcule la partition du squelette droit du polygone d'entrée geometry geom. Le squelette droit est une partition du polygone en faces formées en traçant l'effondrement de ses arêtes. Si auto_orientation vaut true, la fonction ajustera automatiquement l'orientation du polygone d'entrée pour garantir des résultats corrects.

Disponibilité : 3.6.0 - nécessite SFCGAL >= 2.0.0.

Cette méthode nécessite le backend SFCGAL.

Exemples

Code
SELECT CG_StraightSkeletonPartition('POLYGON((0 0,4 0,2 2,0 0))', true);
Export de raster
POLYHEDRALSURFACE(((0 0,2 0.82842712474619,2 2,0 0)),((4 0,2 0.82842712474619,0 0,4 0)),((2 2,2 0.82842712474619,4 0,2 2)))
Figure
Geometry figure for visual-cg-straightskeletonpartition-01

Straight skeleton partition of a polygon.

Code
WITH data AS (
  SELECT 'POLYGON((190 190,10 190,10 10,190 10,190 20,160 30,60 30,60 130,190 140,190 190))'::geometry AS polygon
)
SELECT polygon AS input_polygon,
       CG_StraightSkeletonPartition(polygon, true) AS skeleton_partition
FROM data;
Export de raster
POLYGON((190 190,10 190,10 10,190 10,190 20,160 30,60 30,60 130,190 140,190 190)) | POLYHEDRALSURFACE(((190 190,164.04 164.04,190 140,190 190)),((10 190,40.697 159.303,164.04 164.04,190 190,10 190)),((10 10,35 35,35 153.151,40.697 159.303,10 190,10 10)),((190 10,184.189 15.811,158.377 20,50 20,35 35,10 10,190 10)),((190 20,184.189 15.811,190 10,190 20)),((160 30,158.377 20,184.189 15.811,190 20,160 30)),((60 30,50 20,158.377 20,160 30,60 30)),((60 130,35 153.151,35 35,50 20,60 30,60 130)),((190 140,164.04 164.04,40.697 159.303,35 153.151,60 130,190 140)))
Figure
Geometry figure for visual-cg-straightskeletonpartition-02