diff options
author | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-02-07 21:56:41 +0000 |
---|---|---|
committer | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-02-07 21:56:41 +0000 |
commit | 27d0a24ffee7b915fbfdc0a4b56a381ed788b1e0 (patch) | |
tree | 8c2f454258c81770b340a971facad4eafb534727 | |
parent | 5a43cae40139f276096e004f1b05f35624ca9d20 (diff) | |
download | navit-27d0a24ffee7b915fbfdc0a4b56a381ed788b1e0.tar.gz |
Add:maptool:Merge recent expiremental changes to mainstream.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5370 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | navit/maptool/itembin.c | 40 | ||||
-rw-r--r-- | navit/maptool/osm.c | 13 |
2 files changed, 23 insertions, 30 deletions
diff --git a/navit/maptool/itembin.c b/navit/maptool/itembin.c index 934026bf2..a2246a190 100644 --- a/navit/maptool/itembin.c +++ b/navit/maptool/itembin.c @@ -477,7 +477,7 @@ item_bin_write_match(struct item_bin *ib, enum attr_type type, enum attr_type ma char tilename[32]=""; if (!word) return; - if(experimental && maxdepth && ib->clen>0) { + if(maxdepth && ib->clen>0) { struct rect r; struct coord *c=(struct coord *)(ib+1); r.l=c[0]; @@ -487,8 +487,8 @@ item_bin_write_match(struct item_bin *ib, enum attr_type type, enum attr_type ma tile(&r,NULL,tilename,maxdepth,overlap,NULL); } - /* insert attr_tile_name attribute before the attribute used as alphabetical key (of type type) */ - if(experimental && maxdepth) { + /* insert attr_tile_name attribute before the attribute used as alphabetical ekey (of type type) */ + if(maxdepth) { struct attr_bin *a=item_bin_get_attr_bin(ib, type, NULL); char *s=g_strdup((char*)(a+1)); item_bin_add_attr_string(ib, attr_tile_name, tilename); @@ -521,16 +521,15 @@ item_bin_sort_compare(const void *p1, const void *p2) struct attr_bin *attr1,*attr2; char *s1,*s2; int ret; - if(experimental) { - attr1=item_bin_get_attr_bin(ib1, attr_tile_name, NULL); - attr2=item_bin_get_attr_bin(ib2, attr_tile_name, NULL); - if(attr1&&attr2) { - s1=(char *)(attr1+1); - s2=(char *)(attr2+1); - ret=strcmp(s1,s2); - if(ret) - return ret; - } + + attr1=item_bin_get_attr_bin(ib1, attr_tile_name, NULL); + attr2=item_bin_get_attr_bin(ib2, attr_tile_name, NULL); + if(attr1&&attr2) { + s1=(char *)(attr1+1); + s2=(char *)(attr2+1); + ret=strcmp(s1,s2); + if(ret) + return ret; } #if 0 dbg_assert(ib1->clen==2); @@ -552,15 +551,14 @@ item_bin_sort_compare(const void *p1, const void *p2) if (ret) return ret; } - if(experimental) { - s1=linguistics_casefold(s1); - s2=linguistics_casefold(s2); - } + + s1=linguistics_casefold(s1); + s2=linguistics_casefold(s2); + ret=strcmp(s1, s2); - if(experimental) { - g_free(s1); - g_free(s2); - } + g_free(s1); + g_free(s2); + if (!ret) { int match1=0,match2=0; match1=(attr1->type == attr_town_name_match || attr1->type == attr_district_name_match); diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index 0e5e88596..b33823aa9 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -1576,7 +1576,7 @@ relation_add_tag(char *k, char *v) } else if (!strcmp(k,"admin_level")) { admin_level=atoi(v); } else if (!strcmp(k,"boundary")) { - if (!strcmp(v,"administrative") || (experimental && !strcmp(v,"postal_code"))) { + if (!strcmp(v,"administrative") || !strcmp(v,"postal_code")) { boundary=1; } } else if (!strcmp(k,"ISO3166-1")) { @@ -1835,7 +1835,7 @@ osm_process_town_by_boundary(GList *bl, struct item_bin *ib, struct coord *c, st l=g_list_next(l); } if (match) { - if (match && match->country && match->country->admin_levels && experimental) { + if (match && match->country && match->country->admin_levels) { l=matches; while (l) { struct boundary *b=l->data; @@ -1953,7 +1953,7 @@ osm_process_towns(FILE *in, FILE *boundaries, FILE *ways) if (attrs[i].type != attr_none) item_bin_add_attr(ib, &attrs[i]); } - item_bin_write_match(ib, attr_town_name, attr_town_name_match, experimental?5:0, result->file); + item_bin_write_match(ib, attr_town_name, attr_town_name_match, 5, result->file); } } } @@ -2724,12 +2724,7 @@ write_countrydir(struct zip_info *zip_info, int max_index_size) struct country_table *co; for (i = 0 ; i < sizeof(country_table)/sizeof(struct country_table) ; i++) { co=&country_table[i]; - if (!experimental && co->size) { - char tilename[32]=""; - snprintf(filename,sizeof(filename),"country_%d.tmp", co->countryid); - tile(&co->r, "", tilename, max, overlap, NULL); - index_country_add(zip_info,co->countryid,NULL,NULL,tilename,filename, co->size, zip_get_index(zip_info)); - } else if(co->size) { + if(co->size) { FILE *in; char countrypart[32]; char partsuffix[32]; |