navit  0.5.3-trunk
mg.h File Reference
#include <glib.h>
#include "item.h"
#include "attr.h"
#include "coord.h"
#include "data.h"
#include "projection.h"
#include "map.h"
#include "file.h"

Go to the source code of this file.

Data Structures

struct  block_data
 
struct  block
 
struct  item_priv
 Implementation-specific item data for traffic map items. More...
 
struct  town_priv
 
struct  poly_priv
 
struct  street_header
 
struct  street_type
 
struct  street_header_type
 
struct  street_str
 
struct  street_name_segment
 
struct  street_name
 
struct  housenumber
 
struct  street_name_numbers
 
struct  street_name_number
 
struct  street_priv
 
struct  map_priv
 Represents the map from a single binfile. More...
 
struct  block_bt_priv
 
struct  block_priv
 
struct  block_offset
 
struct  tree_search_node
 
struct  tree_search
 
struct  map_rect_priv
 Implementation-specific map rect data. More...
 

Macros

#define BT_STACK_SIZE   32
 

Enumerations

enum  file_index {
  file_border_ply =0 , file_bridge_ply , file_build_ply , file_golf_ply ,
  file_height_ply , file_natpark_ply , file_nature_ply , file_other_ply ,
  file_rail_ply , file_sea_ply , file_street_bti , file_street_str ,
  file_strname_stn , file_town_twn , file_tunnel_ply , file_water_ply ,
  file_woodland_ply , file_end , file_town_twn_alt1 , file_town_twn_alt2 ,
  file_street_str_alt1 , file_street_str_alt2 , file_street_str_alt3 , file_street_str_alt4 ,
  file_border_ply =0 , file_bridge_ply , file_height_ply , file_other_ply ,
  file_rail_ply , file_sea_ply , file_street_bti , file_street_str ,
  file_strname_stn , file_town_twn , file_tunnel_ply , file_water_ply ,
  file_woodland_ply , file_end
}
 

Functions

static int block_get_blocks (struct block *blk)
 
static int block_get_size (struct block *blk)
 
static int block_get_next (struct block *blk)
 
static int block_get_count (struct block *blk)
 
static void block_get_r (struct block *blk, struct coord_rect *r)
 
struct street_header __attribute__ ((packed))
 
static unsigned char street_header_get_order (struct street_header *str)
 
static int street_header_get_count (struct street_header *str)
 
static unsigned char street_type_get_order (struct street_type *str)
 
static unsigned short street_type_get_country (struct street_type *str)
 
static int street_str_get_segid (struct street_str *str)
 
static unsigned char street_str_get_limit (struct street_str *str)
 
static unsigned char street_str_get_unknown2 (struct street_str *str)
 
static unsigned char street_str_get_unknown3 (struct street_str *str)
 
static unsigned char street_str_get_type (struct street_str *str)
 
static unsigned int street_str_get_nameid (struct street_str *str)
 
static void street_name_numbers_get_coord (struct street_name_numbers *str, struct coord *c)
 
static unsigned short block_offset_get_offset (struct block_offset *blk)
 
static unsigned short block_offset_get_block (struct block_offset *blk)
 
int mg_country_from_isonum (int isonum)
 
int mg_country_to_isonum (int country)
 
int mg_country_postal_len (int country)
 
int block_init (struct map_rect_priv *mr)
 
int block_next (struct map_rect_priv *mr)
 
int block_get_byindex (struct file *file, int idx, struct block_priv *blk)
 
int block_next_lin (struct map_rect_priv *mr)
 
int tree_search_hv (char *dirname, char *filename, unsigned int search1, unsigned int search2, int *result)
 
int town_get (struct map_rect_priv *mr, struct town_priv *poly, struct item *item)
 
int town_get_byid (struct map_rect_priv *mr, struct town_priv *twn, int id_hi, int id_lo, struct item *item)
 
struct itemtown_search_get_item (struct map_rect_priv *mr)
 
int poly_get (struct map_rect_priv *mr, struct poly_priv *poly, struct item *item)
 
