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

Posts les plus consultés de ce blog

Comment extraire les fichiers disques en raw d'un backup proxmox vma

Utiliser curl pour récupérer des logs sur un serveur Microsoft IIS avec l'authentification ntlm

Find the lists of disks of your Proxmox VM stored in a ceph cluster