calculer distance entre points successfs d'un polygone
Comment calculer la distance entre les points successifs d'un polygone
SELECT ST_AsText(ST_PointN((st_geometryn(st_boundary(geom),1)), generate_series(1,ST_NumPoints (st_geometryn(st_boundary(geom),1))-1) )), ST_AsText(ST_PointN((st_geometryn(st_boundary(geom),1)), generate_series(1,ST_NumPoints (st_geometryn(st_boundary(geom),1))-1)+1 )), ST_Distance( ST_PointN((st_geometryn(st_boundary(geom),1)),s.i ) , ST_PointN((st_geometryn(st_boundary(geom),1)), generate_series(1,ST_NumPoints (st_geometryn(st_boundary(geom),1))-1)+1 ) ) FROM bati_pol , (SELECT generate_series(1,ST_NumPoints (st_geometryn(st_boundary(bati_pol.geom),1))-1) FROM bati_pol WHERE no_eca like '11330') as s(i) WHERE no_eca like '11330'
Commentaires