w->flags=0;
/* Add to list of ways */
-osm_ways=g_slist_prepend(osm_ways, w);
return w;
}
+void
+osm_way_add_to_list(way *w)
+{
+osm_ways=g_slist_prepend(osm_ways, w);
+}
+
void
osm_way_new_node(way *w, gint nid)
{
case IN_WNODE_TAG:
ndref=atoi(get_attr_key_value(atts, "ref"));
if (use_bbox==TRUE) {
- if (osm_find_node(ndref)==NULL)
+ if (osm_find_node(ndref)==NULL) {
+ cway->id=0;
return;
+ }
}
osm_way_new_node(cway, ndref);
break;
cway->data->int_ref==NULL && cway->data->layer==0 && cway->data->speed==0)
osm_free_way_data(cway);
+ if (cway->id!=0)
+ osm_way_add_to_list(cway);
+ else
+ way_cnt--;
+
if (way_cnt % 32767==0) {
g_printf("Ways: %d\n", way_cnt);
}