From 0bf7bab366db40e713cd3827563d6c538f95e543 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Thu, 1 Nov 2007 04:15:00 +0200 Subject: [PATCH] Fix place isin bug --- src/osm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/osm.c b/src/osm.c index e6a39af..d1f4ac6 100644 --- a/src/osm.c +++ b/src/osm.c @@ -442,7 +442,7 @@ sqlite3_prepare_v2(db, "delete from nodes", -1, &sql.delete_nodes, NULL); sqlite3_prepare_v2(db, "update nodes set l=l+1 where nid=?", -1, &sql.update_node, NULL); /* Places */ -sqlite3_prepare_v2(db, "insert or replace into places (nid,type,name,isin) values (?, ?, ?, ?)", -1, &sql.insert_place, NULL); +sqlite3_prepare_v2(db, "insert or replace into places (nid,type,name,isin_c,isin_p) values (?, ?, ?, ?, ?)", -1, &sql.insert_place, NULL); sqlite3_prepare_v2(db, "delete from places", -1, &sql.delete_place, NULL); /* POI nodes */ @@ -484,12 +484,13 @@ print_way(way *w) { #ifdef VERBOSE g_assert(w); -g_printf("Way #%d(N:%d T:%d S:%d IS: %d): %s [%s:%s:%s]\n", +g_printf("Way #%d(N:%d T:%d S:%d IS: %d/%d): %s [%s:%s:%s]\n", w->id, g_slist_length(w->nodes), w->type, w->data ? w->data->speed : 0, - w->data ? w->data->isin : 0, + w->data ? w->data->isin_c : -1, + w->data ? w->data->isin_p : -1, w->data ? w->data->name ? w->data->name : "" : "", w->flags & W_ONEWAY ? "-" : "=", w->flags & W_ROUNDABOUT ? "O" : "-", @@ -502,10 +503,11 @@ print_node(node *n) { #ifdef VERBOSE g_assert(n); -g_printf("Node #%d: T:%d IS: %d [%s]\n", +g_printf("Node #%d: T:%d IS: %d/%d [%s]\n", n->id, n->type, - n->data ? n->data->isin : 0, + n->data ? n->data->isin_c : -1, + n->data ? n->data->isin_p : -1, n->data ? n->data->name : ""); #endif } -- 2.39.5