int poly_get_byid (struct map_rect_priv *mr, struct poly_priv *poly, int id_hi, int id_lo, struct item *item)
 
int street_get (struct map_rect_priv *mr, struct street_priv *street, struct item *item)
 
int street_get_byid (struct map_rect_priv *mr, struct street_priv *street, int id_hi, int id_lo, struct item *item)
 
int street_name_get_byid (struct map_rect_priv *mr, struct street_priv *street, int id_hi, int id_lo, struct item *item)
 
struct itemstreet_search_get_item (struct map_rect_priv *mr)
 
void tree_search_init (char *dirname, char *filename, struct tree_search *ts, int offset)
 
void tree_search_free (struct tree_search *ts)
 
int tree_search_next (struct tree_search *ts, unsigned char **p, int dir)
 
int tree_search_next_lin (struct tree_search *ts, unsigned char **p)
 
struct itemhousenumber_search_get_item (struct map_rect_priv *mr)
 
struct map_rect_privmap_rect_new_mg (struct map_priv *map, struct map_selection *sel)
 
void map_rect_destroy_mg (struct map_rect_priv *mr)
 
struct itemmap_rect_get_item_byid_mg (struct map_rect_priv *mr, int id_hi, int id_lo)
 
int housenumber_search_setup (struct map_rect_priv *mr)
 

Variables

unsigned char p [5]
 
struct street_header_type __attribute__
 

Macro Definition Documentation

◆ BT_STACK_SIZE

#define BT_STACK_SIZE   32

Enumeration Type Documentation

◆ file_index

enum file_index
Enumerator
file_border_ply 
file_bridge_ply 
file_build_ply 
file_golf_ply 
file_height_ply 
file_natpark_ply 
file_nature_ply 
file_other_ply 
file_rail_ply 
file_sea_ply 
file_street_bti 
file_street_str 
file_strname_stn 
file_town_twn 
file_tunnel_ply 
file_water_ply 
file_woodland_ply 
file_end 
file_town_twn_alt1 
file_town_twn_alt2 
file_street_str_alt1 
file_street_str_alt2 
file_street_str_alt3 
file_street_str_alt4 
file_border_ply 
file_bridge_ply 
file_height_ply 
file_other_ply 
file_rail_ply 
file_sea_ply 
file_street_bti 
file_street_str 
file_strname_stn 
file_town_twn 
file_tunnel_ply 
file_water_ply 
file_woodland_ply 
file_end 

Function Documentation

◆ __attribute__()

struct street_header __attribute__ ( (packed)  )

◆ block_get_blocks()

static int block_get_blocks ( struct block blk)
inlinestatic

References get_u32(), block::p, and p.

Referenced by block_next(), and block_next_lin().

◆ block_get_byindex()

◆ block_get_count()

static int block_get_count ( struct block blk)
inlinestatic

References get_u32(), block::p, and p.

Referenced by block_next_lin(), and poly_get().

◆ block_get_next()

static int block_get_next ( struct block blk)
inlinestatic

References get_u32(), block::p, and p.

Referenced by block_next().

◆ block_get_r()

static void block_get_r ( struct block blk,
struct coord_rect r 
)
inlinestatic

◆ block_get_size()

static int block_get_size ( struct block blk)
inlinestatic

References get_u32(), block::p, and p.

Referenced by block_get_byindex(), block_next(), and block_next_lin().

◆ block_init()

◆ block_next()

◆ block_next_lin()

◆ block_offset_get_block()

static unsigned short block_offset_get_block ( struct block_offset blk)
inlinestatic

References get_u16_unal(), block_offset::p, and p.

Referenced by town_search_get_item().

◆ block_offset_get_offset()

static unsigned short block_offset_get_offset ( struct block_offset blk)
inlinestatic

References get_u16_unal(), block_offset::p, and p.

Referenced by town_search_get_item().

◆ housenumber_search_get_item()

◆ housenumber_search_setup()

◆ map_rect_destroy_mg()

void map_rect_destroy_mg ( struct map_rect_priv mr)

