From e8df39f80716e25b523322192240a09f045ba563 Mon Sep 17 00:00:00 2001 From: ShacharOch Date: Tue, 8 May 2018 10:35:54 +0300 Subject: [PATCH] Create baseline_data_junction_50m.sql The query collect all the markers located < 50m from junction [Thanks to Shachar] --- Sql/baseline_data_junction_50m.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Sql/baseline_data_junction_50m.sql diff --git a/Sql/baseline_data_junction_50m.sql b/Sql/baseline_data_junction_50m.sql new file mode 100644 index 0000000..a737d77 --- /dev/null +++ b/Sql/baseline_data_junction_50m.sql @@ -0,0 +1,16 @@ +SELECT +osm_israel."Geometry" +,osm_israel."OSM_name" +,osm_israel.lu_type +,osm_israel.osm_tags + +,ST_X(ST_PointOnSurface("Geometry")) as long +,ST_Y(ST_PointOnSurface("Geometry")) as lat + +,markers.id + +FROM osm_israel +INNER JOIN markers + ON (osm_israel.osm_tags LIKE '%junction%' AND ST_distance(ST_setSRID(osm_israel."Geometry",4326)::geography,markers.geom::geography) < 50) +where created between date '2015-01-01' and date '2018-01-01' + and markers."locationAccuracy" = 1