way_dist_range=OSM_RANGE_WAY-lrint((speed/4)*1000);
}
+/*****************************************************************************/
+
static int
osm_progress(void *ud)
{
osm_progress_show(db);
}
+/*****************************************************************************/
+
gboolean
osm_db_prepare(sqlite3 *db)
{
GList *ways=NULL;
osm_way *w;
gulong tms;
-gint wc=0;
+guint wc=0;
sqlite3_reset(sql.select_way2);
sqlite3_clear_bindings(sql.select_way2);
range+=OSM_RANGE_STEP;
g_printf("Trying with range: %d\n", range);
}
+#ifdef DEBUG_OSM
+g_printf("Found %d ways withing range %d\n", g_list_length(w), range);
+#endif
if (g_list_length(w)==0)
return NULL;
-#ifdef DEBUG_OSM
-g_printf("Found ways: %d\n", g_list_length(w));
-#endif
-
for (iter=w; iter!=NULL; iter=iter->next) {
osm_way_node *wnn;
osm_way_node *wnp;
osm_way *way=(osm_way*)iter->data;
#ifdef DEBUG_OSM
- g_printf("WAY %d (%d) HAS %d NODES, nearest is %d\n",
- way->id, way->type, way->nodecnt, way->f);
+ g_printf("Way: %d (%d) has %d nodes, nearest is %d,%d\n",
+ way->id, way->type, way->nodecnt, way->f, way->t);
#endif
way->node_t=NULL;
g_printf("\tType: %d Flags: %d Nodes: %d Dist: %f\n",
cw->type, cw->flags, cw->nodecnt, cw->dist);
g_printf("\tNF: %d NT: %d Distance: %f\n",
- cw->node_f->num,
- cw->node_t->num,
+ cw->f,
+ cw->t,
cw->distance);
#endif