]> git.openstreetmap.org Git - nominatim.git/blob - lib-sql/tables/interpolation.sql
Merge pull request #4049 from Itz-Agasta/uv
[nominatim.git] / lib-sql / tables / interpolation.sql
1 -- SPDX-License-Identifier: GPL-2.0-only
2 --
3 -- This file is part of Nominatim. (https://nominatim.org)
4 --
5 -- Copyright (C) 2026 by the Nominatim developer community.
6 -- For a full list of authors see the git log.
7
8 DROP TABLE IF EXISTS location_property_osmline;
9 CREATE TABLE location_property_osmline (
10     place_id BIGINT NOT NULL,
11     osm_id BIGINT NOT NULL,
12     parent_place_id BIGINT,
13     geometry_sector INTEGER NOT NULL,
14     indexed_date TIMESTAMP,
15     type TEXT,
16     startnumber INTEGER,
17     endnumber INTEGER,
18     step SMALLINT,
19     partition SMALLINT NOT NULL,
20     indexed_status SMALLINT NOT NULL,
21     linegeo GEOMETRY(Geometry, 4326) NOT NULL,
22     address HSTORE,
23     token_info JSONB, -- custom column for tokenizer use only
24     postcode TEXT,
25     country_code VARCHAR(2)
26   ){{db.tablespace.search_data}};
27
28 CREATE UNIQUE INDEX idx_osmline_place_id ON location_property_osmline
29   USING BTREE (place_id) {{db.tablespace.search_index}};
30 CREATE INDEX idx_osmline_geometry_sector ON location_property_osmline
31   USING BTREE (geometry_sector) {{db.tablespace.address_index}};
32 CREATE INDEX idx_osmline_linegeo ON location_property_osmline
33   USING GIST (linegeo) {{db.tablespace.search_index}}
34   WHERE startnumber is not null;
35