]> err.no Git - mapper/blob - docs/osm-tables.sql
Document the category table here too.
[mapper] / docs / osm-tables.sql
1 create table nodes (
2         nid     int primary key,
3         lat     int not null,
4         lon     int not null,
5         l       int not null default 0
6 );
7
8 create table way (
9         wid     int primary key,
10         type    int not null,
11         nodes   int not null,
12         flags   int not null,
13         len     real
14 );
15
16 create table way_seg (
17         wsid    int not null,
18         num     int not null,
19         node    int not null
20 );
21
22 create table area (
23         waid    int not null,
24         num     int not null,
25         lat     int not null,
26         lon     int not null
27 );
28
29 create table way_type (
30         wtid    int not null,
31         type    int not null
32 );
33
34 create table way_names (
35         wid     int not null,
36         name    varchar(256),
37         isin    varchar(256)
38 );
39
40 create table way_ref (
41         rid     int primary key,
42         ref     varchar(32),
43         int_ref varchar(32)
44 );
45
46 create table places (
47         nid     int primary key,
48         type    int not null,
49         name    text,
50         isin    int
51 );
52
53 create table poi (
54         poi_id integer PRIMARY KEY,
55         lat     real not null,
56         lon     real not null,
57         elev    real default 0.0,
58         label   text,
59         desc    text,
60         public  integer default 1,
61         source  integer default 0,
62         cat_id  integer,
63         osm_id  integer default 0,
64         priority int default 2
65 );
66
67 create table category (
68         cat_id integer PRIMARY KEY,
69         pcat_id int,
70         priority int,
71         label text,
72         desc text,
73         color char(6),
74         icon varchar(32),
75         enabled integer
76 );
77