#include <fcntl.h>
#include <math.h>
#include <glib.h>
+#include <glib/gstdio.h>
#include <sqlite3.h>
#include <expat.h>
#include "osm.h"
+#include "latlon.h"
struct sql_select_stmt {
sqlite3_stmt *select_way;
static struct sql_select_stmt sql;
gboolean osm_way_get_nodes(osm_way *w);
+gboolean osm_way_get_name(osm_way *w);
+gboolean osm_way_get_ref(osm_way *w);
gboolean
osm_db_prepare(sqlite3 *db)
break;
default:
{
- gint dist=900000, ndist;
gdouble pdist=900000.0, pndist=9000000.0;
for (iter=w; iter!=NULL; iter=iter->next) {
g_printf("BEST WAY(%d): %s (%s,%s)\n",
cw->id, cw->name, cw->ref, cw->int_ref);
g_printf("\tT: %d F: %d N: %d D: %f\n",
- cw->type, cw->flags, cw->nodes, cw->dist);
+ cw->type, cw->flags, cw->nodecnt, cw->dist);
g_printf("\tNF: %d NT: %d DT %f\n",
cw->node_f->num,
cw->node_t->num, cw->distance);