2 * This file is part of mapper
4 * Copyright (C) 2007 Kaj-Michael Lang
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 #define OSM_RANGE_WAY (20000)
29 gboolean osm_init(sqlite3 **db);
30 void osm_deinit(void);
32 void osm_set_way_range_from_speed(gfloat speed);
33 void osm_set_way_range(guint sr);
35 void osm_progress_set_widget(sqlite3 *db, GtkProgressBar *w);
36 gboolean osm_db_prepare(sqlite3 *db);
38 gboolean osm_way_get_nodes(osm_way *w);
39 gboolean osm_way_get_name(osm_way *w);
40 gboolean osm_way_get_ref(osm_way *w);
42 gboolean osm_find_nearest_place(node_type_t type, gint lat, gint lon, osm_place **nr);
43 osm_way *osm_find_nearest_way(gint lat, gint lon);
44 gboolean osm_way_distance(gint lat, gint lon, osm_way_node *f, osm_way_node *t, gdouble *d);
46 gboolean osm_place_get(guint32 id, gint lat, gint lon, osm_place **nr);
48 gboolean osm_get_location_data(gint lat, gint lon, osm_location *map_loc);
50 osm_way_node *osm_way_node_new(guint id, gint lat, gint lon, gint flags);
52 void osm_way_node_free(osm_way_node *n);
53 void osm_way_free(osm_way *w);
54 void osm_way_nodes_free(osm_way *w);