{ "amenity", "bank", NODE_AMENITY_BANK },
{ "amenity", "police", NODE_AMENITY_POLICE },
+
{ "amenity", "speed_trap", NODE_AMENITY_SPEEDCAM },
{ "amenity", "speed_camera", NODE_AMENITY_SPEEDCAM },
{ "amenity", "speed camera", NODE_AMENITY_SPEEDCAM },
{ "amenity", "college", NODE_AMENITY_COLLEGE },
{ "amenity", "university", NODE_AMENITY_COLLEGE },
- { "amenity", "library", NODE_AMENITY_LIBRARY },
+ { "amenity", "library", NODE_AMENITY_LIBRARY },
{ "amenity", "townhall", NODE_AMENITY_TOWNHALL },
- { "amenity", "supermarket", NODE_AMENITY_SHOP },
- { "amenity", "shopping_centre", NODE_AMENITY_SHOP },
+ { "amenity", "supermarket", NODE_AMENITY_SHOP_SUPERMARKET },
+ { "amenity", "shopping_centre", NODE_AMENITY_SHOPPING_CENTER },
{ "amenity", "shop", NODE_AMENITY_SHOP },
{ "amenity", "shops", NODE_AMENITY_SHOP },
- { "amenity", "shopping", NODE_AMENITY_SHOP },
- { "amenity", "shopping_mall",NODE_AMENITY_SHOP },
+ { "amenity", "shopping", NODE_AMENITY_SHOPPING_CENTER },
+ { "amenity", "shopping_mall",NODE_AMENITY_SHOPPING_CENTER },
{ "amenity", "cycle_shop", NODE_AMENITY_SHOP },
{ "amenity", "bike_shop", NODE_AMENITY_SHOP },
{ "amenity", "coffee_shop", NODE_AMENITY_SHOP },
{ "amenity", "tea_shop", NODE_AMENITY_SHOP },
/* Shops */
- { "shop", "supermarket", NODE_AMENITY_SHOP },
+ { "shop", "supermarket", NODE_AMENITY_SHOP_SUPERMARKET },
+ { "shop", "alcohol", NODE_AMENITY_SHOP_ALCOHOL },
+ { "shop", "flowers", NODE_AMENITY_SHOP_FLOWERS },
{ "shop", "bakery", NODE_AMENITY_SHOP },
- { "shop", "alcohol", NODE_AMENITY_SHOP },
{ "shop", "butcher", NODE_AMENITY_SHOP },
- { "shop", "flowers", NODE_AMENITY_SHOP },
{ "shop", "clothing", NODE_AMENITY_SHOP },
{ "shop", "souvenir", NODE_AMENITY_SHOP },
{ "shop", "bicycles", NODE_AMENITY_SHOP },
{ "shop", "food", NODE_AMENITY_SHOP },
{ "shop", "drinks", NODE_AMENITY_SHOP },
{ "shop", "sex", NODE_AMENITY_SHOP_ADULT },
+
{ "shop", "pharmacy", NODE_AMENITY_PHARMACY },
/* Sport */
{ "railway", "halt", NODE_RAILWAY_HALT },
{ "aeroway", "terminal", NODE_AIRPORT_TERMINAL },
+ { "aeroway", "aerodrome", NODE_AIRPORT_TERMINAL },
/* Places */
{ "place", "city", NODE_PLACE_CITY },
static gboolean
db_insert_way_n2n(way *w, node *nf, node *nt)
{
-if (!w) {
- g_printf("NULL WAY\n");
- return FALSE;
-}
-
-if (!nf) {
- g_printf("NULL NODE 1\n");
- return FALSE;
-}
-
-if (!nt) {
- g_printf("NULL NODE 2\n");
- return FALSE;
-}
+g_return_val_if_fail(w, FALSE);
+g_return_val_if_fail(nf, FALSE);
+g_return_val_if_fail(nt, FALSE);
sqlite3_bind_int(sql.insert_way_n2n, 1, w->id);
sqlite3_bind_int(sql.insert_way_n2n, 2, nf->id);
osm_way_save(way *value, gpointer user_data)
{
dbway_cnt++;
+db_transaction_begin(db);
db_insert_way(value);
+db_transaction_commit(db);
if (dbway_cnt % 15000==0 && dbway_cnt>0) {
g_printf("\rWays: %f%% (%u/%u)\n",
(((float)dbway_cnt/(float)way_cnt)*100),
osm_planet_save_ways(void)
{
g_print("Inserting new ways\n");
-db_transaction_begin(db);
g_slist_foreach(osm_ways, osm_way_save, NULL);
-return db_transaction_commit(db);
}
/*********************************************************************/