From: Kaj-Michael Lang Date: Tue, 17 Jul 2007 12:35:53 +0000 (+0300) Subject: Handle some more amenities (speed trap, schools) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0b953e1c085dc1e380aff316d41c6471ed253bd;p=mapper Handle some more amenities (speed trap, schools) List appending is slow, prepend instead. Free the POI list after storing. --- diff --git a/src/osm.c b/src/osm.c index c0252e2..b6b5bf1 100644 --- a/src/osm.c +++ b/src/osm.c @@ -100,6 +100,7 @@ struct _nodeinfo { { "amenity", "restaurant", NODE_AMENITY_FOOD }, { "amenity", "parking", NODE_AMENITY_PARKING }, { "amenity", "hospital", NODE_AMENITY_HOSPITAL }, + { "amenity", "doctors", NODE_AMENITY_HOSPITAL }, { "amenity", "pharmacy", NODE_AMENITY_PHARMACY }, { "amenity", "post_office", NODE_AMENITY_POST }, { "amenity", "post_box", NODE_AMENITY_POST_BOX }, @@ -108,9 +109,13 @@ struct _nodeinfo { { "amenity", "atm", NODE_AMENITY_ATM }, { "amenity", "bank", NODE_AMENITY_BANK }, { "amenity", "police", NODE_AMENITY_POLICE }, + { "amenity", "speed_trap", NODE_AMENITY_SPEEDCAM }, { "amenity", "supermarket", NODE_AMENITY_SHOP }, { "amenity", "shop", NODE_AMENITY_SHOP }, { "amenity", "place_of_worship",NODE_AMENITY_POW }, + { "amenity", "school",NODE_AMENITY_SCHOOL }, + { "amenity", "college",NODE_AMENITY_COLLEGE }, + { "amenity", "university",NODE_AMENITY_COLLEGE }, { "railway", "station", NODE_AMENITY_RAILWAY_STATION }, { "railway", "halt", NODE_AMENITY_RAILWAY_HALT }, @@ -668,6 +673,7 @@ g_print("Storing new POIs...\n"); sqlite3_exec(db, "begin;", NULL, NULL, NULL); g_slist_foreach(osm_poi, osm_node_save_poi, NULL); sqlite3_exec(db, "commit;", NULL, NULL, NULL); +g_slist_free(osm_poi); } /*********************************************************************/ @@ -855,7 +861,7 @@ switch (t) { if (cnode->data && cnode->data->type==NODE_PLAIN) osm_free_node_data(cnode); else if (cnode->data) { - osm_poi=g_slist_append(osm_poi, cnode); + osm_poi=g_slist_prepend(osm_poi, cnode); } cnode=NULL; break;