navit
0.5.3-trunk
|
#include <math.h>
#include <stdlib.h>
#include "maptool.h"
#include "coord.h"
#include "file.h"
#include "debug.h"
Data Structures | |
struct | ch_edge |
struct | node |
struct | edge |
struct | newnode |
struct | edge_hash_item |
Functions | |
static int | road_speed (enum item_type type) |
static void | coord_slice_free (void *data) |
static GHashTable * | coord_hash_new (void) |
static void | item_id_slice_free (void *data) |
static void | add_node_to_hash (FILE *idx, GHashTable *hash, struct coord *c, int *nodes) |
static void | edge_hash_slice_free (void *data) |
static guint | edge_hash_hash (gconstpointer key) |
static gboolean | edge_hash_equal (gconstpointer a, gconstpointer b) |
static void | ch_generate_ddsg (FILE *in, FILE *ref, FILE *idx, FILE *ddsg) |
static void | ch_generate_sgr (char *suffix) |
static void | ch_process_node (FILE *out, int node, int resolve) |
static void | ch_process_nodes (FILE *out, int pos, int count, int resolve) |
static void | ch_process (FILE **files, int depth, int resolve) |
static void | ch_setup (char *suffix) |
static void | ch_create_tempfiles (char *suffix, FILE **files, int count, int mode) |
static void | ch_close_tempfiles (FILE **files, int count) |
static void | ch_copy_to_tiles (char *suffix, int count, struct tile_info *info, FILE *ref) |
void | ch_generate_tiles (char *map_suffix, char *suffix, FILE *tilesdir_out, struct zip_info *zip_info) |
void | ch_assemble_map (char *map_suffix, char *suffix, struct zip_info *zip_info) |
Variables | |
struct node * | nodes |
int | node_count |
struct edge * | edges |
int | edge_count |
struct newnode * | newnodes |
int | newnode_count |
GHashTable * | newnode_hash |
GHashTable * | edge_hash |
struct file * | sgr |
struct file * | ddsg_node_index |
struct coord * | node_index |
GHashTable * | sgr_nodes_hash |
static int | ch_levels =14 |
|
static |
Referenced by ch_generate_ddsg().
void ch_assemble_map | ( | char * | map_suffix, |
char * | suffix, | ||
struct zip_info * | zip_info | ||
) |
References ch_close_tempfiles(), ch_copy_to_tiles(), ch_create_tempfiles(), ch_levels, ch_process(), ch_setup(), create_tile_hash(), edge_hash, exit, info, item_id_slice_free(), tile_head::name, newnode_hash, tile_head::next, nodeid, tile_head::process, sgr_nodes_hash, suffix, tempfile(), tile_head_root, tile_head::total_size, tile_head::total_size_used, write_tilesdir(), write_zipmember(), tile_head::zip_data, zip_get_index(), and zip_get_maxnamelen().
Referenced by maptool_assemble_map().
|
static |
Referenced by ch_assemble_map(), and ch_generate_tiles().
|
static |
References info, name, read_item(), tempfile(), and tile_write_item_minmax().
Referenced by ch_assemble_map(), and ch_generate_tiles().
|
static |
References name, and tempfile().
Referenced by ch_assemble_map(), and ch_generate_tiles().
|
static |
References add_node_to_hash(), c, item_bin::clen, coord_hash_new(), dbg, dbg_assert, edge_hash, edge_hash_equal(), edge_hash_hash(), edge_hash_slice_free(), edges, edge_hash_item::first, item_id_slice_free(), edge_hash_item::last, lvl_warning, nodes, read_item(), road_speed(), sq, and item_bin::type.
Referenced by ch_generate_tiles().
|
static |
References command(), dbg, and lvl_warning.
Referenced by ch_generate_tiles().
void ch_generate_tiles | ( | char * | map_suffix, |
char * | suffix, | ||
FILE * | tilesdir_out, | ||
struct zip_info * | zip_info | ||
) |
References ch_close_tempfiles(), ch_copy_to_tiles(), ch_create_tempfiles(), ch_generate_ddsg(), ch_generate_sgr(), ch_levels, ch_process(), ch_setup(), info, merge_tiles(), suffix, tempfile(), tile_hash, tile_info::tilesdir_out, and write_tilesdir().
Referenced by maptool_generate_tiles().
|
static |
References ch_process_nodes(), newnode_count, startup::pos, and resolve().
Referenced by ch_assemble_map(), and ch_generate_tiles().
|
static |
References dbg_assert, edge_hash, edges, exit, edge_hash_item::first, node::first_edge, ch_edge::flags, edge::flags, init_item(), item_bin_add_attr_data(), item_bin_add_coord(), item_bin_write(), edge_hash_item::last, ch_edge::middle, newnode_hash, node_index, nodes, resolve(), edge::scmiddle, sgr_nodes_hash, edge::target, ch_edge::weight, and edge::weight.
Referenced by ch_process_nodes().
|
static |
References ch_process_node(), newnode_count, startup::pos, and resolve().
Referenced by ch_process().
|
static |
References data, dbg_assert, ddsg_node_index, edge_count, edges, file_create(), file_data_read(), file_mmap(), file_size(), filename, newnode_count, newnode_hash, newnodes, node_count, node_index, nodes, offset, sgr, size, and tempfile_name().
Referenced by ch_assemble_map(), and ch_generate_tiles().
|
static |
References coord_equal(), coord_hash(), and coord_slice_free().
Referenced by ch_generate_ddsg().
|
static |
References data.
Referenced by coord_hash_new().
|
static |
References edge_hash_item::first, and edge_hash_item::last.
Referenced by ch_generate_ddsg().
|
static |
References edge_hash_item::first, key, and edge_hash_item::last.
Referenced by ch_generate_ddsg().
|
static |
References data.
Referenced by ch_generate_ddsg().
|
static |
References data.
Referenced by ch_assemble_map(), and ch_generate_ddsg().
|
static |
References type.
Referenced by ch_generate_ddsg().
|
static |
Referenced by ch_assemble_map(), and ch_generate_tiles().
struct file * ddsg_node_index |
Referenced by ch_setup().
int edge_count |
Referenced by ch_setup().
GHashTable* edge_hash |
Referenced by ch_assemble_map(), ch_generate_ddsg(), and ch_process_node().
struct edge * edges |
int newnode_count |
Referenced by ch_process(), ch_process_nodes(), and ch_setup().
GHashTable* newnode_hash |
Referenced by ch_assemble_map(), ch_process_node(), and ch_setup().
struct newnode * newnodes |
Referenced by ch_setup().
int node_count |
Referenced by ch_setup(), and node_item_find_index_in_ordered_list().
struct coord* node_index |
Referenced by ch_process_node(), and ch_setup().
struct node * nodes |
struct file* sgr |
Referenced by ch_setup().
GHashTable* sgr_nodes_hash |
Referenced by ch_assemble_map(), and ch_process_node().