diff options
author | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-09-23 19:51:49 +0000 |
---|---|---|
committer | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-09-23 19:51:49 +0000 |
commit | f97758cd85eb344db04b1d3611c132ef189db653 (patch) | |
tree | 455d44021e6bae74d4e7dc7f71630e206a0b8603 /navit/maptool | |
parent | 2f2c1aea0763928f0cbb490646fe9eaba9211d81 (diff) | |
download | navit-svn-f97758cd85eb344db04b1d3611c132ef189db653.tar.gz |
Add:maptool:Move experimental associatedStreet feature into production.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5644 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/maptool')
-rw-r--r-- | navit/maptool/maptool.c | 13 | ||||
-rw-r--r-- | navit/maptool/osm.c | 8 |
2 files changed, 7 insertions, 14 deletions
diff --git a/navit/maptool/maptool.c b/navit/maptool/maptool.c index 26110407..376c3530 100644 --- a/navit/maptool/maptool.c +++ b/navit/maptool/maptool.c @@ -442,8 +442,7 @@ osm_collect_data(struct maptool_params *p, char *suffix) } if (p->process_relations) { p->osm.boundaries=tempfile(suffix,"boundaries",1); - if(experimental) - p->osm.associated_streets=tempfile(suffix,"associated_streets",1); + p->osm.associated_streets=tempfile(suffix,"associated_streets",1); } #ifdef HAVE_POSTGRESQL if (p->dbstr) @@ -841,7 +840,7 @@ int main(int argc, char **argv) exit(0); } } -#if 0 +#if 1 if (experimental) { fprintf(stderr,"No experimental features available\n"); exit(0); @@ -924,7 +923,7 @@ int main(int argc, char **argv) if(!p.keep_tmpfiles) tempfile_unlink(suffix,"ways_split_index"); } - if (experimental && p.process_relations && p.process_ways && p.process_nodes && start_phase(&p,"processing associated street relations")) { + if (p.process_relations && p.process_ways && p.process_nodes && start_phase(&p,"processing associated street relations")) { FILE *ways_in=tempfile(suffix,"ways_split",0); FILE *ways_out=tempfile(suffix,"ways_split_as",1); FILE *nodes_in=tempfile(suffix,"nodes",0); @@ -953,10 +952,10 @@ int main(int argc, char **argv) tempfile_rename(suffix,"way2poi_result","way2poi_result_pre_as"); tempfile_rename(suffix,"way2poi_result_as","way2poi_result"); } + tempfile_unlink(suffix,"ways_split_pre_as"); + tempfile_unlink(suffix,"nodes_pre_as"); + tempfile_unlink(suffix,"way2poi_result_pre_as"); if(!p.keep_tmpfiles) { - tempfile_unlink(suffix,"ways_split__pre_as"); - tempfile_unlink(suffix,"nodes_pre_as"); - tempfile_unlink(suffix,"way2poi_result_pre_as"); tempfile_unlink(suffix,"associated_streets"); } } diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index 255143ff..4cbcab53 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -1577,7 +1577,7 @@ osm_end_relation(struct maptool_osm *osm) if (!strcmp(relation_type, "restriction") && (item_bin->type == type_street_turn_restriction_no || item_bin->type == type_street_turn_restriction_only)) item_bin_write(item_bin, osm->turn_restrictions); - if (experimental && !strcmp(relation_type, "associatedStreet") ) + if (!strcmp(relation_type, "associatedStreet") ) item_bin_write(item_bin, osm->associated_streets); attr_longest_match_clear(); @@ -2302,27 +2302,21 @@ process_associated_streets_setup(FILE *in, struct relations *relations, struct a rel->name=(char*)(rel+1); g_strlcpy(rel->name,name,namelen); } - fprintf(stderr,"name=%s\n",rel->name); min_count=0; while(search_relation_member(ib, "street",&relm,&min_count)) { if(relm.type==2) relations_add_func(relations, relations_func, rel, NULL, relm.type, relm.id); - fprintf(stderr,"street type=%d(should be 2) id="LONGLONG_FMT "\n",relm.type,relm.id); - } min_count=0; while(search_relation_member(ib, "house",&relm,&min_count)) { - fprintf(stderr,"house type=%d id="LONGLONG_FMT"\n",relm.type,relm.id); relations_add_func(relations, relations_func, rel, NULL, relm.type, relm.id); } min_count=0; while(search_relation_member(ib, "addr:houselink",&relm,&min_count)) { - fprintf(stderr,"houselink type=%d id="LONGLONG_FMT"\n",relm.type,relm.id); relations_add_func(relations, relations_func, rel, NULL, relm.type, relm.id); } min_count=0; while(search_relation_member(ib, "address",&relm,&min_count)) { - fprintf(stderr,"address type=%d id="LONGLONG_FMT"\n",relm.type,relm.id); relations_add_func(relations, relations_func, rel, NULL, relm.type, relm.id); } } |