diff options
| author | Michael Dankov <tryagain@navit-project.org> | 2015-08-16 00:39:02 +0300 |
|---|---|---|
| committer | Michael Dankov <tryagain@navit-project.org> | 2015-08-16 01:07:22 +0300 |
| commit | 63fb07481d75ee10e3f67cf4671e99fc5895f46d (patch) | |
| tree | d995b22064aac14346a4f788a4e8917ef5b9a00f /navit/maptool | |
| parent | 4615c85b656342e4e7376d5de3ad2bf3571320dc (diff) | |
| download | navit-63fb07481d75ee10e3f67cf4671e99fc5895f46d.tar.gz | |
Add:maptool:Output progress info during boundaries processing.
Diffstat (limited to 'navit/maptool')
| -rw-r--r-- | navit/maptool/boundaries.c | 2 | ||||
| -rw-r--r-- | navit/maptool/osm.c | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/navit/maptool/boundaries.c b/navit/maptool/boundaries.c index 5e0a5b013..9d39b724f 100644 --- a/navit/maptool/boundaries.c +++ b/navit/maptool/boundaries.c @@ -83,6 +83,8 @@ process_boundaries_setup(FILE *boundaries, struct relations *relations) int has_subrelations=0; int has_outer_ways=0; + processed_relations++; + if(!iso) iso=osm_tag_value(ib, "iso3166-1:alpha2"); diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index 804321d4e..d8063c3a7 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -2062,10 +2062,13 @@ osm_process_towns(FILE *in, FILE *boundaries, FILE *ways, char *suffix) struct attr attrs[11]; FILE *towns_poly; - profile(0,NULL); + processed_nodes=processed_nodes_out=processed_ways=processed_relations=processed_tiles=0; + bytes_read=0; + sig_alrm(0); + bl=process_boundaries(boundaries, ways); - profile(1,"processed boundaries\n"); + fprintf(stderr, "Processed boundaries\n"); town_hash=g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); while ((ib=read_item(in))) { @@ -2077,13 +2080,15 @@ osm_process_towns(FILE *in, FILE *boundaries, FILE *ways, char *suffix) } fseek(in, 0, SEEK_SET); - profile(1, "Finished town table rebuild\n"); + fprintf(stderr, "Finished town table rebuild\n"); while ((ib=read_item(in))) { struct coord *c=(struct coord *)(ib+1); struct country_table *result=NULL; char *is_in=item_bin_get_attr(ib, attr_osm_is_in, NULL); int i; + + processed_nodes++; memset(attrs, 0, sizeof(attrs)); result=osm_process_town_by_boundary(bl, ib, c, attrs); @@ -2145,7 +2150,10 @@ osm_process_towns(FILE *in, FILE *boundaries, FILE *ways, char *suffix) g_hash_table_destroy(town_hash); free_boundaries(bl); - profile(0, "Finished processing towns\n"); + sig_alrm(0); + sig_alrm_end(); + + fprintf(stderr, "Finished processing towns\n"); } void |
