Difference between revisions of "Textfile"

From Navit's Wiki
Jump to: navigation, search
m
 
Line 1: Line 1:
 
Apart from the various maps format it can read, NavIt also supports its own map format.
 
Apart from the various maps format it can read, NavIt also supports its own map format.
 
This is useful for converting some datas sources (gpx, OSM) into something NavIt can read without too much work.
 
This is useful for converting some datas sources (gpx, OSM) into something NavIt can read without too much work.
 +
A Example is given there [[Other maps]]
  
 
=Overview=
 
=Overview=

Revision as of 19:26, 5 January 2008

Apart from the various maps format it can read, NavIt also supports its own map format. This is useful for converting some datas sources (gpx, OSM) into something NavIt can read without too much work. A Example is given there Other maps

Overview

You can define polygons/polylines and points.

Polygons/Polylines are specified as follows:

type=<any type from item_def.h> attr1=xxx attr2="ab cd"
coordinate1
coordinate2
coordinate3

coordinate might be in the following formats:

DDMM.MMMM N/S DDMM.MMMM E/W
0xXXX 0xXXX (for M&G mercator projection)
[-]dd.dddd [-]dd.dddd

Others may be implemented by expanding coord_parse in coord.c If you want to have points after polylines/polygons, you have to add an empty line after the polys Then:

coordinate type=<any type from item_def.h> attr1=xxx attr2="ab cd"

and so on, every line a point

You can also mix polys and points:

type=<any type from item_def.h> attr1=xxx attr2="ab cd"
coordinate1 type=<any type from item_def.h> attr1=xxx attr2="ab cd"
coordinate2 type=<any type from item_def.h> attr1=xxx attr2="ab cd"
coordinate3 type=<any type from item_def.h> attr1=xxx attr2="ab cd"


Confusing? Here's a sample :)

type=rail debug="way_id=2953991 railway='rail' "
4821.199248 N 1056.437366 E
4821.194591 N 1056.596736 E
type=rail debug="way_id=2953991 railway='rail' "
4821.194591 N 1056.596736 E
4821.173691 N 1056.880243 E


The following sample define two segments used for a railway. You will notice that the second coordinates of the first item and the first coordinate of the second items are the same, to ensure a good overlapping. This is not necessary, but that way it ensures a consistent drawing.

List of usable types :

Points :

ITEM(country_label) ( example : type=country_label label="Germany" )
ITEM(town_ghost)
ITEM(highway_exit_label)
ITEM(port_label)
ITEM(label_unkn)
ITEM(highway_exit)
ITEM(poi_lake)
ITEM(poi_island)
ITEM(poi)
ITEM(waypoint)
ITEM(bookmark)
ITEM(former_destination)
ITEM(poi_land_feature)
ITEM(poi_cape)
ITEM(poi_rock)
ITEM(poi_airport)
ITEM(poi_toll_booth)
ITEM(poi_fuel)
ITEM(poi_hotel)
ITEM(poi_camp_rv)
ITEM(poi_marina)
ITEM(poi_attraction)
ITEM(poi_museum_history)
ITEM(poi_shopping)
ITEM(poi_car_dealer_parts)
ITEM(poi_car_parking)
ITEM(poi_wreck)
ITEM(poi_building)
ITEM(poi_bridge)
ITEM(poi_park)
ITEM(poi_water_feature)
ITEM(poi_bar)
ITEM(poi_picnic)
ITEM(poi_hospital)
ITEM(poi_camping)
ITEM(poi_public_utilities) 

Lines :

ITEM(border_country)
ITEM(border_state)
ITEM(rail)
ITEM(water_line)
ITEM(street_nopass)
ITEM(street_0)
ITEM(street_1_city) ( example : type=street_1_city label="Chopina street" )
ITEM(street_2_city)
ITEM(street_3_city)
ITEM(street_4_city)
ITEM(highway_city)
ITEM(street_1_land)
ITEM(street_2_land)
ITEM(street_3_land)
ITEM(street_4_land)
ITEM(street_n_lanes)
ITEM(highway_land)
ITEM(ramp)
ITEM(ferry)
ITEM(roadbook)
ITEM(street_unkn)
ITEM(street_route)
ITEM(height_line_1)
ITEM(height_line_2) 

Areas :

ITEM(wood) ( example : type=wood label="Fôret domaniale" )
ITEM(water_poly) ( example : type=water_poly label="La Seine" )
ITEM(town_poly) ( example : type=town_poly label="Köln" )
ITEM(cemetery_poly)
ITEM(parking_lot_poly)
ITEM(industry_poly)
ITEM(airport_poly)
ITEM(hospital_poly)
ITEM(park_poly)
ITEM(sport_poly)
ITEM(image)
ITEM(image_path)
ITEM(commercial_center)
ITEM(golf_course)