From: Kaj-Michael Lang Date: Thu, 25 Oct 2007 12:21:43 +0000 (+0300) Subject: s2s -> n2n X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29aa1f1429c9a3ceaa4fd33ba52517cb1a4f2f76;p=mapper s2s -> n2n --- diff --git a/src/osm-db.c b/src/osm-db.c index 40ee06d..771a89a 100644 --- a/src/osm-db.c +++ b/src/osm-db.c @@ -157,7 +157,7 @@ if (sqlite3_prepare_v2(db, "select name,(($LAT-lat)*($LAT-lat))+(($LON-lon)*($LO /* Select neareset ways inside lat,lon+-range */ if (sqlite3_prepare_v2(db, "select wid,type,nodes,flags," "(($LAT-lat)*($LAT-lat))+(($LON-lon)*($LON-lon)) as d,f,t,lat,lon " - " from way as w,way_s2s as ws,nodes as n " + " from way as w,way_n2n as ws,nodes as n " " where w.wid=ws.wsid and ws.f=n.nid " " and n.lat between $LAT-$RANGE and $LAT+$RANGE " " and n.lon between $LON-$RANGE and $LON+$RANGE " @@ -166,11 +166,11 @@ if (sqlite3_prepare_v2(db, "select wid,type,nodes,flags," -1, &sql.select_way2, NULL)!=SQLITE_OK) return FALSE; -if (sqlite3_prepare_v2(db, "select t,lat,lon from way_s2s,nodes where wsid=? and f=? and way_s2s.t=nodes.nid limit 1", +if (sqlite3_prepare_v2(db, "select t,lat,lon from way_n2n,nodes where wsid=? and f=? and way_n2n.t=nodes.nid limit 1", -1, &sql.select_way_next_seg, NULL)!=SQLITE_OK) return FALSE; -if (sqlite3_prepare_v2(db, "select f,lat,lon from way_s2s,nodes where wsid=? and t=? and way_s2s.f=nodes.nid limit 1", +if (sqlite3_prepare_v2(db, "select f,lat,lon from way_n2n,nodes where wsid=? and t=? and way_n2n.f=nodes.nid limit 1", -1, &sql.select_way_prev_seg, NULL)!=SQLITE_OK) return FALSE;