navit  0.5.3-trunk
maptool.h File Reference
#include "config.h"
#include <glib.h>
#include "coord.h"
#include "item.h"
#include "attr.h"
#include "geom.h"
#include "types.h"

Go to the source code of this file.

Data Structures

struct  tile_data
 
struct  tile_parameter
 
struct  tile_info
 
struct  tile_head
 
struct  item_bin
 
struct  attr_bin
 
struct  item_bin_sink_func
 
struct  item_bin_sink
 
struct  node_item
 
struct  files_relation_processing
 
struct  boundary
 
struct  buffer
 
struct  maptool_osm
 
struct  aux_tile
 
struct  maptool_force_64
 

Macros

#define sq(x)   ((double)(x)*(x))
 
#define BUFFER_SIZE   1280
 
#define debug_tile(x)   0
 
#define debug_itembin(x)   0
 
#define RELATION_MEMBER_PRINT_FORMAT   "%d:"LONGLONG_FMT":%s"
 
#define RELATION_MEMBER_PARSE_FORMAT   "%d:"LONGLONG_FMT":%n"
 
#define NODE_ID_BITS   56
 
#define OSMID_FMT   ULONGLONG_FMT
 

Typedefs

typedef unsigned long long int osmid
 

Enumerations

enum  relation_member_type { UNUSED , rel_member_node , rel_member_way , rel_member_relation }
 

Functions

char * osm_tag_value (struct item_bin *ib, char *key)
 
osmid boundary_relid (struct boundary *b)
 
GListprocess_boundaries (FILE *boundaries, FILE *ways)
 
GListboundary_find_matches (GList *bl, struct coord *c)
 
void free_boundaries (GList *l)
 
void save_buffer (char *filename, struct buffer *b, long long offset)
 Saves a buffer to a file. More...
 
int load_buffer (char *filename, struct buffer *b, long long offset, long long size)
 Loads a buffer from a file. More...
 
long long sizeof_buffer (char *filename)
 Determines size of buffer for file. More...
 
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)
 
void process_coastlines (FILE *in, FILE *out)
 
int item_bin_read (struct item_bin *ib, FILE *in)
 
void item_bin_set_type (struct item_bin *ib, enum item_type type)
 
void item_bin_init (struct item_bin *ib, enum item_type type)
 
void item_bin_add_coord (struct item_bin *ib, struct coord *c, int count)
 
void item_bin_add_coord_reverse (struct item_bin *ib, struct coord *c, int count)
 
void item_bin_bbox (struct item_bin *ib, struct rect *r)
 
void item_bin_copy_coord (struct item_bin *ib, struct item_bin *from, int dir)
 
void item_bin_copy_attr (struct item_bin *ib, struct item_bin *from, enum attr_type attr)
 
void item_bin_add_coord_rect (struct item_bin *ib, struct rect *r)
 
int attr_bin_write_data (struct attr_bin *ab, enum attr_type type, void *data, int size)
 
int attr_bin_write_attr (struct attr_bin *ab, struct attr *attr)
 
void item_bin_add_attr_data (struct item_bin *ib, enum attr_type type, void *data, int size)
 
void item_bin_add_attr (struct item_bin *ib, struct attr *attr)
 
void item_bin_add_attr_int (struct item_bin *ib, enum attr_type type, int val)
 
void * item_bin_get_attr (struct item_bin *ib, enum attr_type type, void *last)
 
struct attr_binitem_bin_get_attr_bin (struct item_bin *ib, enum attr_type type, void *last)
 
struct attr_binitem_bin_get_attr_bin_last (struct item_bin *ib)
 
void item_bin_add_attr_longlong (struct item_bin *ib, enum attr_type type, long long val)
 
void item_bin_add_attr_string (struct item_bin *ib, enum attr_type type, char *str)
 
void item_bin_add_hole (struct item_bin *ib, struct coord *coord, int ccount)
 add a "hole" to an item More...
 
void item_bin_add_attr_range (struct item_bin *ib, enum attr_type type, short min, short max)
 
void item_bin_remove_attr (struct item_bin *ib, void *ptr)
 
void item_bin_write (struct item_bin *ib, FILE *out)
 
struct item_binitem_bin_dup (struct item_bin *ib)
 
void item_bin_write_clipped (struct item_bin *ib, struct tile_parameter *param, struct item_bin_sink *out)
 
void item_bin_dump (struct item_bin *ib, FILE *out)
 
void dump_itembin (struct item_bin *ib)
 
void item_bin_set_type_by_population (struct item_bin *ib, int population)
 
