navit  0.5.3-trunk
tile Struct Reference

A map tile, a rectangular region of the world. More...

Data Fields

int * start
 Memory address of the buffer containing the tile data (the actual map data). More...
 
int * end
 First memory address not belonging to the tile data. More...
 
int * pos
 Pointer to current position (start of current item) inside the tile data. More...
 
int * pos_coord_start
 Pointer to the first element inside the current item that is a coordinate. More...
 
int * pos_coord
 Current position in the coordinates region of the current item. More...
 
int * pos_attr_start
 Pointer to the first attr data structure of the current item. More...
 
int * pos_attr
 Current position in the attr region of the current item. More...
 
int * pos_next
 Pointer to the next item (the item which follows the "current item" as indicated by *pos). More...
 
struct filefi
 The file from which this tile was loaded. More...
 
int zipfile_num
 
int mode
 

Detailed Description

A map tile, a rectangular region of the world.

Represents a "map tile", a rectangular region of the world. The binfile format divides the world into tiles of different sizes for easy handling. A binfile is a ZIP archive; each member file (with the exception of index files) represents one tile. The data from a tile file is read into memory and used directly as the tile data of this struct.

See the Navit wiki for details on the binfile format:

http://wiki.navit-project.org/index.php/Navit%27s_binary_map_driver

Note that this tile struct also maintains pointers to several current positions inside the tile. These are not part of the actual tile data, but are used for working with the data.

Field Documentation

◆ end

int* tile::end

First memory address not belonging to the tile data.

Thus tile->end - tile->start represents the size of the tile data in multiples of 4 Bytes.

Referenced by binfile_coord_get(), map_rect_get_item_binfile(), map_rect_new_binfile(), push_modified_item(), push_tile(), and zipfile_to_tile().

◆ fi

struct file* tile::fi

The file from which this tile was loaded.

Referenced by map_rect_destroy_binfile(), map_rect_new_binfile(), and zipfile_to_tile().

◆ mode

◆ pos

int* tile::pos

Pointer to current position (start of current item) inside the tile data.

Referenced by binfile_attr_set(), binfile_coord_set(), binfile_item_dup(), map_rect_get_item_binfile(), map_rect_get_item_byid_binfile(), push_modified_item(), push_tile(), and setup_pos().

◆ pos_attr

int* tile::pos_attr

Current position in the attr region of the current item.

Referenced by binfile_attr_get(), binfile_attr_rewind(), binfile_attr_set(), and binfile_coord_set().

◆ pos_attr_start

int* tile::pos_attr_start

Pointer to the first attr data structure of the current item.

Referenced by binfile_attr_get(), binfile_attr_rewind(), binfile_attr_set(), binfile_coord_left(), binfile_coord_set(), and setup_pos().

◆ pos_coord

int* tile::pos_coord

Current position in the coordinates region of the current item.

Referenced by binfile_attr_set(), binfile_coord_get(), binfile_coord_left(), binfile_coord_rewind(), and binfile_coord_set().

◆ pos_coord_start

int* tile::pos_coord_start

Pointer to the first element inside the current item that is a coordinate.

That is the first position after the header of an item. The header holds 3 entries each 32bit wide integers: header[0] holds the size of the whole item (excluding this size field) header[1] holds the type of the item header[2] holds the size of the coordinates in the tile

Referenced by binfile_attr_set(), binfile_coord_rewind(), binfile_coord_set(), and setup_pos().

◆ pos_next

int* tile::pos_next

Pointer to the next item (the item which follows the "current item" as indicated by *pos).

Referenced by binfile_attr_get(), binfile_attr_set(), binfile_coord_set(), map_rect_get_item_binfile(), push_modified_item(), push_tile(), and setup_pos().

◆ start

int* tile::start

◆ zipfile_num


The documentation for this struct was generated from the following file: