CREATE UNIQUE INDEX poi_lat_lon_idx on poi (lat, lon, cat_id);
CREATE INDEX poi_priority on poi (priority);
-CREATE INDEX node_lat_idx on nodes (lat);
-CREATE INDEX node_lon_idx on nodes (lon);
+CREATE INDEX node_rlat_idx on nodes (rlat);
+CREATE INDEX node_rlon_idx on nodes (rlon);
+
+CREATE INDEX node_ilat_idx on nodes (ilat);
+CREATE INDEX node_ilon_idx on nodes (ilon);
CREATE INDEX way_name_idx on way_names (name);
CREATE INDEX way_name_nls_id_idx on way_names_nls (wid);
CREATE INDEX way_ref_idx on way_ref (ref);
-CREATE INDEX way_n2n_wsid_idx on way_n2n (wsid);
+CREATE INDEX way_n2n_wid_idx on way_n2n (wid);
CREATE INDEX way_n2n_f_idx on way_n2n (f);
CREATE INDEX way_n2n_t_idx on way_n2n (t);
create table nodes (
nid int primary key,
- lat int not null,
- lon int not null,
+ ilat int not null,
+ ilon int not null,
+ rlat real not null,
+ rlon real not null,
l int not null default 0,
f int not null default 0
);
nodes int not null,
flags int not null,
speed int not null default 0,
- isin int not null default 0
+ isin_c int not null default 0,
+ isin_p int not null default 0,
+ lat real not null,
+ lon real not null
);
create table way_updates (
);
create table way_n2n (
- wsid int not null,
+ wid int not null,
f int not null,
t int not null
);
name varchar(256)
);
+create table way_pc (
+ wid int primary key,
+ pc varchar(256)
+);
+
create table way_names_nls (
wid int not null,
lang char(4) not null,
nid int primary key,
type int not null,
name text,
- isin int
+ isin_p int not null,
+ isin_c int not null
);
create table poi (
label text,
desc text,
url text,
+ postal_code text,
public int default 1,
source int default 0,
cat_id int,
osm_id int default 0,
- isin int default 0,
+ isin_p int default 0,
+ isin_c int default 0,
priority int default 2,
addtime int default 0
);
create table category (
cat_id INTEGER PRIMARY KEY AUTOINCREMENT,
- pcat_id int,
+ pcat_id int not null default 0,
priority int not null default 2,
label text,
desc text,