void item_bin_write_match (struct item_bin *ib, enum attr_type type, enum attr_type match, int maxdepth, FILE *out)
 
int item_bin_sort_file (char *in_file, char *out_file, struct rect *r, int *size)
 
void clip_line (struct item_bin *ib, struct rect *r, struct tile_parameter *param, struct item_bin_sink *out)
 
void clip_polygon (struct item_bin *ib, struct rect *r, struct tile_parameter *param, struct item_bin_sink *out)
 
struct geom_poly_segmentitem_bin_to_poly_segment (struct item_bin *ib, int type)
 
struct node_itemread_node_item (FILE *in)
 
struct item_binread_item (FILE *in)
 
struct item_binread_item_range (FILE *in, int *min, int *max)
 
struct item_bininit_item (enum item_type type)
 
void itembin_nicer_slicer (struct tile_info *info, struct item_bin *ib, FILE *reference, char *buffer, int min)
 
void sig_alrm (int sig)
 
void sig_alrm_end (void)
 
void bbox_extend (struct coord *c, struct rect *r)
 
void bbox (struct coord *c, int count, struct rect *r)
 
int contains_bbox (int xl, int yl, int xh, int yh, struct rect *r)
 
int bbox_contains_coord (struct rect *r, struct coord *c)
 
int bbox_contains_bbox (struct rect *out, struct rect *in)
 
long long bbox_area (struct rect const *r)
 
void phase1_map (GList *maps, FILE *out_ways, FILE *out_nodes)
 
void dump (FILE *in)
 
int phase4 (FILE **in, int in_count, int with_range, char *suffix, FILE *tilesdir_out, struct zip_info *zip_info)
 
int phase5 (FILE **in, FILE **references, int in_count, int with_range, char *suffix, struct zip_info *zip_info)
 
void process_binfile (FILE *in, FILE *out)
 
void add_aux_tiles (char *name, struct zip_info *info)
 
void cat (FILE *in, FILE *out)
 
int item_order_by_type (enum item_type type)
 
void osm_warning (char *type, osmid id, int cont, char *fmt,...)
 
void osm_info (char *type, osmid id, int cont, char *fmt,...)
 
void osm_add_tag (char *k, char *v)
 
void osm_add_node (osmid id, double lat, double lon)
 
void osm_add_way (osmid id)
 
void osm_add_relation (osmid id)
 
void osm_end_relation (struct maptool_osm *osm)
 
void osm_add_member (enum relation_member_type type, osmid ref, char *role)
 
void osm_end_way (struct maptool_osm *osm)
 
void osm_end_node (struct maptool_osm *osm)
 
void osm_add_nd (osmid ref)
 
osmid item_bin_get_id (struct item_bin *ib)
 
void flush_nodes (int final)
 
void sort_countries (int keep_tmpfiles)
 
void process_associated_streets (FILE *in, struct files_relation_processing *files_relproc)
 
void process_house_number_interpolations (FILE *in, struct files_relation_processing *files_relproc)
 
void process_multipolygons (FILE *in, FILE *coords, FILE *ways, FILE *ways_index, FILE *out)
 
void process_turn_restrictions (FILE *in, FILE *coords, FILE *ways, FILE *ways_index, FILE *out)
 
void process_turn_restrictions_old (FILE *in, FILE *coords, FILE *ways, FILE *ways_index, FILE *out)
 
void clear_node_item_buffer (void)
 
void ref_ways (FILE *in)
 
void resolve_ways (FILE *in, FILE *out)
 
unsigned long long item_bin_get_nodeid (struct item_bin *ib)
 
unsigned long long item_bin_get_wayid (struct item_bin *ib)
 
unsigned long long item_bin_get_relationid (struct item_bin *ib)
 
void process_way2poi (FILE *in, FILE *out, int type)
 
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)
 
void remove_countryfiles (void)
 
struct country_tablecountry_from_iso2 (char *iso)
 
void osm_init (FILE *)
 
int map_collect_data_osm_o5m (FILE *in, struct maptool_osm *osm)
 
int map_collect_data_osm_db (char *dbstr, struct maptool_osm *osm)
 
int map_collect_data_osm_protobuf (FILE *in, struct maptool_osm *osm)
 
int osm_protobufdb_load (FILE *in, char *dir)
 
struct relationsrelations_new (void)
 
struct relations_funcrelations_func_new (void(*func)(void *func_priv, void *relation_priv, struct item_bin *member, void *member_priv), void *func_priv)
 
void relations_add_relation_member_entry (struct relations *rel, struct relations_func *func, void *relation_priv, void *member_priv, enum relation_member_type type, osmid id)
 
