From: Kaj-Michael Lang Date: Mon, 21 Apr 2008 14:07:34 +0000 (+0300) Subject: Way nodes query.. needs some more fixing. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56a5b135703bad36a1d79cf8acdc7f72aba5ad46;p=mapper Way nodes query.. needs some more fixing. --- diff --git a/src/osm-db.c b/src/osm-db.c index 7a7197f..4e1ea23 100644 --- a/src/osm-db.c +++ b/src/osm-db.c @@ -289,6 +289,9 @@ DB_PREP(db, "select name from way_names where wid=?", sql.select_way_name); /* Get Way ref and int_ref */ DB_PREP(db, "select ref,int_ref from way_ref where rid=?", sql.select_way_ref); +/* Get way all way nodes */ +DB_PREP(db, "select wn.f,ilat,ilon from way_n2n as wn,nodes where wid=? and wn.f=nodes.nid", sql.select_way_nodes); + /* Get next, prev node + way information. For routing. */ DB_PREP(db, "select w.wid,w.type,w.flags,w.speed,n.nid,n.rlat,n.rlon,nn.f,nn.t,n.f,n.l " "from way as w, nodes as n, way_n2n as nn where w.wid=nn.wid and nn.f=n.nid and nn.f=?", @@ -920,7 +923,7 @@ sqlite3_reset(sql.select_way_nodes); sqlite3_clear_bindings(sql.select_way_nodes); if (SQLITE_OK != sqlite3_bind_int(sql.select_way_nodes, 1, w->id)) { - g_warning("Failed to bind values way nodes"); + g_warning("Failed to bind values for way nodes"); return FALSE; }