static void phase34_process_file_range(struct tile_info *info, FILE *in, FILE *reference) { struct item_bin *ib; int min,max; while ((ib=read_item_range(in, &min, &max))) { if (ib->type < 0x80000000) processed_nodes++; else processed_ways++; tile_write_item_minmax(info, ib, reference, min, max); } }
static void ch_copy_to_tiles(char *suffix, int count, struct tile_info *info, FILE *ref) { char name[256]; int i; FILE *f; struct item_bin *item_bin; for (i = count ; i >= 0 ; i--) { sprintf(name,"graph_%d",i); f=tempfile(suffix, name, 0); while ((item_bin = read_item(f))) { tile_write_item_minmax(info, item_bin, ref, i, i); } fclose(f); } }
static void phase34_process_file(struct tile_info *info, FILE *in, FILE *reference) { struct item_bin *ib; int max; while ((ib=read_item(in))) { if (ib->type < 0x80000000) processed_nodes++; else processed_ways++; max=14; switch (ib->type) { case type_town_label_1e7: case type_town_label_5e6: case type_town_label_2e6: case type_town_label_1e6: case type_town_label_5e5: case type_district_label_1e7: case type_district_label_5e6: case type_district_label_2e6: case type_district_label_1e6: case type_district_label_5e5: max=6; break; case type_town_label_2e5: case type_town_label_1e5: case type_district_label_2e5: case type_district_label_1e5: case type_street_n_lanes: case type_highway_city: case type_highway_land: case type_ramp: max=8; break; case type_town_label_5e4: case type_town_label_2e4: case type_town_label_1e4: case type_district_label_5e4: case type_district_label_2e4: case type_district_label_1e4: max=9; break; case type_street_4_land: case type_street_4_city: max=10; break; case type_town_label_5e3: case type_town_label_2e3: case type_town_label_1e3: case type_district_label_5e3: case type_district_label_2e3: case type_district_label_1e3: case type_street_3_city: case type_street_3_land: max=12; break; default: break; } tile_write_item_minmax(info, ib, reference, 0, max); } }