Skip to content

Instantly share code, notes, and snippets.

@ramiroaznar
Created May 24, 2016 10:34
Show Gist options
  • Save ramiroaznar/78381815df1d03547f724584702c0da9 to your computer and use it in GitHub Desktop.
Save ramiroaznar/78381815df1d03547f724584702c0da9 to your computer and use it in GitHub Desktop.
Selecting stations which intersect with a 100m buffer of the L1 metro line
SELECT
a.*
FROM
estaciones a,
lineas b
WHERE
ST_Intersects(
ST_Transform(
ST_Buffer(b.the_geom::geography, 100)::geometry,3857),
a.the_geom_webmercator
)
AND
b.name ilike 'L1';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment