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

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

Comment copier une machine virtuelle kvm en raw sur un Volume Group LVM2 se trouvant sur un disque en DRBD