summaryrefslogtreecommitdiff
path: root/navit/maptool
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-07-07 14:26:45 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-07-07 14:26:45 +0000
commitc98c4d49794fdc258b4aba2210e56ae2f749960a (patch)
tree592b3c74a10d5c2c18f61bca3d07890d89c68467 /navit/maptool
parent838d328ae365da2e561baa127fe85c29d4fdbcf8 (diff)
downloadnavit-svn-c98c4d49794fdc258b4aba2210e56ae2f749960a.tar.gz
Add:maptool:Write addr:interpolation data to temporary file when reading OSM input file.|Part of #1177.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5803 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/maptool')
-rw-r--r--navit/maptool/maptool.c3
-rw-r--r--navit/maptool/maptool.h1
-rw-r--r--navit/maptool/osm.c8
3 files changed, 12 insertions, 0 deletions
diff --git a/navit/maptool/maptool.c b/navit/maptool/maptool.c
index d35994e9..067c8289 100644
--- a/navit/maptool/maptool.c
+++ b/navit/maptool/maptool.c
@@ -442,6 +442,7 @@ osm_collect_data(struct maptool_params *p, char *suffix)
if (p->process_relations) {
p->osm.boundaries=tempfile(suffix,"boundaries",1);
p->osm.associated_streets=tempfile(suffix,"associated_streets",1);
+ p->osm.house_number_interpolations=tempfile(suffix,"house_number_interpolations",1);
}
#ifdef HAVE_POSTGRESQL
if (p->dbstr)
@@ -483,6 +484,8 @@ osm_collect_data(struct maptool_params *p, char *suffix)
fclose(p->osm.turn_restrictions);
if (p->osm.associated_streets)
fclose(p->osm.associated_streets);
+ if (p->osm.house_number_interpolations)
+ fclose(p->osm.house_number_interpolations);
if (p->osm.boundaries)
fclose(p->osm.boundaries);
if (p->osm.poly2poi)
diff --git a/navit/maptool/maptool.h b/navit/maptool/maptool.h
index 22f36b5e..1b7fc5c3 100644
--- a/navit/maptool/maptool.h
+++ b/navit/maptool/maptool.h
@@ -258,6 +258,7 @@ struct maptool_osm {
FILE *boundaries;
FILE *turn_restrictions;
FILE *associated_streets;
+ FILE *house_number_interpolations;
FILE *nodes;
FILE *ways;
FILE *line2poi;
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c
index c7716bbe..eb080192 100644
--- a/navit/maptool/osm.c
+++ b/navit/maptool/osm.c
@@ -1755,6 +1755,14 @@ osm_end_way(struct maptool_osm *osm)
if(i>0)
item_bin_add_attr_int(item_bin, attr_duplicate, 1);
item_bin_write(item_bin,osm->ways);
+
+ if (types[i]>=type_house_number_interpolation_even && types[i]<=type_house_number_interpolation_alphabetic){
+ struct item_bin *item_bin_interpolation_way=init_item(types[i]);
+ item_bin_add_attr_longlong(item_bin, attr_osm_wayid, osmid_attr_value);
+ item_bin_add_attr_longlong(item_bin, attr_osm_nodeid_first_node, GET_REF(coord_buffer[0]));
+ item_bin_add_attr_longlong(item_bin, attr_osm_nodeid_last_node, GET_REF(coord_buffer[coord_count-1]));
+ item_bin_write(item_bin_interpolation_way, osm->house_number_interpolations);
+ }
}
if(osm->line2poi) {
count=attr_longest_match(attr_mapping_way2poi, attr_mapping_way2poi_count, types, sizeof(types)/sizeof(enum item_type));