From 418b315ea57e34bd4f0ef43247163f20b8ebaa00 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 21 Sep 2007 16:04:36 +0000 Subject: [PATCH 1/1] Use tile based queries for unwayed segments. --- app/controllers/swf_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/swf_controller.rb b/app/controllers/swf_controller.rb index 084a7d57a..628a95e06 100644 --- a/app/controllers/swf_controller.rb +++ b/app/controllers/swf_controller.rb @@ -95,8 +95,7 @@ class SwfController < ApplicationController " LEFT OUTER JOIN current_way_segments"+ " ON segment_id=current_segments.id,"+ " current_nodes AS cn1,current_nodes AS cn2"+ - " WHERE (cn1.longitude BETWEEN #{xmin} AND #{xmax})"+ - " AND (cn1.latitude BETWEEN #{ymin} AND #{ymax})"+ + " WHERE "+OSM.sql_for_area(ymin,xmin,ymax,xmax,"cn1.")+ " AND segment_id IS NULL"+ " AND current_segments.visible=1"+ " AND cn1.id=node_a AND cn1.visible=1"+ -- 2.43.2