summaryrefslogtreecommitdiff
path: root/navit/maptool/maptool.c
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-07-07 14:27:36 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-07-07 14:27:36 +0000
commit8a5c364432b744c3c709e8e601c40bde82256eb0 (patch)
tree9931dfb9b70a149064cebcd642925e96487d73c4 /navit/maptool/maptool.c
parent043323193725338ac03f0fd8a384d7c4c79cb17c (diff)
downloadnavit-8a5c364432b744c3c709e8e601c40bde82256eb0.tar.gz
Add:maptool:Write OSM data from addr:interpolation to binfile.|Part of #1177.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5804 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/maptool/maptool.c')
-rw-r--r--navit/maptool/maptool.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/navit/maptool/maptool.c b/navit/maptool/maptool.c
index 067c82898..b3968b6fe 100644
--- a/navit/maptool/maptool.c
+++ b/navit/maptool/maptool.c
@@ -951,6 +951,43 @@ int main(int argc, char **argv)
tempfile_unlink(suffix,"associated_streets");
}
}
+ // FIXME: c&p
+ if (p.process_relations && p.process_ways && p.process_nodes && start_phase(&p,"processing house number interpolations")) {
+ FILE *ways_in=tempfile(suffix,"ways_split",0);
+ FILE *ways_out=tempfile(suffix,"ways_split_hn_interpol",1);
+ FILE *nodes_in=tempfile(suffix,"nodes",0);
+ FILE *nodes_out=tempfile(suffix,"nodes_hn_interpol",1);
+ FILE *nodes2_in=NULL;
+ FILE *nodes2_out=NULL;
+ if(p.osm.line2poi) {
+ nodes2_in=tempfile(suffix,"way2poi_result",0);
+ nodes2_out=tempfile(suffix,"way2poi_result_hn_interpol",1);
+ }
+ p.osm.house_number_interpolations=tempfile(suffix,"house_number_interpolations",0);
+
+ process_house_number_interpolations(p.osm.house_number_interpolations, ways_in, ways_out, nodes_in, nodes_out, nodes2_in, nodes2_out);
+ fclose(ways_in);
+ fclose(nodes_in);
+ fclose(ways_out);
+ fclose(nodes_out);
+ fclose(p.osm.house_number_interpolations);
+ tempfile_rename(suffix,"ways_split","ways_split_pre_hn_interpol");
+ tempfile_rename(suffix,"nodes","nodes_pre_hn_interpol");
+ tempfile_rename(suffix,"ways_split_hn_interpol","ways_split");
+ tempfile_rename(suffix,"nodes_hn_interpol","nodes");
+ if(p.osm.line2poi) {
+ fclose(nodes2_in);
+ fclose(nodes2_out);
+ tempfile_rename(suffix,"way2poi_result","way2poi_result_pre_hn_interpol");
+ tempfile_rename(suffix,"way2poi_result_hn_interpol","way2poi_result");
+ }
+ tempfile_unlink(suffix,"ways_split_pre_hn_interpol");
+ tempfile_unlink(suffix,"nodes_pre_hn_interpol");
+ tempfile_unlink(suffix,"way2poi_result_pre_hn_interpol");
+ if(!p.keep_tmpfiles) {
+ tempfile_unlink(suffix,"house_number_interpolations");
+ }
+ }
if (p.output == 1 && start_phase(&p,"dumping")) {
maptool_dump(&p, suffix);
exit(0);