void relations_add_relation_default_entry (struct relations *rel, struct relations_func *func)
 
void relations_process (struct relations *rel, FILE *nodes, FILE *ways)
 
void relations_process_multi (struct relations **rel, int count, FILE *nodes, FILE *ways)
 
void relations_destroy (struct relations *rel)
 
int osm_xml_get_attribute (char *xml, char *attribute, char *buffer, int buffer_size)
 
void osm_xml_decode_entities (char *buffer)
 
int map_collect_data_osm (FILE *in, struct maptool_osm *osm)
 
struct item_bin_sinkitem_bin_sink_new (void)
 
struct item_bin_sink_funcitem_bin_sink_func_new (int(*func)(struct item_bin_sink_func *func, struct item_bin *ib, struct tile_data *tile_data))
 
void item_bin_sink_func_destroy (struct item_bin_sink_func *func)
 
void item_bin_sink_add_func (struct item_bin_sink *sink, struct item_bin_sink_func *func)
 
void item_bin_sink_destroy (struct item_bin_sink *sink)
 
int item_bin_write_to_sink (struct item_bin *ib, struct item_bin_sink *sink, struct tile_data *tile_data)
 
struct item_bin_sinkfile_reader_new (FILE *in, int limit, int offset)
 
int file_reader_finish (struct item_bin_sink *sink)
 
int file_writer_process (struct item_bin_sink_func *func, struct item_bin *ib, struct tile_data *tile_data)
 
struct item_bin_sink_funcfile_writer_new (FILE *out)
 
int file_writer_finish (struct item_bin_sink_func *file_writer)
 
int tile_collector_process (struct item_bin_sink_func *tile_collector, struct item_bin *ib, struct tile_data *tile_data)
 
struct item_bin_sink_functile_collector_new (struct item_bin_sink *out)
 
char * tempfile_name (char *suffix, char *name)
 
FILE * tempfile (char *suffix, char *name, int mode)
 
void tempfile_unlink (char *suffix, char *name)
 
void tempfile_rename (char *suffix, char *from, char *to)
 
int tile (struct rect *r, char *suffix, char *ret, int max, int overlap, struct rect *tr)
 
void tile_bbox (char *tile, struct rect *r, int overlap)
 
int tile_len (char *tile)
 
void load_tilesdir (FILE *in)
 
void tile_write_item_to_tile (struct tile_info *info, struct item_bin *ib, FILE *reference, char *name)
 
void tile_write_item_minmax (struct tile_info *info, struct item_bin *ib, FILE *reference, int min, int max)
 
int add_aux_tile (struct zip_info *zip_info, char *name, char *filename, int size)
 
int write_aux_tiles (struct zip_info *zip_info)
 
int create_tile_hash (void)
 
void write_tilesdir (struct tile_info *info, struct zip_info *zip_info, FILE *out)
 
void merge_tiles (struct tile_info *info)
 
void index_init (struct zip_info *info, int version)
 
void index_submap_add (struct tile_info *info, struct tile_head *th)
 
void write_zipmember (struct zip_info *zip_info, char *name, int filelen, char *data, int data_size)
 
int zip_write_index (struct zip_info *info)
 
int zip_write_directory (struct zip_info *info)
 
struct zip_infozip_new (void)
 
void zip_set_zip64 (struct zip_info *info, int on)
 
void zip_set_compression_level (struct zip_info *info, int level)
 
void zip_set_maxnamelen (struct zip_info *info, int max)
 
int zip_get_maxnamelen (struct zip_info *info)
 
int zip_add_member (struct zip_info *info)
 
int zip_set_timestamp (struct zip_info *info, char *timestamp)
 
int zip_open (struct zip_info *info, char *out, char *dir, char *index)
 
FILE * zip_get_index (struct zip_info *info)
 
int zip_get_zipnum (struct zip_info *info)
 
void zip_set_zipnum (struct zip_info *info, int num)
 
void zip_close (struct zip_info *info)
 
void zip_destroy (struct zip_info *info)
 
int process_multipolygons_find_loops (osmid relid, int in_count, struct item_bin **parts, int **scount, int ***sequences, int **direction)
 
int process_multipolygons_loop_dump (struct item_bin **bin, int scount, int *sequence, int *direction, struct coord *buffer)
 
int process_multipolygons_loop_count (struct item_bin **bin, int scount, int *sequence)
 get number of coordinates inside a sequence calculated by process_multipolygon_find_loop More...
 

Variables

struct tile_headtile_head_root
 
struct item_bintmp_item_bin
 
long long slice_size
 
int thread_count
 
int attr_debug_level
 
