]> err.no Git - mapper/blob - docs/osm-tables.sql
Remove area table
[mapper] / docs / osm-tables.sql
1 PRAGMA page_size=4096;
2 PRAGMA encoding = "UTF-8"; 
3
4 create table nodes (
5         nid     int primary key,
6         lat     int not null,
7         lon     int not null,
8         l       int not null default 0,
9         f       int not null default 0
10 );
11
12 create table node_tags (
13         nid     int not null,
14         t text
15 );
16
17 create table way_tags (
18         wid int not null,
19         t text
20 );
21
22 create table way (
23         wid             int primary key,
24         type    int not null,
25         nodes   int not null,
26         flags   int not null,
27         speed   int not null default 0,
28         isin    int not null default 0
29 );
30
31 create table way_updates (
32         wid             int primary key,
33         utime   int not null,
34         notes   text
35 );
36
37 create table way_n2n (
38         wsid    int not null,
39         f               int not null,
40         t               int not null
41 );
42
43 create table way_names (
44         wid             int primary key,
45         name    varchar(256)
46 );
47
48 create table way_names_nls (
49         wid             int not null,
50         lang    char(4) not null,
51         name    varchar(256)
52 );
53
54 create table way_ref (
55         rid             int primary key,
56         ref             varchar(32),
57         int_ref varchar(32)
58 );
59
60 create table places (
61         nid             int primary key,
62         type    int not null,
63         name    text,
64         isin    int
65 );
66
67 create table poi (
68         poi_id  INTEGER PRIMARY KEY AUTOINCREMENT,
69         lat             real not null,
70         lon             real not null,
71         elev    real default 0.0,
72         label   text,
73         desc    text,
74         url             text,
75         public  int default 1,
76         source  int default 0,
77         cat_id  int,
78         osm_id  int default 0,
79         isin    int default 0,
80         priority int default 2,
81         addtime int default 0
82 );
83
84 create table category (
85         cat_id          INTEGER PRIMARY KEY AUTOINCREMENT,
86         pcat_id         int,
87         priority        int not null default 2,
88         label           text,
89         desc            text,
90         color           char(6) not null default '#AAAA40',
91         icon            varchar(32),
92         enabled         int not null default 1
93 );
94