navit  0.5.3-trunk
ch.c File Reference
#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 nodenodes
 
int node_count
 
struct edgeedges
 
int edge_count
 
struct newnodenewnodes
 
int newnode_count
 
GHashTable * newnode_hash
 
GHashTable * edge_hash
 
struct filesgr
 
struct fileddsg_node_index
 
struct coordnode_index
 
GHashTable * sgr_nodes_hash
 
static int ch_levels =14
 

Function Documentation

◆ add_node_to_hash()

static void add_node_to_hash ( FILE *  idx,
GHashTable *  hash,
struct coord c,
int *  nodes 
)
static

References c, and nodes.

Referenced by ch_generate_ddsg().

◆ ch_assemble_map()

◆ ch_close_tempfiles()

static void ch_close_tempfiles ( FILE **  files,
int  count 
)
static

◆ ch_copy_to_tiles()

static void ch_copy_to_tiles ( char *  suffix,
int  count,
struct tile_info info,
FILE *  ref 
)
static

◆ ch_create_tempfiles()

static void ch_create_tempfiles ( char *  suffix,
FILE **  files,
int  count,
int  mode 
)
static

References name, and tempfile().

Referenced by ch_assemble_map(), and ch_generate_tiles().

◆ ch_generate_ddsg()

◆ ch_generate_sgr()

static void ch_generate_sgr ( char *  suffix)
static

References command(), dbg, and lvl_warning.

Referenced by ch_generate_tiles().

◆ ch_generate_tiles()

void ch_generate_tiles ( char *  map_suffix,
char *  suffix,
FILE *  tilesdir_out,
struct zip_info zip_info 
)

◆ ch_process()

static void ch_process ( FILE **  files,
int  depth,
int  resolve 
)
static

◆ ch_process_node()

◆ ch_process_nodes()

static void ch_process_nodes ( FILE *  out,
int  pos,
int  count,
int  resolve 
)
static

◆ ch_setup()

◆ coord_hash_new()

static GHashTable* coord_hash_new ( void  )
static

◆ coord_slice_free()

static void coord_slice_free ( void *  data)
static

References data.

Referenced by coord_hash_new().

◆ edge_hash_equal()

static gboolean edge_hash_equal ( gconstpointer  a,
gconstpointer  b 
)
static

◆ edge_hash_hash()

static guint edge_hash_hash ( gconstpointer  key)
static

◆ edge_hash_slice_free()

static void edge_hash_slice_free ( void *  data)
static

References data.

Referenced by ch_generate_ddsg().

◆ item_id_slice_free()

static void item_id_slice_free ( void *  data)
static

References data.

Referenced by ch_assemble_map(), and ch_generate_ddsg().

◆ road_speed()

static int road_speed ( enum item_type  type)
static

References type.

Referenced by ch_generate_ddsg().

Variable Documentation

◆ ch_levels

int ch_levels =14
static

◆ ddsg_node_index

struct file * ddsg_node_index

Referenced by ch_setup().

◆ edge_count

int edge_count

Referenced by ch_setup().

◆ edge_hash

GHashTable* edge_hash

◆ edges

◆ newnode_count

int newnode_count

◆ newnode_hash

GHashTable* newnode_hash

◆ newnodes

struct newnode * newnodes

Referenced by ch_setup().

◆ node_count

int node_count

◆ node_index

struct coord* node_index

Referenced by ch_process_node(), and ch_setup().

◆ nodes

◆ sgr

struct file* sgr

Referenced by ch_setup().

◆ sgr_nodes_hash

GHashTable* sgr_nodes_hash

Referenced by ch_assemble_map(), and ch_process_node().