Working with map data
From Navit's Wiki
Maps in Navit come in different shapes and are used for various purposes. See also Map driver.
Types of maps
Maps come in different shapes:
- A flat-file map reads items from a local file. Different map drivers are available for different file formats. They are used for road and POI maps.
- An in-memory map is dynamically generated by Navit at runtime, often with data read from other maps. They are used internally for various purposes, for example:
- The route map holds way segments which can be used to get from our current position to the chosen destination, along with information relevant for routing, such as permitted modes of transportation and expected travel times.
- The navigation map holds the way segments which are part of the calculated route, as well as turn instructions for the user.
- The traffic map holds way segments for which Navit has received traffic information which could affect travel times.
- A mapset is a collection of (one or more) maps. This allows you to combine data from multiple maps, e.g. one map with the road network and another with special POIs.
- A map holds the data used for screen display, search and routing.
- A map selection is a map query. It specifies a coordinate rectangle and a range of item types to query the map for. Multiple rectangular areas and/or non-contiguous ranges of item types can be specified by concatenating multiple map selections in a linked list.
- A map rectangle is the result of a map query. It can be obtained from the map by passing a map selection, and the resulting map rectangle can be queried for items.
- A map item holds the data for an individual item on a map, including its coordinates and various attributes. The item type specifies what the map item refers to, such as a stretch of road, a building, an area or a POI. There are also special item types used internally, such as the various kinds of turn instructions. Item types are internally represented as numbers.