summaryrefslogtreecommitdiff
path: root/navit/maptool
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-07-17 20:19:42 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-07-17 20:19:42 +0000
commit283b4f57a4f6c20d8785a201437c5f995e270507 (patch)
tree904ce34539582632929908cddd579a9d80a20ad1 /navit/maptool
parentdc378d9c184bb1fdaea2e982fe25be9263fdcdfb (diff)
downloadnavit-283b4f57a4f6c20d8785a201437c5f995e270507.tar.gz
Refactor:maptool:Better function names.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5814 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/maptool')
-rw-r--r--navit/maptool/maptool.c14
-rw-r--r--navit/maptool/maptool.h2
-rw-r--r--navit/maptool/osm.c12
3 files changed, 14 insertions, 14 deletions
diff --git a/navit/maptool/maptool.c b/navit/maptool/maptool.c
index ec800db56..def9ec689 100644
--- a/navit/maptool/maptool.c
+++ b/navit/maptool/maptool.c
@@ -453,7 +453,7 @@ start_phase(struct maptool_params *p, char *str)
}
static void
-osm_collect_data(struct maptool_params *p, char *suffix)
+osm_read_input_data(struct maptool_params *p, char *suffix)
{
unlink("coords.tmp");
if (p->process_ways)
@@ -563,7 +563,7 @@ osm_count_references(struct maptool_params *p, char *suffix, int clear)
static void
-osm_find_intersections(struct maptool_params *p, char *suffix)
+osm_resolve_coords_and_split_at_intersections(struct maptool_params *p, char *suffix)
{
FILE *ways, *ways_split, *ways_split_index, *graph, *coastline;
int i;
@@ -577,7 +577,7 @@ osm_find_intersections(struct maptool_params *p, char *suffix)
coastline=tempfile(suffix,"coastline",1);
if (i)
load_buffer("coords.tmp",&node_buffer, i*slice_size, slice_size);
- map_find_intersections(ways,ways_split,ways_split_index,graph,coastline,final);
+ map_resolve_coords_and_split_at_intersections(ways,ways_split,ways_split_index,graph,coastline,final);
fclose(ways_split);
if (ways_split_index)
fclose(ways_split_index);
@@ -884,8 +884,8 @@ int main(int argc, char **argv)
// input from an OSM file
if (p.input == 0) {
- if (start_phase(&p, "collecting data")) {
- osm_collect_data(&p, suffix);
+ if (start_phase(&p, "reading input data")) {
+ osm_read_input_data(&p, suffix);
p.node_table_loaded=1;
}
if (start_phase(&p, "counting references and resolving ways")) {
@@ -895,10 +895,10 @@ int main(int argc, char **argv)
if (start_phase(&p,"converting ways to pois")) {
osm_process_way2poi(&p, suffix);
}
- if (start_phase(&p,"finding intersections")) {
+ if (start_phase(&p,"splitting at intersections")) {
if (p.process_ways) {
maptool_load_node_table(&p,0);
- osm_find_intersections(&p, suffix);
+ osm_resolve_coords_and_split_at_intersections(&p, suffix);
}
}
free(node_buffer.base);
diff --git a/navit/maptool/maptool.h b/navit/maptool/maptool.h
index 0fd8fc524..af1501f0a 100644
--- a/navit/maptool/maptool.h
+++ b/navit/maptool/maptool.h
@@ -310,7 +310,7 @@ unsigned long long item_bin_get_wayid(struct item_bin *ib);
unsigned long long item_bin_get_relationid(struct item_bin *ib);
FILE *resolve_ways_file(FILE *in, char *suffix, char *filename);
void process_way2poi(FILE *in, FILE *out, int type);
-int map_find_intersections(FILE *in, FILE *out, FILE *out_index, FILE *out_graph, FILE *out_coastline, int final);
+int map_resolve_coords_and_split_at_intersections(FILE *in, FILE *out, FILE *out_index, FILE *out_graph, FILE *out_coastline, int final);
void write_countrydir(struct zip_info *zip_info, int max_index_size);
void osm_process_towns(FILE *in, FILE *boundaries, FILE *ways, char *suffix);
void load_countries(void);
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c
index 8005ee9f9..157d2ff26 100644
--- a/navit/maptool/osm.c
+++ b/navit/maptool/osm.c
@@ -2927,7 +2927,7 @@ osm_add_nd(osmid ref)
}
static void
-write_item_part(FILE *out, FILE *out_index, FILE *out_graph, struct item_bin *orig, int first, int last, long long *last_id)
+write_item_way_subsection(FILE *out, FILE *out_index, FILE *out_graph, struct item_bin *orig, int first, int last, long long *last_id)
{
struct item_bin new;
struct coord *c=(struct coord *)(orig+1);
@@ -3047,14 +3047,14 @@ process_way2poi(FILE *in, FILE *out, int type)
geom_line_middle(c,count,&c1);
c[0]=c1;
}
- write_item_part(out, NULL, NULL, ib, 0, 0, NULL);
+ write_item_way_subsection(out, NULL, NULL, ib, 0, 0, NULL);
}
}
}
int
-map_find_intersections(FILE *in, FILE *out, FILE *out_index, FILE *out_graph, FILE *out_coastline, int final)
+map_resolve_coords_and_split_at_intersections(FILE *in, FILE *out, FILE *out_index, FILE *out_graph, FILE *out_coastline, int final)
{
struct coord *c;
int i,ccount,last,remaining;
@@ -3081,7 +3081,7 @@ map_find_intersections(FILE *in, FILE *out, FILE *out_index, FILE *out_graph, FI
if (ni) {
c[i]=ni->c;
if (ni->ref_way > 1 && i != 0 && i != ccount-1 && i != last && item_get_default_flags(ib->type)) {
- write_item_part(out, out_index, out_graph, ib, last, i, &last_id);
+ write_item_way_subsection(out, out_index, out_graph, ib, last, i, &last_id);
last=i;
}
} else if (final) {
@@ -3097,9 +3097,9 @@ map_find_intersections(FILE *in, FILE *out, FILE *out_index, FILE *out_graph, FI
}
}
if (ccount) {
- write_item_part(out, out_index, out_graph, ib, last, ccount-1, &last_id);
+ write_item_way_subsection(out, out_index, out_graph, ib, last, ccount-1, &last_id);
if (final && ib->type == type_water_line && out_coastline) {
- write_item_part(out_coastline, NULL, NULL, ib, last, ccount-1, NULL);
+ write_item_way_subsection(out_coastline, NULL, NULL, ib, last, ccount-1, NULL);
}
}
}