char * suffix
 
int ignore_unknown
 
GHashTable * dedupe_ways_hash
 
int slices
 
struct buffer node_buffer
 
int processed_nodes
 
int processed_nodes_out
 
int processed_ways
 
int processed_relations
 
int processed_tiles
 
int bytes_read
 
int overlap
 
int unknown_country
 
int experimental
 
struct rect world_bbox
 
GHashTable * tile_hash
 
GHashTable * tile_hash2
 
GListaux_tile_list
 
struct attr map_information_attrs [32]
 

Macro Definition Documentation

◆ BUFFER_SIZE

#define BUFFER_SIZE   1280

◆ debug_itembin

#define debug_itembin (   x)    0

◆ debug_tile

#define debug_tile (   x)    0

◆ NODE_ID_BITS

#define NODE_ID_BITS   56

◆ OSMID_FMT

#define OSMID_FMT   ULONGLONG_FMT

◆ RELATION_MEMBER_PARSE_FORMAT

#define RELATION_MEMBER_PARSE_FORMAT   "%d:"LONGLONG_FMT":%n"

◆ RELATION_MEMBER_PRINT_FORMAT

#define RELATION_MEMBER_PRINT_FORMAT   "%d:"LONGLONG_FMT":%s"

◆ sq

#define sq (   x)    ((double)(x)*(x))

Typedef Documentation

◆ osmid

typedef unsigned long long int osmid

Data type for the ID of an OSM element (node/way/relation). Must be at least 64 bit wide because IDs will soon exceed 32 bit.

Enumeration Type Documentation

◆ relation_member_type

Type of a relation member.

Enumerator
UNUSED 
rel_member_node 
rel_member_way 
rel_member_relation 

Function Documentation

◆ add_aux_tile()

int add_aux_tile ( struct zip_info zip_info,
char *  name,
char *  filename,
int  size 
)

◆ add_aux_tiles()

void add_aux_tiles ( char *  name,
struct zip_info info 
)

References add_aux_tile(), info, and name.

Referenced by maptool_assemble_map().

◆ attr_bin_write_attr()

int attr_bin_write_attr ( struct attr_bin ab,
struct attr attr 
)

◆ attr_bin_write_data()

int attr_bin_write_data ( struct attr_bin ab,
enum attr_type  type,
void *  data,
int  size 
)

◆ bbox()

◆ bbox_area()

long long bbox_area ( struct rect const *  r)

References rect::h, coord::x, and coord::y.

◆ bbox_contains_bbox()

int bbox_contains_bbox ( struct rect out,
struct rect in 
)

References rect::h, coord::x, and coord::y.

Referenced by process_boundaries_insert().

◆ bbox_contains_coord()

int bbox_contains_coord ( struct rect r,
struct coord c 
)

◆ bbox_extend()

◆ boundary_find_matches()

◆ boundary_relid()

osmid boundary_relid ( struct boundary b)

◆ cat()

void cat ( FILE *  in,
FILE *  out 
)

◆ ch_assemble_map()

◆ ch_generate_tiles()

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

◆ clear_node_item_buffer()

void clear_node_item_buffer ( void  )

◆ clip_line()

◆ clip_polygon()

void clip_polygon ( struct item_bin ib,
struct rect r,
struct tile_parameter param,
struct item_bin_sink out 
)

Referenced by item_bin_write_clipped().

◆ contains_bbox()

int contains_bbox ( int  xl,
int  yl,
int  xh,
int  yh,
struct rect r 
)

References rect::h, coord::x, and coord::y.

Referenced by tile().

◆ country_from_iso2()

struct country_table* country_from_iso2 ( char *  iso)

◆ create_tile_hash()

int create_tile_hash ( void  )

◆ dump()

void dump ( FILE *  in)

◆ dump_itembin()

void dump_itembin ( struct item_bin ib)

Referenced by dump(), and write_item().

◆ file_reader_finish()

int file_reader_finish ( struct item_bin_sink sink)

◆ file_reader_new()

struct item_bin_sink* file_reader_new ( FILE *  in,
int  limit,
int  offset 
)

◆ file_writer_finish()

int file_writer_finish ( struct item_bin_sink_func file_writer)

◆ file_writer_new()

struct item_bin_sink_func* file_writer_new ( FILE *  out)

◆ file_writer_process()

int file_writer_process ( struct item_bin_sink_func func,
struct item_bin ib,
struct tile_data tile_data 
)

◆ flush_nodes()

void flush_nodes ( int  final)

◆ free_boundaries()

◆ index_init()

void index_init ( struct zip_info info,
int  version 
)

◆ index_submap_add()

◆ init_item()

◆ item_bin_add_attr()

◆ item_bin_add_attr_data()

void item_bin_add_attr_data ( struct item_bin ib,
enum attr_type  type,
void *  data,
int  size 
)

◆ item_bin_add_attr_int()

void item_bin_add_attr_int ( struct item_bin ib,
enum attr_type  type,
int  val 
)

◆ item_bin_add_attr_longlong()

◆ item_bin_add_attr_range()

void item_bin_add_attr_range ( struct item_bin ib,
enum attr_type  type,
short  min,
short  max 
)

◆ item_bin_add_attr_string()

◆ item_bin_add_coord()

◆ item_bin_add_coord_rect()

void item_bin_add_coord_rect ( struct item_bin ib,
struct rect r 
)

References rect::h, and item_bin_add_coord().

Referenced by index_submap_add(), and write_tilesdir().

◆ item_bin_add_coord_reverse()

void item_bin_add_coord_reverse ( struct item_bin ib,
struct coord c,
int  count 
)

References c, and item_bin_add_coord().

◆ item_bin_add_hole()

void item_bin_add_hole ( struct item_bin ib,
struct coord coord,
int  ccount 
)

add a "hole" to an item

This function adds a "hole" (attr_poly_hole) to a map item. It adds the coordinates and the coordinate count to the existing item. WARNING: It does NOT allocate any memory, so the memory after the item must be already allocated for that purpose.

Parameters
[in,out]ibitem - to add hole to
[in]coord- hole coordinate array
[in]ccount- number of coordinates in coord

References item_bin::len, and attr::type.

Referenced by itembin_write_slice_result().

◆ item_bin_bbox()

void item_bin_bbox ( struct item_bin ib,
struct rect r 
)

◆ item_bin_copy_attr()

void item_bin_copy_attr ( struct item_bin ib,
struct item_bin from,
enum attr_type  attr 
)

◆ item_bin_copy_coord()

void item_bin_copy_coord ( struct item_bin ib,
struct item_bin from,
int  dir 
)

◆ item_bin_dump()

◆ item_bin_dup()

◆ item_bin_get_attr()

◆ item_bin_get_attr_bin()

struct attr_bin* item_bin_get_attr_bin ( struct item_bin ib,
enum attr_type  type,
void *  last 
)

◆ item_bin_get_attr_bin_last()

struct attr_bin* item_bin_get_attr_bin_last ( struct item_bin ib)

◆ item_bin_get_id()

osmid item_bin_get_id ( struct item_bin ib)

◆ item_bin_get_nodeid()

unsigned long long item_bin_get_nodeid ( struct item_bin ib)

◆ item_bin_get_relationid()

◆ item_bin_get_wayid()

◆ item_bin_init()

◆ item_bin_read()

int item_bin_read ( struct item_bin ib,
FILE *  in 
)

References item_bin::len.

Referenced by read_item(), and write_countrydir().

◆ item_bin_remove_attr()

void item_bin_remove_attr ( struct item_bin ib,
void *  ptr 
)

◆ item_bin_set_type()

void item_bin_set_type ( struct item_bin ib,
enum item_type  type 
)

◆ item_bin_set_type_by_population()

void item_bin_set_type_by_population ( struct item_bin ib,
int  population 
)

◆ item_bin_sink_add_func()

void item_bin_sink_add_func ( struct item_bin_sink sink,
struct item_bin_sink_func func 
)

◆ item_bin_sink_destroy()

void item_bin_sink_destroy ( struct item_bin_sink sink)

◆ item_bin_sink_func_destroy()

void item_bin_sink_func_destroy ( struct item_bin_sink_func func)

◆ item_bin_sink_func_new()

struct item_bin_sink_func* item_bin_sink_func_new ( int(*)(struct item_bin_sink_func *func, struct item_bin *ib, struct tile_data *tile_data func)

◆ item_bin_sink_new()

struct item_bin_sink* item_bin_sink_new ( void  )

◆ item_bin_sort_file()

int item_bin_sort_file ( char *  in_file,
char *  out_file,
struct rect r,
int *  size 
)

◆ item_bin_to_poly_segment()

◆ item_bin_write()

◆ item_bin_write_clipped()

◆ item_bin_write_match()

◆ item_bin_write_to_sink()

int item_bin_write_to_sink ( struct item_bin ib,
struct item_bin_sink sink,
struct tile_data tile_data 
)

◆ item_order_by_type()

int item_order_by_type ( enum item_type  type)

◆ itembin_nicer_slicer()

◆ load_buffer()

int load_buffer ( char *  filename,
struct buffer b,
long long  offset,
long long  size 
)

Loads a buffer from a file.

This function loads a buffer from a file.

Parameters
filenameThe name of the while to where the buffer is loaded from.
bBuffer in which file is loaded.
offset
Returns
indicator if operation suceeded

References buffer::base, dbg, dbg_assert, filename, lvl_warning, buffer::malloced, offset, size, and buffer::size.

Referenced by maptool_load_node_table(), osm_count_references(), and osm_resolve_coords_and_split_at_intersections().

◆ load_countries()

◆ load_tilesdir()

◆ map_collect_data_osm()

◆ map_collect_data_osm_db()

int map_collect_data_osm_db ( char *  dbstr,
struct maptool_osm osm 
)

Referenced by osm_read_input_data().

◆ map_collect_data_osm_o5m()

◆ map_collect_data_osm_protobuf()

int map_collect_data_osm_protobuf ( FILE *  in,
struct maptool_osm osm 
)

◆ map_resolve_coords_and_split_at_intersections()

int map_resolve_coords_and_split_at_intersections ( FILE *  in,
FILE *  out,
FILE *  out_index,
FILE *  out_graph,
FILE *  out_coastline,
int  final 
)

◆ merge_tiles()

void merge_tiles ( struct tile_info info)

Referenced by ch_generate_tiles(), and phase34().

◆ osm_add_member()

void osm_add_member ( enum relation_member_type  type,
osmid  ref,
char *  role 
)

◆ osm_add_nd()

void osm_add_nd ( osmid  ref)

◆ osm_add_node()

◆ osm_add_relation()

◆ osm_add_tag()

void osm_add_tag ( char *  k,
char *  v 
)

Sometimes there is no is_in tag, only is_in:country. I put this here so it can be overwritten by the previous if clause if there IS an is_in tag.

Ireland uses the place_county OSM tag to describe what county a town is in. This would be equivalent to is_in: Town; Locality; Country A real world example would be Node: Moycullen (52234625) The tag is processed as Moycullen; Galway; Ireland where Galway is the county

References access_value(), AF_BIKE, AF_CAR, AF_DANGEROUS_GOODS, AF_DELIVERY_TRUCK, AF_EMERGENCY_VEHICLES, AF_HIGH_OCCUPANCY_CAR, AF_HIGH_OCCUPANCY_CAR_ONLY, AF_HORSE, AF_MOPED, AF_MOTORCYCLE, AF_ONEWAY, AF_ONEWAYREV, AF_PEDESTRIAN, AF_PUBLIC_BUS, AF_ROUNDABOUT, AF_ROUNDABOUT_VALID, AF_SPEED_LIMIT, AF_TAXI, AF_THROUGH_TRAFFIC_LIMIT, AF_TOLL, AF_TRANSPORT_TRUCK, AF_UNDERGROUND, attr_debug_level, attr_string_county_name, attr_string_district_name, attr_string_email, attr_string_exit_to, attr_string_fax, attr_string_house_number, attr_string_label, attr_string_phone, attr_string_population, attr_string_postal, attr_string_ref, attr_string_street_destination, attr_string_street_destination_backward, attr_string_street_destination_forward, attr_string_street_name, attr_string_street_name_systematic, attr_string_street_name_systematic_int, attr_string_street_name_systematic_nat, attr_strings, attr_strings_save(), debug_attr_buffer, flagsa, in_relation, in_way, is_in_buffer, maxspeed_attr_value, node_is_tagged, osm_update_attr_present(), and relation_add_tag().

Referenced by map_collect_data_osm_o5m(), parse_tag(), and process_tag().

◆ osm_add_way()

◆ osm_end_node()

◆ osm_end_relation()

◆ osm_end_way()

◆ osm_info()

void osm_info ( char *  type,
osmid  id,
int  cont,
char *  fmt,
  ... 
)

References osm_logv(), and type.

Referenced by itembin_nicer_slicer(), and process_boundaries_setup().

◆ osm_init()

void osm_init ( FILE *  rule_file)

Referenced by maptool_init().

◆ osm_process_towns()

◆ osm_protobufdb_load()

◆ osm_tag_value()

◆ osm_warning()

◆ osm_xml_decode_entities()

void osm_xml_decode_entities ( char *  buffer)

◆ osm_xml_get_attribute()

◆ phase1_map()

◆ phase4()

int phase4 ( FILE **  in,
int  in_count,
int  with_range,
char *  suffix,
FILE *  tilesdir_out,
struct zip_info zip_info 
)

◆ phase5()

int phase5 ( FILE **  in,
FILE **  references,
int  in_count,
int  with_range,
char *  suffix,
struct zip_info zip_info 
)

◆ process_associated_streets()

◆ process_binfile()

void process_binfile ( FILE *  in,
FILE *  out 
)

References item_bin_write(), and read_item().

Referenced by main().

◆ process_boundaries()

GList* process_boundaries ( FILE *  boundaries,
FILE *  ways 
)

◆ process_coastlines()

◆ process_house_number_interpolations()

◆ process_multipolygons()

void process_multipolygons ( FILE *  in,
FILE *  coords,
FILE *  ways,
FILE *  ways_index,
FILE *  out 
)

◆ process_multipolygons_find_loops()

int process_multipolygons_find_loops ( osmid  relid,
int  in_count,
struct item_bin **  parts,
int **  scount,
int ***  sequences,
int **  direction 
)

◆ process_multipolygons_loop_count()

int process_multipolygons_loop_count ( struct item_bin **  bin,
int  scount,
int *  sequence 
)

get number of coordinates inside a sequence calculated by process_multipolygon_find_loop

Parameters
binthe array of all raw members of this multipolygon
scountnumber of members inside this sequence
sequencesequence calculated by process_multipolygon_find_loop
Returns
number of coords

References process_multipolygons_loop_dump().

Referenced by itembin_loop_combiner(), and process_multipolygons_finish().

◆ process_multipolygons_loop_dump()

int process_multipolygons_loop_dump ( struct item_bin **  bin,
int  scount,
int *  sequence,
int *  direction,
struct coord buffer 
)

◆ process_turn_restrictions()

void process_turn_restrictions ( FILE *  in,
FILE *  coords,
FILE *  ways,
FILE *  ways_index,
FILE *  out 
)

◆ process_turn_restrictions_old()

void process_turn_restrictions_old ( FILE *  in,
FILE *  coords,
FILE *  ways,
FILE *  ways_index,
FILE *  out 
)

◆ process_way2poi()

void process_way2poi ( FILE *  in,
FILE *  out,
int  type 
)

Get POI coordinates from area/line coordinates.

Parameters
in*in input file with area/line coordinates.
in*out output file with POI coordinates
intype input file original contents type: type_line or type_area
Returns
nothing

References c, c1, c2, item_bin::clen, geom_line_middle(), geom_poly_centroid(), geom_poly_closest_point(), geom_poly_point_inside(), item_bin_get_wayid(), osm_warning(), read_item(), type, item_bin::type, and write_item_way_subsection().

Referenced by osm_process_way2poi().

◆ read_item()

◆ read_item_range()

struct item_bin* read_item_range ( FILE *  in,
int *  min,
int *  max 
)

◆ read_node_item()

struct node_item* read_node_item ( FILE *  in)

References ITEM_COUNT.

Referenced by relations_process(), and relations_process_multi().

◆ ref_ways()

void ref_ways ( FILE *  in)

References nodes_ref_item_bin(), and read_item().

Referenced by osm_count_references().

◆ relations_add_relation_default_entry()

void relations_add_relation_default_entry ( struct relations rel,
struct relations_func func 
)

◆ relations_add_relation_member_entry()

◆ relations_destroy()

◆ relations_func_new()

struct relations_func* relations_func_new ( void(*)(void *func_priv, void *relation_priv, struct item_bin *member, void *member_priv)  func,
void *  func_priv 
)

◆ relations_new()

◆ relations_process()

◆ relations_process_multi()

◆ remove_countryfiles()

◆ resolve_ways()

void resolve_ways ( FILE *  in,
FILE *  out 
)

◆ save_buffer()

void save_buffer ( char *  filename,
struct buffer b,
long long  offset 
)

Saves a buffer to a file.

This function saves a buffer to a file.

Parameters
filenameThe name of the while to where the buffer is saved to.
bBuffer which is saved to file.
offset

References buffer::base, dbg_assert, filename, offset, and buffer::size.

Referenced by flush_nodes(), and osm_count_references().

◆ sig_alrm()

◆ sig_alrm_end()

◆ sizeof_buffer()

long long sizeof_buffer ( char *  filename)

Determines size of buffer for file.

This function determines the size of the buffer required to read a file.

Parameters
filenameName of file for which the required size of the buffer is determined
Returns
required size of buffer

References filename.

Referenced by maptool_load_node_table().

◆ sort_countries()

void sort_countries ( int  keep_tmpfiles)

◆ tempfile()

◆ tempfile_name()

char* tempfile_name ( char *  suffix,
char *  name 
)

◆ tempfile_rename()

void tempfile_rename ( char *  suffix,
char *  from,
char *  to 
)

◆ tempfile_unlink()

◆ tile()

int tile ( struct rect r,
char *  suffix,
char *  ret,
int  max,
int  overlap,
struct rect tr 
)

◆ tile_bbox()

void tile_bbox ( char *  tile,
struct rect r,
int  overlap 
)

◆ tile_collector_new()

◆ tile_collector_process()

int tile_collector_process ( struct item_bin_sink_func tile_collector,
struct item_bin ib,
struct tile_data tile_data 
)

◆ tile_len()

int tile_len ( char *  tile)

◆ tile_write_item_minmax()

void tile_write_item_minmax ( struct tile_info info,
struct item_bin ib,
FILE *  reference,
int  min,
int  max 
)

◆ tile_write_item_to_tile()

void tile_write_item_to_tile ( struct tile_info info,
struct item_bin ib,
FILE *  reference,
char *  name 
)

◆ write_aux_tiles()

◆ write_countrydir()

◆ write_tilesdir()

◆ write_zipmember()

◆ zip_add_member()

int zip_add_member ( struct zip_info info)

References info.

Referenced by add_aux_tile(), write_aux_tiles(), and write_tilesdir().

◆ zip_close()

void zip_close ( struct zip_info info)

References info.

Referenced by maptool_assemble_map().

◆ zip_destroy()

void zip_destroy ( struct zip_info info)

References info.

Referenced by maptool_assemble_map().

◆ zip_get_index()

FILE* zip_get_index ( struct zip_info info)

◆ zip_get_maxnamelen()

int zip_get_maxnamelen ( struct zip_info info)

References info.

Referenced by ch_assemble_map(), process_slice(), and write_aux_tiles().

◆ zip_get_zipnum()

int zip_get_zipnum ( struct zip_info info)

◆ zip_new()

struct zip_info* zip_new ( void  )

◆ zip_open()

int zip_open ( struct zip_info info,
char *  out,
char *  dir,
char *  index 
)

References zip_info::dir, zip_info::index, and info.

Referenced by maptool_assemble_map().

◆ zip_set_compression_level()

void zip_set_compression_level ( struct zip_info info,
int  level 
)

References info.

Referenced by maptool_assemble_map().

◆ zip_set_maxnamelen()

void zip_set_maxnamelen ( struct zip_info info,
int  max 
)

References info, and max.

Referenced by maptool_assemble_map().

◆ zip_set_timestamp()

int zip_set_timestamp ( struct zip_info info,
char *  timestamp 
)

References info.

Referenced by maptool_assemble_map(), and maptool_generate_tiles().

◆ zip_set_zip64()

void zip_set_zip64 ( struct zip_info info,
int  on 
)

References info.

Referenced by maptool_assemble_map(), and maptool_generate_tiles().

◆ zip_set_zipnum()

void zip_set_zipnum ( struct zip_info info,
int  num 
)

◆ zip_write_directory()

◆ zip_write_index()

int zip_write_index ( struct zip_info info)

References dbg, info, lvl_warning, size, and write_zipmember().

Referenced by maptool_assemble_map().

Variable Documentation

◆ attr_debug_level

int attr_debug_level
extern

Referenced by osm_add_tag(), and parse_option().

◆ aux_tile_list

GList* aux_tile_list
extern

Referenced by add_aux_tile(), and write_aux_tiles().

◆ bytes_read

int bytes_read
extern

◆ dedupe_ways_hash

GHashTable* dedupe_ways_hash
extern

Referenced by osm_end_way(), and parse_option().

◆ experimental

int experimental
extern

Indicates if experimental features (if available) were enabled.

Referenced by item_order_by_type(), main(), and parse_option().

◆ ignore_unknown

int ignore_unknown
extern

Referenced by filter_unknown(), and parse_option().

◆ map_information_attrs

struct attr map_information_attrs[32]
extern

Referenced by index_init(), and maptool_assemble_map().

◆ node_buffer

◆ overlap

◆ processed_nodes

◆ processed_nodes_out

int processed_nodes_out

◆ processed_relations

int processed_relations

◆ processed_tiles

int processed_tiles

◆ processed_ways

int processed_ways

◆ slice_size

◆ slices

◆ suffix

◆ thread_count

◆ tile_hash

◆ tile_hash2

GHashTable * tile_hash2

◆ tile_head_root

struct tile_head * tile_head_root

◆ tmp_item_bin

◆ unknown_country

int unknown_country
extern

Referenced by osm_process_towns(), and parse_option().

◆ world_bbox

struct rect world_bbox
extern