◆ map_rect_get_item_byid_mg()

◆ map_rect_new_mg()

◆ mg_country_from_isonum()

int mg_country_from_isonum ( int  isonum)

◆ mg_country_postal_len()

int mg_country_postal_len ( int  country)

◆ mg_country_to_isonum()

int mg_country_to_isonum ( int  country)

References country_isonums, and country_isonum::isonum.

Referenced by street_attr_get().

◆ poly_get()

◆ poly_get_byid()

int poly_get_byid ( struct map_rect_priv mr,
struct poly_priv poly,
int  id_hi,
int  id_lo,
struct item item 
)

◆ street_get()

◆ street_get_byid()

int street_get_byid ( struct map_rect_priv mr,
struct street_priv street,
int  id_hi,
int  id_lo,
struct item item 
)

◆ street_header_get_count()

static int street_header_get_count ( struct street_header str)
inlinestatic

References get_u32_unal(), p, and street_header::p.

Referenced by street_get_data().

◆ street_header_get_order()

static unsigned char street_header_get_order ( struct street_header str)
inlinestatic

References street_header::p.

Referenced by street_attr_get(), and street_get().

◆ street_name_get_byid()

◆ street_name_numbers_get_coord()

static void street_name_numbers_get_coord ( struct street_name_numbers str,
struct coord c 
)
inlinestatic

◆ street_search_get_item()

◆ street_str_get_limit()

static unsigned char street_str_get_limit ( struct street_str str)
inlinestatic

References street_str::p.

Referenced by street_attr_get(), and street_get().

◆ street_str_get_nameid()

static unsigned int street_str_get_nameid ( struct street_str str)
inlinestatic

References get_u32_unal(), street_str::p, and p.

Referenced by street_attr_get().

◆ street_str_get_segid()

static int street_str_get_segid ( struct street_str str)
inlinestatic

◆ street_str_get_type()

static unsigned char street_str_get_type ( struct street_str str)
inlinestatic

References street_str::p.

Referenced by street_attr_get(), and street_get().

◆ street_str_get_unknown2()

static unsigned char street_str_get_unknown2 ( struct street_str str)
inlinestatic

References street_str::p.

Referenced by street_attr_get().

◆ street_str_get_unknown3()

static unsigned char street_str_get_unknown3 ( struct street_str str)
inlinestatic

References street_str::p.

Referenced by street_attr_get().

◆ street_type_get_country()

static unsigned short street_type_get_country ( struct street_type str)
inlinestatic

References get_u16_unal(), street_type::p, and p.

Referenced by street_get().

◆ street_type_get_order()

static unsigned char street_type_get_order ( struct street_type str)
inlinestatic

References street_type::p.

◆ town_get()

◆ town_get_byid()

int town_get_byid ( struct map_rect_priv mr,
struct town_priv twn,
int  id_hi,
int  id_lo,
struct item item 
)

◆ town_search_get_item()

◆ tree_search_free()

void tree_search_free ( struct tree_search ts)

References file_destroy(), and ts.

Referenced by map_search_cleanup().

◆ tree_search_hv()

int tree_search_hv ( char *  dirname,
char *  filename,
unsigned int  search1,
unsigned int  search2,
int *  result 
)

◆ tree_search_init()

void tree_search_init ( char *  dirname,
char *  filename,
struct tree_search ts,
int  offset 
)

◆ tree_search_next()

◆ tree_search_next_lin()

int tree_search_next_lin ( struct tree_search ts,
unsigned char **  p 
)

Variable Documentation

◆ __attribute__

struct street_header_type __attribute__

◆ p

unsigned char p

