Skip to content

Instantly share code, notes, and snippets.

@alexanno
Last active August 29, 2015 14:23
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 alexanno/5361e719bba8ae63633a to your computer and use it in GitHub Desktop.
Save alexanno/5361e719bba8ae63633a to your computer and use it in GitHub Desktop.
island contours in postgis + n50
select ogc_fid, geometri from n50.n50_begrensningskurve a
where st_touches(a.geometri, (select geometri from n50.n50_begrensningskurve where ogc_fid=2680783))
------------ http://boundlessgeo.com/2010/07/network-walking-in-postgis/
WITH RECURSIVE walk_network(ogc_fid, geom) AS (
SELECT ogc_fid, geom FROM sandbox.justoya WHERE ogc_fid=2625722
UNION ALL
SELECT n.ogc_fid, n.geom
FROM sandbox.justoya n, walk_network w
WHERE ST_DWithin(ST_EndPoint(w.geom),ST_StartPoint(n.geom),0.1)
)
SELECT ogc_fid,geom INTO sandbox.testwalkjustoya
FROM walk_network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment