/* 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 "
-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;