Skip to content

Instantly share code, notes, and snippets.

@pigreco
Created April 28, 2017 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pigreco/ca7e45b7f3b748a2a86cb3428ba1ae28 to your computer and use it in GitHub Desktop.
Save pigreco/ca7e45b7f3b748a2a86cb3428ba1ae28 to your computer and use it in GitHub Desktop.
select p.pk_uid, ST_ShortestLine (l.geometry, p.geometry) as geometry ,st_length (ST_ShortestLine (l.geometry, p.geometry)) as lungh_m
from punti as p, grafo_stradale as l
group by p.pk_uid
having min ( st_length(shortestline (p.geometry, l.geometry)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment