navit
0.5.3-trunk
|
#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) |
GList * | process_boundaries (FILE *boundaries, FILE *ways) |
GList * | boundary_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_bin * | item_bin_get_attr_bin (struct item_bin *ib, enum attr_type type, void *last) |
struct attr_bin * | item_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_bin * | item_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_segment * | item_bin_to_poly_segment (struct item_bin *ib, int type) |
struct node_item * | read_node_item (FILE *in) |
struct item_bin * | read_item (FILE *in) |
struct item_bin * | read_item_range (FILE *in, int *min, int *max) |
struct item_bin * | init_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_table * | country_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 relations * | relations_new (void) |
struct relations_func * | relations_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_sink * | item_bin_sink_new (void) |
struct item_bin_sink_func * | item_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_sink * | file_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_func * | file_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_func * | tile_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_info * | zip_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_head * | tile_head_root |
struct item_bin * | tmp_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 |
GList * | aux_tile_list |
struct attr | map_information_attrs [32] |
#define BUFFER_SIZE 1280 |
#define debug_itembin | ( | x | ) | 0 |
Referenced by write_item().
#define debug_tile | ( | x | ) | 0 |
Referenced by add_tile_hash(), merge_tile(), tile_extend(), and write_item().
#define NODE_ID_BITS 56 |
Referenced by osm_add_node().
#define OSMID_FMT ULONGLONG_FMT |
Referenced by osm_add_node(), osm_add_way(), osm_end_node(), osm_end_way(), and osm_logv().
#define RELATION_MEMBER_PARSE_FORMAT "%d:"LONGLONG_FMT":%n" |
Referenced by parse_relation_member_string(), and process_boundaries_setup().
#define RELATION_MEMBER_PRINT_FORMAT "%d:"LONGLONG_FMT":%s" |
Referenced by osm_add_member().
#define sq | ( | x | ) | ((double)(x)*(x)) |
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.
enum relation_member_type |
int add_aux_tile | ( | struct zip_info * | zip_info, |
char * | name, | ||
char * | filename, | ||
int | size | ||
) |
References aux_tile_list, aux_tile::filename, aux_tile::name, size, aux_tile::size, and zip_add_member().
Referenced by add_aux_tiles(), and index_country_add().
void add_aux_tiles | ( | char * | name, |
struct zip_info * | info | ||
) |
References add_aux_tile().
Referenced by maptool_assemble_map().
References attr_bin_write_data(), attr_data_get(), attr_data_size(), and attr::type.
Referenced by item_bin_add_attr().
References attr_bin::len, attr_bin::type, and type.
Referenced by attr_bin_write_attr(), and item_bin_add_attr_data().
References bbox_extend(), c, and rect::h.
Referenced by font_freetype_get_text_bbox(), gui_internal_cmd_map_download(), item_bin_write_clipped(), itembin_disassemble(), osd_cmd_interface_draw(), osd_compass_draw(), osd_route_guard_draw(), osd_scale_draw(), osd_speed_cam_draw(), osd_speed_warner_draw(), osd_stopwatch_draw(), process_multipolygons_finish(), and tile_write_item_minmax().
long long bbox_area | ( | struct rect const * | r | ) |
References rect::h, coord::x, and coord::y.
Referenced by boundary_find_matches().
References rect::h, coord::x, and coord::y.
Referenced by process_boundaries_insert().
References rect::h, coord::x, and coord::y.
Referenced by boundary_find_matches(), and process_multipolygons_finish().
References rect::h, coord::x, and coord::y.
Referenced by bbox(), item_bin_sort_file(), item_bin_write_match(), load_countries(), process_boundaries_finish(), and process_turn_restrictions_member().
References bbox_area(), bbox_contains_coord(), boundary_find_matches(), c, boundary::children, geom_poly_segments_point_inside(), rect::h, boundary::ib, item_bin_get_attr(), name, boundary::r, read_item(), boundary::sorted_segments, test(), coord::x, and coord::y.
Referenced by boundary_find_matches(), and osm_process_town_by_boundary().
References boundary::ib, and item_bin_get_attr().
void cat | ( | FILE * | in, |
FILE * | out | ||
) |
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, item_id_slice_free(), tile_info::maxlen, tile_head::name, newnode_hash, tile_head::next, nodeid, tile_head::process, sgr_nodes_hash, tile_info::suffix, suffix, tempfile(), tile_head_root, tile_info::tiles_list, tile_info::tilesdir_out, tile_head::total_size, tile_head::total_size_used, tile_info::write, write_tilesdir(), write_zipmember(), tile_head::zip_data, zip_get_index(), and zip_get_maxnamelen().
Referenced by maptool_assemble_map().
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(), tile_info::maxlen, merge_tiles(), tile_info::suffix, suffix, tempfile(), tile_hash, tile_info::tiles_list, tile_info::tilesdir_out, tile_info::write, and write_tilesdir().
Referenced by maptool_generate_tiles().
void clear_node_item_buffer | ( | void | ) |
References buffer::base, node_buffer, node_item::ref_way, and buffer::size.
Referenced by osm_count_references().
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 | ||
) |
int contains_bbox | ( | int | xl, |
int | yl, | ||
int | xh, | ||
int | yh, | ||
struct rect * | r | ||
) |
struct country_table* country_from_iso2 | ( | char * | iso | ) |
References country_from_countryid(), and country_id_from_iso2().
Referenced by process_boundaries_setup().
int create_tile_hash | ( | void | ) |
References add_tile_hash(), tile_head::next, tile_hash2, and tile_head_root.
Referenced by ch_assemble_map(), load_tilesdir(), and phase5().
void dump | ( | FILE * | in | ) |
References dump_itembin(), filter_unknown(), and read_item().
void dump_itembin | ( | struct item_bin * | ib | ) |
References item_bin_dump().
Referenced by dump(), and write_item().
int file_reader_finish | ( | struct item_bin_sink * | sink | ) |
References item_bin_sink_destroy(), item_bin_write_to_sink(), limit, offset, item_bin_sink::priv_data, and read_item().
Referenced by process_coastlines().
struct item_bin_sink* file_reader_new | ( | FILE * | in, |
int | limit, | ||
int | offset | ||
) |
References item_bin_sink_new(), limit, offset, and item_bin_sink::priv_data.
Referenced by process_coastlines().
int file_writer_finish | ( | struct item_bin_sink_func * | file_writer | ) |
References item_bin_sink_func_destroy().
Referenced by process_coastlines().
struct item_bin_sink_func* file_writer_new | ( | FILE * | out | ) |
References file_writer_process(), item_bin_sink_func_new(), and item_bin_sink_func::priv_data.
Referenced by process_coastlines().
int file_writer_process | ( | struct item_bin_sink_func * | func, |
struct item_bin * | ib, | ||
struct tile_data * | tile_data | ||
) |
References item_bin_write(), and item_bin_sink_func::priv_data.
Referenced by file_writer_new().
void flush_nodes | ( | int | final | ) |
References node_buffer, save_buffer(), buffer::size, slice_size, and slices.
Referenced by allocate_node_item_in_buffer(), and osm_read_input_data().
void free_boundaries | ( | GList * | l | ) |
References boundary::children, geom_poly_segment::first, free_boundaries(), boundary::ib, boundary::iso2, boundary::segments, and boundary::sorted_segments.
Referenced by free_boundaries(), and osm_process_towns().
void index_init | ( | struct zip_info * | info, |
int | version | ||
) |
References init_item(), item_bin_add_attr(), item_bin_write(), map_information_attrs, attr::num, type, attr::type, attr::u, version(), and zip_get_index().
Referenced by maptool_assemble_map().
References init_item(), item_bin_add_attr_int(), item_bin_add_attr_range(), item_bin_add_coord_rect(), item_bin::len, tile_head::name, overlap, tile_info::suffix, tile_bbox(), tile_len(), tile_write_item_to_tile(), and tile_head::zipnum.
Referenced by write_tilesdir().
References item_bin_init(), and misc_item_buffer.
Referenced by ch_process_node(), index_country_add(), index_init(), index_submap_add(), ocean_tile(), osm_end_node(), osm_end_way(), osm_town_relations_to_poly(), phase1_map(), tile_collector_process_tile(), tile_sibling_edges(), and write_tilesdir().
References attr_bin_write_attr(), ATTR_IS_GROUP, attr::attrs, item_bin::len, attr_bin::len, size, attr_bin::type, attr::type, and attr::u.
Referenced by index_init(), item_bin_add_attr_int(), item_bin_add_attr_longlong(), item_bin_add_attr_range(), item_bin_add_attr_string(), osm_add_member(), osm_process_towns(), and phase1_map().
References attr_bin_write_data(), and item_bin::len.
Referenced by ch_process_node(), item_bin_copy_attr(), and process_multipolygons_finish().
References item_bin_add_attr(), attr::num, type, attr::type, and attr::u.
Referenced by index_country_add(), index_submap_add(), osm_end_way(), and write_tilesdir().
References item_bin_add_attr(), attr::num64, type, attr::type, and attr::u.
Referenced by ocean_tile(), osm_add_relation(), osm_end_node(), osm_end_way(), osm_town_relations_to_poly(), relations_process(), relations_process_multi(), and tile_collector_process_tile().
References item_bin_add_attr(), range::max, max, range::min, attr::range, type, attr::type, and attr::u.
Referenced by index_submap_add(), process_turn_restrictions_finish(), and write_tilesdir().
References item_bin_add_attr(), attr::str, type, attr::type, and attr::u.
Referenced by index_country_add(), item_bin_write_match(), itembin_write_slice_result(), osm_end_node(), osm_end_relation_multipolygon(), osm_end_way(), osm_town_relations_to_poly(), process_associated_street_member(), process_house_number_interpolation_member(), relation_add_tag(), and tile_sibling_edges().
References item_bin::clen, and item_bin::len.
Referenced by ch_process_node(), clip_line(), clip_polygon(), close_polygon(), item_bin_add_coord_rect(), item_bin_add_coord_reverse(), item_bin_bbox(), item_bin_copy_coord(), osm_end_node(), osm_end_way(), osm_town_relations_to_poly(), phase1_map(), process_boundaries_finish(), process_multipolygons_finish(), process_turn_restrictions(), process_turn_restrictions_finish(), relations_process(), relations_process_multi(), and tile_collector_process_tile().
References rect::h, and item_bin_add_coord().
Referenced by index_submap_add(), and write_tilesdir().
References item_bin_add_coord().
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.
[in,out] | ib | item - to add hole to |
[in] | coord | - hole coordinate array |
[in] | ccount | - number of coordinates in coord |
References item_bin::len, attr_bin::len, and attr_bin::type.
Referenced by itembin_write_slice_result().
References rect::h, item_bin_add_coord(), coord::x, and coord::y.
Referenced by ocean_tile(), tile_collector_process_tile(), and tile_sibling_edges().
References item_bin_add_attr_data(), item_bin_get_attr_bin(), item_bin_get_wayid(), attr_bin::len, and attr_bin::type.
Referenced by clip_line(), clip_polygon(), and process_multipolygons_finish().
References c, item_bin::clen, and item_bin_add_coord().
void item_bin_dump | ( | struct item_bin * | ib, |
FILE * | out | ||
) |
References attr_data_set(), attr_to_name(), attr_to_text(), c, item_bin::clen, dump_coord(), item_to_name(), item_bin::len, attr_bin::len, attr::str, item_bin::type, attr_bin::type, and attr::type.
Referenced by dump_itembin(), and process_turn_restrictions().
References item_bin::len, attr_bin::len, and attr_bin::type.
Referenced by boundary_find_matches(), boundary_relid(), item_bin_get_nodeid_from_attr(), item_bin_get_relationid(), item_bin_get_wayid(), item_bin_write_match(), itembin_nicer_slicer(), osm_process_town_by_boundary_update_attrs(), osm_process_town_by_is_in(), osm_process_town_get_town_name_from_is_in(), osm_process_towns(), osm_tag_value(), process_associated_street_member(), process_boundaries_member(), process_boundaries_setup(), process_house_number_interpolation_member(), process_multipolygons_member(), process_turn_restrictions(), relations_process(), relations_process_multi(), and search_relation_member().
References item_bin::len, attr_bin::len, and attr_bin::type.
Referenced by item_bin_copy_attr(), item_bin_sort_compare(), itembin_disassemble(), phase34_process_file(), and write_countrydir().
References item_bin::len, and attr_bin::len.
Referenced by item_bin_sort_compare(), and write_countrydir().
References item_bin_get_nodeid(), item_bin_get_relationid(), item_bin_get_wayid(), and item_bin::type.
Referenced by tile_extend().
unsigned long long item_bin_get_nodeid | ( | struct item_bin * | ib | ) |
References item_bin_get_nodeid_from_attr().
Referenced by item_bin_get_id(), and itembin_warning().
unsigned long long item_bin_get_relationid | ( | struct item_bin * | ib | ) |
unsigned long long item_bin_get_wayid | ( | struct item_bin * | ib | ) |
References item_bin_get_attr().
Referenced by item_bin_copy_attr(), item_bin_get_id(), itembin_warning(), map_resolve_coords_and_split_at_intersections(), process_house_number_interpolations_setup(), process_turn_restrictions(), process_way2poi(), search_relation_member(), tile_collector_process_tile(), and write_item_way_subsection_index().
References item_bin::clen, item_bin_set_type(), and item_bin::len.
Referenced by clip_line(), clip_polygon(), init_item(), osm_add_relation(), process_boundaries_finish(), process_multipolygons_finish(), process_turn_restrictions(), process_turn_restrictions_finish(), relations_process(), relations_process_multi(), and tile_sibling_edges().
int item_bin_read | ( | struct item_bin * | ib, |
FILE * | in | ||
) |
References item_bin::len.
Referenced by process_turn_restrictions(), read_item(), search_relation_member(), and write_countrydir().
void item_bin_remove_attr | ( | struct item_bin * | ib, |
void * | ptr | ||
) |
References item_bin::len, and attr_bin::len.
Referenced by item_bin_write_match(), osm_process_towns(), and write_countrydir().
References item_bin::type, and type.
Referenced by item_bin_init(), and item_bin_set_type_by_population().
void item_bin_set_type_by_population | ( | struct item_bin * | ib, |
int | population | ||
) |
References district_population, item_bin_set_type(), item_is_district, town_population, and population_table::type.
Referenced by osm_end_node().
void item_bin_sink_add_func | ( | struct item_bin_sink * | sink, |
struct item_bin_sink_func * | func | ||
) |
References item_bin_sink::sink_funcs.
Referenced by coastline_processor_new(), and process_coastlines().
void item_bin_sink_destroy | ( | struct item_bin_sink * | sink | ) |
References item_bin_sink::sink_funcs.
Referenced by coastline_processor_finish(), file_reader_finish(), and process_coastlines().
void item_bin_sink_func_destroy | ( | struct item_bin_sink_func * | func | ) |
Referenced by coastline_processor_finish(), file_writer_finish(), and tile_collector_finish().
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 | ) |
References item_bin_sink_func::func.
Referenced by coastline_processor_new(), file_writer_new(), and tile_collector_new().
struct item_bin_sink* item_bin_sink_new | ( | void | ) |
Referenced by coastline_processor_new(), file_reader_new(), and process_coastlines().
int item_bin_sort_file | ( | char * | in_file, |
char * | out_file, | ||
struct rect * | r, | ||
int * | size | ||
) |
References bbox_extend(), c, item_bin::clen, dbg_assert, file_get_contents(), rect::h, item_bin_sort_compare(), item_bin::len, and p.
Referenced by sort_countries().
struct geom_poly_segment* item_bin_to_poly_segment | ( | struct item_bin * | ib, |
int | type | ||
) |
References item_bin::clen, geom_poly_segment::first, geom_coord_copy(), geom_poly_segment::last, geom_poly_segment::type, and population_table::type.
Referenced by process_boundaries_member(), process_turn_restrictions(), and tile_data_to_segments().
void item_bin_write | ( | struct item_bin * | ib, |
FILE * | out | ||
) |
References dbg_assert, and item_bin::len.
Referenced by ch_process_node(), file_writer_process(), index_country_add(), index_init(), item_bin_write_match(), osm_end_node(), osm_end_relation(), osm_end_relation_multipolygon(), osm_end_way(), osm_town_relations_to_poly(), phase1_map(), process_associated_street_member(), process_binfile(), process_boundaries_finish(), process_house_number_interpolation_member(), process_multipolygons_finish(), process_turn_restrictions(), process_turn_restrictions_finish(), relation_func_writethrough(), resolve_ways(), write_countrydir(), and write_tilesdir().
void item_bin_write_clipped | ( | struct item_bin * | ib, |
struct tile_parameter * | param, | ||
struct item_bin_sink * | out | ||
) |
References bbox(), tile_data::buffer, item_bin::clen, clip_line(), clip_polygon(), tile_data::item_bbox, item_bin_write_to_sink(), tile_parameter::max, tile_parameter::min, tile_parameter::overlap, tile(), tile_data::tile_bbox, tile_bbox(), tile_data::tile_depth, and item_bin::type.
Referenced by clip_line(), clip_polygon(), and coastline_processor_process().
int item_bin_write_to_sink | ( | struct item_bin * | ib, |
struct item_bin_sink * | sink, | ||
struct tile_data * | tile_data | ||
) |
References item_bin_sink_func::func, and item_bin_sink::sink_funcs.
Referenced by file_reader_finish(), item_bin_write_clipped(), ocean_tile(), tile_collector_process_tile(), and tile_sibling_edges().
int item_order_by_type | ( | enum item_type | type | ) |
References experimental, and max.
Referenced by phase34_process_file(), and process_turn_restrictions_member().
void itembin_nicer_slicer | ( | struct tile_info * | info, |
struct item_bin * | ib, | ||
FILE * | reference, | ||
char * | buffer, | ||
int | min | ||
) |
References slicerpolygon::bbox, slicerpolygon::buffer, slicerpolygon::info, info, item_bin_get_attr(), itembin_bbox_intersects(), itembin_disassemble(), itembin_slice(), itembin_slicerpolygon_free(), next_tile(), slicerpolygon::number, osm_info(), overlap, slicerpolygon::reference, tile_bbox(), tile_len(), tile_write_item_to_tile(), and item_bin::type.
Referenced by tile_write_item_minmax().
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.
filename | The name of the while to where the buffer is loaded from. |
b | Buffer in which file is loaded. |
offset |
References buffer::base, dbg, dbg_assert, 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().
void load_countries | ( | void | ) |
References bbox_extend(), item_bin::clen, country_table, country_table::countryid, filename, rect::h, item_bin::len, country_table::r, read_item(), and country_table::size.
Referenced by maptool_load_countries().
void load_tilesdir | ( | FILE * | in | ) |
References add_tile_hash(), c, create_tile_hash(), tile_head::name, tile_head::next, tile_head::num_subtiles, size, string_hash_lookup(), th_get_subtile(), tile_hash, tile_head_root, tile_head::total_size, tile_head::total_size_used, tile_head::zip_data, and tile_head::zipnum.
Referenced by maptool_load_tilesdir().
int map_collect_data_osm | ( | FILE * | in, |
struct maptool_osm * | osm | ||
) |
References BUFFER_SIZE, exit, osm_end_node(), osm_end_relation(), osm_end_way(), p, parse_member(), parse_nd(), parse_node(), parse_relation(), parse_tag(), parse_way(), processed_nodes, processed_relations, processed_ways, sig_alrm(), sig_alrm_end(), size, and xml_declaration_in_line().
Referenced by osm_read_input_data().
int map_collect_data_osm_db | ( | char * | dbstr, |
struct maptool_osm * | osm | ||
) |
Referenced by osm_read_input_data().
int map_collect_data_osm_o5m | ( | FILE * | in, |
struct maptool_osm * | osm | ||
) |
References o5m::buffer, o5m::buffer_end, o5m::buffer_size, o5m::buffer_start, c, o5m::changeset, o5m::error, fill_buffer(), get_strings(), get_strings_ref(), get_sval(), get_uval(), o5m::id, o5m::in, o5m::lat, latlon_scale, o5m::lon, LONGLONG_FMT, o5m_print_end(), o5m_print_start(), o5m_print_version(), o5m_reset(), osm_add_member(), osm_add_nd(), osm_add_node(), osm_add_relation(), osm_add_tag(), osm_add_way(), osm_end_node(), osm_end_relation(), osm_end_way(), print, print_escaped(), o5m::rid, st, o5m::timestamp, types, o5m::uid, o5m::user, and o5m::version.
Referenced by osm_read_input_data().
int map_collect_data_osm_protobuf | ( | FILE * | in, |
struct maptool_osm * | osm | ||
) |
References data, MAX_BLOB_LENGTH, process_osmdata(), process_osmheader(), read_blob(), read_header(), and uncompress_blob().
Referenced by osm_read_input_data().
int map_resolve_coords_and_split_at_intersections | ( | FILE * | in, |
FILE * | out, | ||
FILE * | out_index, | ||
FILE * | out_graph, | ||
FILE * | out_coastline, | ||
int | final | ||
) |
References node_item::c, c, item_bin::clen, GET_REF, IS_REF, item_bin_get_wayid(), item_get_default_flags(), item_bin::len, node_item_get(), osm_warning(), processed_nodes, processed_nodes_out, processed_relations, processed_tiles, processed_ways, read_item(), node_item::ref_way, sig_alrm(), sig_alrm_end(), item_bin::type, and write_item_way_subsection().
Referenced by osm_resolve_coords_and_split_at_intersections().
void merge_tiles | ( | struct tile_info * | info | ) |
References get_tiles_list(), merge_tile(), processed_tiles, size, tile_info::suffix, tile_data_size(), tile_hash, tile_len(), and tile_head::total_size.
Referenced by ch_generate_tiles(), and phase34().
void osm_add_member | ( | enum relation_member_type | type, |
osmid | ref, | ||
char * | role | ||
) |
References BUFFER_SIZE, item_bin_add_attr(), RELATION_MEMBER_PRINT_FORMAT, attr::str, tmp_item_bin, and attr::u.
Referenced by map_collect_data_osm_o5m(), parse_member(), and process_relation().
void osm_add_nd | ( | osmid | ref | ) |
References coord_buffer, coord_count, exit, MAX_COORD_COUNT, and SET_REF.
Referenced by map_collect_data_osm_o5m(), parse_nd(), and process_way().
void osm_add_node | ( | osmid | id, |
double | lat, | ||
double | lon | ||
) |
References allocate_node_item_in_buffer(), attr_strings_clear(), buffer::base, node_item::c, dbg_assert, debug_attr_buffer, id_last_node, in_node, is_in_buffer, attr_bin::len, M_PI, M_PI_4, node_item::nd_id, node_buffer, node_buffer_to_hash(), node_hash, NODE_ID_BITS, node_is_tagged, nodeid, osmid_attr, osmid_attr_value, OSMID_FMT, node_item::ref_way, remove_last_node_item_from_buffer(), item::type, attr_bin::type, coord::x, and coord::y.
Referenced by map_collect_data_osm_o5m(), parse_node(), and process_dense().
void osm_add_relation | ( | osmid | id | ) |
References attr_strings_clear(), debug_attr_buffer, in_relation, iso_code, item_bin_add_attr_longlong(), item_bin_init(), osmid_attr_value, relation_type, and tmp_item_bin.
Referenced by map_collect_data_osm_o5m(), parse_relation(), and process_relation().
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().
void osm_add_way | ( | osmid | id | ) |
References attr_strings_clear(), coord_count, debug_attr_buffer, flags_attr_value, flagsa, in_way, maxspeed_attr_value, osmid_attr_value, OSMID_FMT, item::type, way_hash, and wayid.
Referenced by map_collect_data_osm_o5m(), parse_way(), and process_way().
void osm_end_node | ( | struct maptool_osm * | osm | ) |
References attr_longest_match(), attr_longest_match_clear(), attr_mapping_node_count, attr_string_county_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_name, attr_string_url, attr_strings, node_item::c, dbg_assert, debug_attr_buffer, in_node, init_item(), is_in_buffer, item_bin_add_attr_longlong(), item_bin_add_attr_string(), item_bin_add_coord(), item_bin_set_type_by_population(), item_bin_write(), item_is_district, item_is_town, node_is_tagged, nodeid, maptool_osm::nodes, osmid_attr_value, OSMID_FMT, processed_nodes_out, maptool_osm::towns, item_bin::type, and types.
Referenced by map_collect_data_osm(), map_collect_data_osm_o5m(), and process_dense().
void osm_end_relation | ( | struct maptool_osm * | osm | ) |
References maptool_osm::associated_streets, attr_longest_match_clear(), in_relation, item_bin_write(), osm_end_relation_multipolygon(), relation_type, tmp_item_bin, maptool_osm::turn_restrictions, item_bin::type, and attr_mapping::type.
Referenced by map_collect_data_osm(), map_collect_data_osm_o5m(), and process_relation().
void osm_end_way | ( | struct maptool_osm * | osm | ) |
References attr_longest_match(), attr_longest_match_clear(), attr_mapping_way2poi_count, attr_mapping_way_count, attr_string_county_name, attr_string_district_name, attr_string_email, attr_string_fax, attr_string_house_number, attr_string_label, attr_string_phone, 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_nat, attr_string_url, attr_strings, coord_buffer, coord_count, dbg_assert, debug_attr_buffer, dedupe_ways_hash, flags_attr_value, flagsa, GET_REF, maptool_osm::house_number_interpolations, in_way, init_item(), item_bin_add_attr_int(), item_bin_add_attr_longlong(), item_bin_add_attr_string(), item_bin_add_coord(), item_bin_write(), item_get_default_flags(), maptool_osm::line2poi, maxspeed_attr_value, nodes_ref_item_bin(), osmid_attr_value, OSMID_FMT, maptool_osm::poly2poi, types, wayid, and maptool_osm::ways.
Referenced by map_collect_data_osm(), map_collect_data_osm_o5m(), and process_way().
void osm_info | ( | char * | type, |
osmid | id, | ||
int | cont, | ||
char * | fmt, | ||
... | |||
) |
References osm_logv().
Referenced by itembin_nicer_slicer(), and process_boundaries_setup().
void osm_init | ( | FILE * | ) |
References build_attrmap(), and build_countrytable().
Referenced by maptool_init().
void osm_process_towns | ( | FILE * | in, |
FILE * | boundaries, | ||
FILE * | ways, | ||
char * | suffix | ||
) |
References town_country::attrs, bytes_read, c, town_country::country, country_table::countryid, country_table::file, free_boundaries(), item_bin_add_attr(), item_bin_dup(), item_bin_get_attr(), item_bin_remove_attr(), item_bin_write_match(), item_is_district, itembin_warning(), item_bin::len, MAX_TOWN_ADMIN_LEVELS, name, nodeid, osm_process_town_by_boundary(), osm_process_town_by_is_in(), osm_process_town_get_town_name_from_is_in(), osm_process_town_unknown_country(), osm_town_relations_to_poly(), process_boundaries(), processed_nodes, processed_nodes_out, processed_relations, processed_tiles, processed_ways, read_item(), sig_alrm(), sig_alrm_end(), attr::str, tempfile(), town_country_destroy(), attr::type, attr::u, and unknown_country.
Referenced by main().
int osm_protobufdb_load | ( | FILE * | in, |
char * | dir | ||
) |
References BUFFER_SIZE, finish(), osm_protobufdb_end_node(), osm_protobufdb_end_relation(), osm_protobufdb_end_way(), osm_protobufdb_parse_member(), osm_protobufdb_parse_nd(), osm_protobufdb_parse_node(), osm_protobufdb_parse_relation(), osm_protobufdb_parse_tag(), osm_protobufdb_parse_way(), p, processed_nodes, processed_relations, processed_ways, sig_alrm(), size, and test().
Referenced by main().
char* osm_tag_value | ( | struct item_bin * | ib, |
char * | key | ||
) |
References item_bin_get_attr(), and osm_tag_value().
Referenced by osm_process_town_by_boundary_update_attrs(), osm_tag_value(), osm_town_relations_to_poly(), process_associated_streets_setup(), and process_boundaries_setup().
void osm_warning | ( | char * | type, |
osmid | id, | ||
int | cont, | ||
char * | fmt, | ||
... | |||
) |
References osm_logv().
Referenced by map_resolve_coords_and_split_at_intersections(), process_boundaries_finish(), process_boundaries_setup(), process_multipolygons_find_loops(), process_multipolygons_setup_one(), process_turn_restrictions(), process_turn_restrictions_finish(), process_turn_restrictions_setup_one(), process_way2poi(), and relation_add_tag().
void osm_xml_decode_entities | ( | char * | buffer | ) |
References entity::c, entities, and startup::pos.
Referenced by osm_protobufdb_parse_info(), osm_protobufdb_parse_tag(), and parse_tag().
int osm_xml_get_attribute | ( | char * | xml, |
char * | attribute, | ||
char * | buffer, | ||
int | buffer_size | ||
) |
References startup::pos.
Referenced by osm_protobufdb_parse_info(), osm_protobufdb_parse_member(), osm_protobufdb_parse_nd(), osm_protobufdb_parse_node(), osm_protobufdb_parse_relation(), osm_protobufdb_parse_tag(), osm_protobufdb_parse_way(), parse_member(), parse_nd(), parse_node(), parse_relation(), parse_tag(), and parse_way().
void phase1_map | ( | GList * | maps, |
FILE * | out_ways, | ||
FILE * | out_nodes | ||
) |
References init_item(), item, item_attr_get(), item_bin_add_attr(), item_bin_add_coord(), item_bin_write(), item_coord_get(), map_convert_free(), map_convert_string(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), attr::str, item::type, attr::type, and attr::u.
Referenced by osm_read_input_data().
int phase4 | ( | FILE ** | in, |
int | in_count, | ||
int | with_range, | ||
char * | suffix, | ||
FILE * | tilesdir_out, | ||
struct zip_info * | zip_info | ||
) |
References tile_info::maxlen, phase34(), tile_info::suffix, suffix, tile_info::tiles_list, tile_info::tilesdir_out, and tile_info::write.
Referenced by maptool_generate_tiles().
int phase5 | ( | FILE ** | in, |
FILE ** | references, | ||
int | in_count, | ||
int | with_range, | ||
char * | suffix, | ||
struct zip_info * | zip_info | ||
) |
References create_tile_hash(), LONGLONG_FMT, tile_head::next, tile_head::process, process_slice(), size, slice_size, slices, tile_head_root, tile_head::total_size, zip_get_zipnum(), and zip_set_zipnum().
Referenced by maptool_assemble_map().
void process_associated_streets | ( | FILE * | in, |
struct files_relation_processing * | files_relproc | ||
) |
References process_relation_member_func_priv::allocations, g_free_helper(), files_relation_processing::nodes2_in, files_relation_processing::nodes2_out, files_relation_processing::nodes_in, files_relation_processing::nodes_out, process_relation_member_func_priv::out, process_associated_streets_setup(), relations_destroy(), relations_new(), relations_process(), files_relation_processing::ways_in, and files_relation_processing::ways_out.
Referenced by main().
void process_binfile | ( | FILE * | in, |
FILE * | out | ||
) |
References item_bin_write(), and read_item().
Referenced by main().
GList* process_boundaries | ( | FILE * | boundaries, |
FILE * | ways | ||
) |
References process_boundaries_finish(), process_boundaries_setup(), relations_destroy(), relations_new(), and relations_process().
Referenced by osm_process_towns().
void process_coastlines | ( | FILE * | in, |
FILE * | out | ||
) |
void process_house_number_interpolations | ( | FILE * | in, |
struct files_relation_processing * | files_relproc | ||
) |
References process_relation_member_func_priv::allocations, g_free_helper(), files_relation_processing::nodes2_in, files_relation_processing::nodes2_out, files_relation_processing::nodes_in, files_relation_processing::nodes_out, process_relation_member_func_priv::out, process_house_number_interpolations_setup(), relations_destroy(), relations_new(), relations_process(), files_relation_processing::ways_in, and files_relation_processing::ways_out.
Referenced by main().
void process_multipolygons | ( | FILE * | in, |
FILE * | coords, | ||
FILE * | ways, | ||
FILE * | ways_index, | ||
FILE * | out | ||
) |
int process_multipolygons_find_loops | ( | osmid | relid, |
int | in_count, | ||
struct item_bin ** | parts, | ||
int ** | scount, | ||
int *** | sequences, | ||
int ** | direction | ||
) |
References osm_warning(), and process_multipolygons_find_loop().
Referenced by itembin_loop_combiner(), and process_multipolygons_finish().
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
bin | the array of all raw members of this multipolygon |
scount | number of members inside this sequence |
sequence | sequence calculated by process_multipolygon_find_loop |
References process_multipolygons_loop_dump().
Referenced by itembin_loop_combiner(), and process_multipolygons_finish().
int process_multipolygons_loop_dump | ( | struct item_bin ** | bin, |
int | scount, | ||
int * | sequence, | ||
int * | direction, | ||
struct coord * | buffer | ||
) |
References c, and item_bin::clen.
Referenced by itembin_loop_combiner(), process_multipolygons_finish(), and process_multipolygons_loop_count().
void process_turn_restrictions | ( | FILE * | in, |
FILE * | coords, | ||
FILE * | ways, | ||
FILE * | ways_index, | ||
FILE * | out | ||
) |
References node_item::c, coord_is_equal, geom_poly_segment::first, geom_poly_area(), geom_poly_segment_type_way_left_side, geom_poly_segment_type_way_unknown, geom_poly_segments_sort(), relation_member::id, item_bin_add_coord(), item_bin_dump(), item_bin_get_attr(), item_bin_get_relationid(), item_bin_get_wayid(), item_bin_init(), item_bin_read(), item_bin_to_poly_segment(), item_bin_write(), geom_poly_segment::last, LONGLONG_FMT, osm_types, osm_warning(), parse_relation_member_string(), process_turn_restrictions_finish(), process_turn_restrictions_old(), process_turn_restrictions_setup(), processed_relations, processed_ways, read_item(), relations_destroy(), relations_new(), relations_process_multi(), search_relation_member(), sig_alrm(), sig_alrm_end(), thread_count, item_bin::type, relation_member::type, coord::x, and coord::y.
Referenced by osm_process_turn_restrictions().
void process_turn_restrictions_old | ( | FILE * | in, |
FILE * | coords, | ||
FILE * | ways, | ||
FILE * | ways_index, | ||
FILE * | out | ||
) |
Referenced by process_turn_restrictions().
void process_way2poi | ( | FILE * | in, |
FILE * | out, | ||
int | type | ||
) |
Get POI coordinates from area/line coordinates.
in | *in input file with area/line coordinates. |
in | *out output file with POI coordinates |
in | type input file original contents type: type_line or type_area |
References 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(), item_bin::type, and write_item_way_subsection().
Referenced by osm_process_way2poi().
struct item_bin* read_item | ( | FILE * | in | ) |
References bytes_read, dbg_assert, item_bin_read(), item_bin::len, and misc_item_buffer.
Referenced by boundary_find_matches(), ch_copy_to_tiles(), ch_generate_ddsg(), dump(), file_reader_finish(), load_countries(), map_resolve_coords_and_split_at_intersections(), osm_process_towns(), phase34_process_file(), process_associated_streets_setup(), process_binfile(), process_boundaries_setup(), process_house_number_interpolations_setup(), process_multipolygons_setup(), process_turn_restrictions(), process_turn_restrictions_setup(), process_way2poi(), read_item_range(), ref_ways(), relations_process(), relations_process_multi(), and resolve_ways().
struct item_bin* read_item_range | ( | FILE * | in, |
int * | min, | ||
int * | max | ||
) |
References range::max, range::min, and read_item().
Referenced by phase34_process_file_range().
struct node_item* read_node_item | ( | FILE * | in | ) |
References ITEM_COUNT.
Referenced by relations_process(), and relations_process_multi().
void ref_ways | ( | FILE * | in | ) |
References nodes_ref_item_bin(), and read_item().
Referenced by osm_count_references().
void relations_add_relation_default_entry | ( | struct relations * | rel, |
struct relations_func * | func | ||
) |
References relations::default_members, and relations_member_new().
Referenced by process_associated_streets_setup(), and process_house_number_interpolations_setup().
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_destroy | ( | struct relations * | rel | ) |
struct relations_func* relations_func_new | ( | void(*)(void *func_priv, void *relation_priv, struct item_bin *member, void *member_priv) | func, |
void * | func_priv | ||
) |
struct relations* relations_new | ( | void | ) |
void relations_process | ( | struct relations * | rel, |
FILE * | nodes, | ||
FILE * | ways | ||
) |
References node_item::c, c, relations::default_members, relations_func::func, relations_member::func, relations_func::func_priv, item_bin_add_attr_longlong(), item_bin_add_coord(), item_bin_get_attr(), item_bin_init(), relations::member_hash, relations_member::member_priv, node_item::nd_id, read_item(), read_node_item(), and relations_member::relation_priv.
Referenced by process_associated_streets(), process_boundaries(), process_house_number_interpolations(), and process_multipolygons().
void relations_process_multi | ( | struct relations ** | rel, |
int | count, | ||
FILE * | nodes, | ||
FILE * | ways | ||
) |
References node_item::c, c, relations::default_members, relations_func::func, relations_member::func, relations_func::func_priv, item_bin_add_attr_longlong(), item_bin_add_coord(), item_bin_get_attr(), item_bin_init(), relations::member_hash, relations_member::member_priv, node_item::nd_id, read_item(), read_node_item(), and relations_member::relation_priv.
Referenced by process_turn_restrictions().
void remove_countryfiles | ( | void | ) |
References country_table, country_table::countryid, filename, country_table::nparts, country_table::size, and tempfile_unlink().
Referenced by maptool_assemble_map().
void resolve_ways | ( | FILE * | in, |
FILE * | out | ||
) |
References node_item::c, c, item_bin::clen, GET_REF, IS_REF, item_bin_write(), node_item_get(), read_item(), coord::x, and coord::y.
Referenced by osm_count_references().
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.
filename | The name of the while to where the buffer is saved to. |
b | Buffer which is saved to file. |
offset |
References buffer::base, dbg_assert, and buffer::size.
Referenced by flush_nodes(), and osm_count_references().
void sig_alrm | ( | int | sig | ) |
void sig_alrm_end | ( | void | ) |
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.
filename | Name of file for which the required size of the buffer is determined |
Referenced by maptool_load_node_table().
void sort_countries | ( | int | keep_tmpfiles | ) |
References country_table, country_table::countryid, country_table::file, item_bin_sort_file(), country_table::r, country_table::size, and world_bbox.
Referenced by main().
FILE* tempfile | ( | char * | suffix, |
char * | name, | ||
int | mode | ||
) |
References tempfile_name().
Referenced by ch_assemble_map(), ch_copy_to_tiles(), ch_create_tempfiles(), ch_generate_tiles(), files_relation_processing_new(), main(), maptool_assemble_map(), maptool_dump(), maptool_generate_tiles(), maptool_load_tilesdir(), osm_count_references(), osm_process_coastlines(), osm_process_multipolygons(), osm_process_towns(), osm_process_turn_restrictions(), osm_process_way2poi(), osm_read_input_data(), osm_resolve_coords_and_split_at_intersections(), process_boundaries_finish(), and write_countrydir().
char* tempfile_name | ( | char * | suffix, |
char * | name | ||
) |
Referenced by ch_setup(), maptool_assemble_map(), tempfile(), and write_countrydir().
void tempfile_rename | ( | char * | suffix, |
char * | from, | ||
char * | to | ||
) |
References dbg_assert.
Referenced by files_relation_processing_destroy(), osm_count_references(), and osm_resolve_coords_and_split_at_intersections().
void tempfile_unlink | ( | char * | suffix, |
char * | name | ||
) |
References contains_bbox(), rect::h, max, world_bbox, coord::x, and coord::y.
Referenced by item_bin_write_clipped(), item_bin_write_match(), process_turn_restrictions_finish(), tile_sibling_edges(), tile_write_item_minmax(), and write_countrydir().
void tile_bbox | ( | char * | tile, |
struct rect * | r, | ||
int | overlap | ||
) |
References rect::h, world_bbox, coord::x, and coord::y.
Referenced by index_submap_add().
struct item_bin_sink_func* tile_collector_new | ( | struct item_bin_sink * | out | ) |
References item_bin_sink_func_new(), item_bin_sink_func::priv_data, and tile_collector_process().
Referenced by coastline_processor_new().
int tile_collector_process | ( | struct item_bin_sink_func * | tile_collector, |
struct item_bin * | ib, | ||
struct tile_data * | tile_data | ||
) |
References tile_data::buffer, item_bin::len, and item_bin_sink_func::priv_data.
Referenced by tile_collector_new().
int tile_len | ( | char * | tile | ) |
Referenced by index_submap_add(), itembin_nicer_slicer(), merge_tiles(), and tile_write_item_minmax().
void tile_write_item_minmax | ( | struct tile_info * | info, |
struct item_bin * | ib, | ||
FILE * | reference, | ||
int | min, | ||
int | max | ||
) |
References bbox(), item_bin::clen, itembin_nicer_slicer(), overlap, tile_info::suffix, tile(), tile_len(), tile_write_item_to_tile(), and item_bin::type.
Referenced by ch_copy_to_tiles(), phase34_process_file(), and phase34_process_file_range().
void tile_write_item_to_tile | ( | struct tile_info * | info, |
struct item_bin * | ib, | ||
FILE * | reference, | ||
char * | name | ||
) |
References tile_extend(), tile_info::tiles_list, tile_info::write, and write_item().
Referenced by index_submap_add(), itembin_nicer_slicer(), itembin_write_slice_result(), and tile_write_item_minmax().
int write_aux_tiles | ( | struct zip_info * | zip_info | ) |
References aux_tile_list, dbg, aux_tile::filename, lvl_warning, aux_tile::name, aux_tile::size, write_zipmember(), zip_add_member(), and zip_get_maxnamelen().
Referenced by maptool_assemble_map().
void write_countrydir | ( | struct zip_info * | zip_info, |
int | max_index_size | ||
) |
References ATTR_IS_STRING, country_table, country_table::countryid, filename, index_country_add(), item_bin_get_attr_bin(), item_bin_get_attr_bin_last(), item_bin_read(), item_bin_remove_attr(), item_bin_write(), key, item_bin::len, max, country_table::nparts, overlap, country_table::r, country_table::size, tempfile(), tempfile_name(), tile(), attr_bin::type, and zip_get_index().
Referenced by maptool_assemble_map().
References create_tile_hash_list(), data, get_tiles_list(), index_submap_add(), init_item(), item_bin_add_attr_int(), item_bin_add_attr_range(), item_bin_add_coord_rect(), item_bin_write(), tile_info::maxlen, tile_head::name, tile_head::next, next, tile_head::num_subtiles, processed_tiles, tile_info::suffix, th_get_subtile(), tile_hash, tile_head_root, tile_info::tiles_list, tile_head::total_size, world_bbox, tile_info::write, zip_add_member(), zip_get_index(), zip_get_zipnum(), and tile_head::zipnum.
Referenced by ch_assemble_map(), ch_generate_tiles(), and phase34().
void write_zipmember | ( | struct zip_info * | zip_info, |
char * | name, | ||
int | filelen, | ||
char * | data, | ||
int | data_size | ||
) |
References zip_info::compression_level, zip_info::date, dbg_assert, zip_info::dir, zip_info::dir_size, filename, zip_info::offset, zip_info::time, zip_info::zip64, zip_write(), zip_cd::zipccrc, zip_cd::zipcmthd, zip_lfh::zipcrc, zip_cd::zipcsiz, zip_cd::zipcunc, zip_cd::zipcxtl, zip_lfh::zipmthd, zip_cd::zipofst, zip_lfh::zipsize, and zip_lfh::zipuncmp.
Referenced by ch_assemble_map(), process_slice(), write_aux_tiles(), and zip_write_index().
int zip_add_member | ( | struct zip_info * | info | ) |
References zip_info::zipnum.
Referenced by add_aux_tile(), write_aux_tiles(), and write_tilesdir().
void zip_close | ( | struct zip_info * | info | ) |
References zip_info::dir, zip_info::index, and zip_info::res2.
Referenced by maptool_assemble_map().
void zip_destroy | ( | struct zip_info * | info | ) |
FILE* zip_get_index | ( | struct zip_info * | info | ) |
References zip_info::index.
Referenced by ch_assemble_map(), index_init(), process_slice(), write_countrydir(), and write_tilesdir().
int zip_get_maxnamelen | ( | struct zip_info * | info | ) |
References zip_info::maxnamelen.
Referenced by ch_assemble_map(), process_slice(), and write_aux_tiles().
int zip_get_zipnum | ( | struct zip_info * | info | ) |
References zip_info::zipnum.
Referenced by maptool_assemble_map(), maptool_generate_tiles(), phase5(), and write_tilesdir().
struct zip_info* zip_new | ( | void | ) |
Referenced by maptool_assemble_map(), and maptool_generate_tiles().
int zip_open | ( | struct zip_info * | info, |
char * | out, | ||
char * | dir, | ||
char * | index | ||
) |
References zip_info::dir, zip_info::index, and zip_info::res2.
Referenced by maptool_assemble_map().
void zip_set_compression_level | ( | struct zip_info * | info, |
int | level | ||
) |
References zip_info::compression_level.
Referenced by maptool_assemble_map().
void zip_set_maxnamelen | ( | struct zip_info * | info, |
int | max | ||
) |
References max, and zip_info::maxnamelen.
Referenced by maptool_assemble_map().
int zip_set_timestamp | ( | struct zip_info * | info, |
char * | timestamp | ||
) |
References zip_info::date, and zip_info::time.
Referenced by maptool_assemble_map(), and maptool_generate_tiles().
void zip_set_zip64 | ( | struct zip_info * | info, |
int | on | ||
) |
References zip_info::zip64.
Referenced by maptool_assemble_map(), and maptool_generate_tiles().
void zip_set_zipnum | ( | struct zip_info * | info, |
int | num | ||
) |
References zip_info::zipnum.
Referenced by maptool_assemble_map(), maptool_generate_tiles(), and phase5().
int zip_write_directory | ( | struct zip_info * | info | ) |
References zip_info::dir, zip_info::dir_size, zip_info::offset, sig_alrm(), zip_info::zip64, zip64_eoc::zip64ecenn, zip64_eoc::zip64ecsz, zip64_eoc::zip64eneed, zip64_eoc::zip64enum, zip64_eoc::zip64eofst, zip64_eoc::zip64esize, zip64_eoc::zip64ever, zip64_eocl::zip64lofst, zip64_eocl::zip74lnum, zip_write(), zip_write_file_data(), zip_eoc::zipecenn, zip_eoc::zipecsz, zip_eoc::zipenum, zip_eoc::zipeofst, and zip_info::zipnum.
Referenced by maptool_assemble_map().
int zip_write_index | ( | struct zip_info * | info | ) |
References dbg, zip_info::index, lvl_warning, size, write_zipmember(), and zip_info::zipnum.
Referenced by maptool_assemble_map().
int attr_debug_level |
Referenced by osm_add_tag(), and parse_option().
GList* aux_tile_list |
Referenced by add_aux_tile(), and write_aux_tiles().
int bytes_read |
Referenced by osm_process_towns(), phase34(), read_item(), and wince_reader_thread().
GHashTable* dedupe_ways_hash |
Referenced by osm_end_way(), and parse_option().
int experimental |
Indicates if experimental features (if available) were enabled.
Referenced by item_order_by_type(), main(), and parse_option().
int ignore_unknown |
Referenced by filter_unknown(), and parse_option().
struct attr map_information_attrs[32] |
Referenced by maptool_assemble_map().
struct buffer node_buffer |
int overlap |
int processed_nodes |
int processed_nodes_out |
Referenced by map_resolve_coords_and_split_at_intersections(), osm_end_node(), osm_process_towns(), phase34(), and sig_alrm_do().
int processed_relations |
Referenced by map_collect_data_osm(), map_resolve_coords_and_split_at_intersections(), osm_process_towns(), osm_protobufdb_load(), phase34(), process_boundaries_setup(), process_multipolygons(), process_multipolygons_finish(), process_multipolygons_setup_worker(), process_turn_restrictions(), process_turn_restrictions_finish(), process_turn_restrictions_setup_worker(), and sig_alrm_do().
int processed_tiles |
int processed_ways |
Referenced by map_collect_data_osm(), map_resolve_coords_and_split_at_intersections(), osm_process_towns(), osm_protobufdb_load(), phase34(), phase34_process_file(), phase34_process_file_range(), process_multipolygons(), process_multipolygons_member(), process_turn_restrictions(), sig_alrm_do(), and write_item_way_subsection().
long long slice_size |
int slices |
char* suffix |
Referenced by ch_assemble_map(), ch_generate_tiles(), phase4(), and process_slice().
int thread_count |
GHashTable* tile_hash |
GHashTable * tile_hash2 |
Referenced by add_tile_hash(), create_tile_hash(), create_tile_hash_list(), tile_extend(), and write_item().
struct tile_head * tile_head_root |
Referenced by ch_assemble_map(), phase5(), and process_slice().
struct item_bin* tmp_item_bin |
An item_bin for temporary use.
Referenced by osm_add_member(), osm_add_relation(), osm_end_relation(), osm_end_relation_multipolygon(), process_boundaries_finish(), process_multipolygons_finish(), process_turn_restrictions_finish(), and relation_add_tag().
int unknown_country |
Referenced by osm_process_towns(), and parse_option().
struct rect world_bbox |
Referenced by sort_countries(), tile(), tile_bbox(), and write_tilesdir().