Referenced by __attribute__(), add_vertex_to_java_array(), area(), attr_from_line(), block_get(), block_get_blocks(), block_get_count(), block_get_next(), block_get_size(), block_index_get_blocks(), block_index_get_next(), block_index_get_size(), block_index_item_get_blocknum(), block_index_item_get_blocks(), block_offset_get_block(), block_offset_get_offset(), block_setup_tags(), build_attrmap(), build_attrmap_line(), build_match(), build_matches(), button_callback(), button_map(), button_map_clicked(), button_press(), button_release(), callback_call(), callback_call_args(), callback_list_add_new(), callback_list_call(), callback_list_call_args(), callback_list_call_attr(), callback_list_call_attr_args(), callback_new(), callback_new_args(), callback_new_attr(), callback_new_attr_args(), callback_set_arg(), checkTimeUnit(), clip_line_endoint_to_rect_edge(), clipcode(), coord_get(), createParsedata(), debug_new(), display_add(), display_add_holes(), display_draw_arrow(), display_draw_arrows(), display_draw_spike(), display_draw_spikes(), display_text_draw(), displayitem_draw_circle(), displayitem_draw_icon(), displaylist_get_clicked_list(), draw_aligned_osd_text(), draw_array(), draw_begin(), draw_circle(), draw_compass(), draw_drag(), draw_end(), draw_handle(), draw_image(), draw_image_es(), draw_image_warp(), draw_lines(), draw_middle(), draw_multiline_osd_text(), draw_polygon(), draw_polygon_with_holes(), draw_rectangle(), draw_rectangle_do(), draw_text(), file_create_caseinsensitive(), font_freetype_get_text_bbox(), font_freetype_text_new(), geom_is_inside(), geom_line_middle(), geom_poly_centroid(), geom_poly_closest_point(), get_data(), get_string(), get_strings(), get_sval(), get_tag(), get_u16(), get_u24(), get_u24_unal(), get_u32(), graphics_clip_polygon(), graphics_displayitem_within_dist(), graphics_dpi_patch(), graphics_dpi_scale(), graphics_dpi_unscale(), graphics_draw_circle(), graphics_draw_drag(), graphics_draw_image(), graphics_draw_image_warp(), graphics_draw_lines(), graphics_draw_rectangle(), graphics_draw_rectangle_rounded(), graphics_draw_text(), graphics_draw_text_std(), graphics_overlay_new(), graphics_overlay_resize(), graphics_sdl_idle(), gui_internal_button(), gui_internal_cmd2_route_height_profile(), gui_internal_cmd_match_expand(), gui_internal_cmd_pois_selector(), gui_internal_cmd_position_do(), gui_internal_dbus_signal(), gui_internal_find_widget(), gui_internal_gesture_ring_add(), gui_internal_get_match_quality(), gui_internal_keynav_find_closest(), gui_internal_keynav_highlight_next(), gui_internal_keynav_point(), gui_internal_keypress(), gui_internal_label_font_new(), gui_internal_label_new_abbrev(), gui_internal_match(), gui_internal_motion(), gui_internal_poi_param_clone(), gui_internal_poi_param_free(), gui_internal_prepare_search_results_map(), gui_internal_set_click_coord(), gui_internal_table_data_free(), gui_qml_button(), gui_qml_dbus_signal(), gui_qml_keypress(), gui_qml_motion(), gui_qt5_qml_button(), gui_qt5_qml_motion(), handle_mouse_queue(), info_action(), is_clockwise(), is_inside(), is_turn_allowed(), item_bin_sort_file(), item_coord_get_within_range(), item_inside_poly_list(), itembin_poly_is_in(), itembin_slice_part_direction(), Java_org_navitproject_navit_NavitCallbackHandler_callbackMessageChannel(), Java_org_navitproject_navit_NavitGraphics_getCoordForPoint(), keypress(), label_line(), main(), map_collect_data_osm(), map_rect_get_item_garmin_img(), map_rect_get_item_textfile(), maptool_assemble_map(), maptool_dump(), maptool_generate_tiles(), maptool_load_countries(), maptool_load_node_table(), maptool_load_tilesdir(), motion_callback(), motion_notify(), motion_notify_do(), QNavitQuick::mouseEvent(), QNavitWidget::mouseEvent(), RenderArea::mouseEvent(), QNavitQuick::mouseMoveEvent(), QNavitWidget::mouseMoveEvent(), RenderArea::mouseMoveEvent(), navigation_call_callbacks(), navit_button(), navit_get_cursor_pnt(), navit_handle_button(), navit_handle_motion(), navit_map_progress(), navit_scale(), navit_set_center_coord_screen(), navit_set_center_screen(), navit_zoom_in(), navit_zoom_in_cursor(), navit_zoom_out(), navit_zoom_out_cursor(), osd_auxmap_draw(), osd_button_draw(), osd_button_init(), osd_cmd_interface_draw(), osd_compass_draw(), osd_fill_with_bgcolor(), osd_gps_status_draw(), osd_image_init(), osd_j1850_draw(), osd_marker_draw(), osd_nav_next_turn_draw(), osd_nav_toggle_announcer_draw(), osd_navigation_status_draw_do(), osd_odometer_click(), osd_route_guard_draw(), osd_scale_draw(), osd_speed_warner_click(), osd_speed_warner_draw(), osd_std_click(), osd_stopwatch_click(), osd_stopwatch_draw(), osd_text_draw(), osd_volume_click(), osd_volume_draw(), osd_wrap_point(), osm_count_references(), osm_process_multipolygons(), osm_process_turn_restrictions(), osm_protobufdb_end_node(), osm_protobufdb_end_relation(), osm_protobufdb_end_way(), osm_protobufdb_insert_node(), osm_protobufdb_insert_relation(), osm_protobufdb_insert_way(), osm_protobufdb_load(), osm_read_input_data(), osm_resolve_coords_and_split_at_intersections(), osm_update_attr_present(), overlay_new(), overlay_rect(), overlay_resize(), parse_member(), parse_nd(), parse_node(), parse_option(), parse_relation(), parse_tag(), parse_way(), parse_xkbd_args(), org.navitproject.navit.Navit::parseNavigationURI(), pedestrian_draw_arrow(), pedestrian_graphics_postdraw(), pngrender(), point_get_from_message(), poly_get_data(), polygon_area(), popup(), raster_aapolygon(), raster_aapolygon_with_holes(), raster_polygon_with_holes(), relative_pos(), request_navit_route_export_geojson(), request_navit_set_center_screen(), request_navit_zoom(), rm_get_item(), route_graph_add_point(), route_graph_get_point_last(), route_graph_get_point_next(), route_graph_point_new(), route_graph_point_update(), route_graph_process_restriction_point(), route_graph_process_restriction_segment(), rp_attr_get(), rp_get_item(), scroll(), search_by_address_attr(), search_list_get_result(), search_list_result_destroy(), search_list_street_new(), search_phrase_str(), search_phrase_used(), set_attr_do(), side(), snip(), start_phase(), street_coord_get_begin(), street_get_coord(), street_get_data(), street_header_get_count(), street_name_coord_get(), street_name_get(), street_name_get_by_id(), street_name_number_get(), street_name_numbers_get(), street_name_numbers_get_coord(), street_search_compare(), street_str_get_nameid(), street_str_get_segid(), street_type_get_country(), svg_debug_draw_circle(), svg_debug_draw_drag(), svg_debug_draw_image(), svg_debug_draw_lines(), svg_debug_draw_polygon(), svg_debug_draw_rectangle(), svg_debug_draw_text(), town_get_data(), town_search_compare(), traffic_location_get_matching_points(), traffic_location_get_point_match(), traffic_point_match_segment_attributes(), traffic_route_append(), traffic_route_flood_graph(), transform_move(), transform_reverse(), transform_reverse_near_far(), transform_rotate(), transform_screen_to_3d(), transform_set_screen_center(), transform_within_border(), uint_sqrt(), vehicle_draw_do(), vehicle_file_open(), vehicle_file_parse(), vehicle_wince_parse(), VSI_SHP_Read(), VSI_SHP_Write(), QNavitQuick::wheelEvent(), QNavitWidget::wheelEvent(), RenderArea::wheelEvent(), within_dist_line(), within_dist_polygon(), within_dist_polyline(), and WndProc().