From 083cb576efad616312de7161209db7de9750fcec Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Thu, 1 Nov 2007 02:40:13 +0200 Subject: [PATCH] Wee, table format changes once more :) --- docs/osm-indexes.sql | 9 ++++++--- docs/osm-tables.sql | 27 ++++++++++++++++++++------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/docs/osm-indexes.sql b/docs/osm-indexes.sql index 59ddfaa..6d69c79 100644 --- a/docs/osm-indexes.sql +++ b/docs/osm-indexes.sql @@ -1,8 +1,11 @@ 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); @@ -10,6 +13,6 @@ CREATE INDEX way_name_nls_name_idx on way_names_nls (name); 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); diff --git a/docs/osm-tables.sql b/docs/osm-tables.sql index fdfb211..044a3f3 100644 --- a/docs/osm-tables.sql +++ b/docs/osm-tables.sql @@ -3,8 +3,10 @@ PRAGMA encoding = "UTF-8"; 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 ); @@ -25,7 +27,10 @@ create table way ( 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 ( @@ -35,7 +40,7 @@ create table way_updates ( ); create table way_n2n ( - wsid int not null, + wid int not null, f int not null, t int not null ); @@ -45,6 +50,11 @@ create table way_names ( 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, @@ -61,7 +71,8 @@ create table places ( 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 ( @@ -72,18 +83,20 @@ 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, -- 2.39.5