]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/tables.sql
use bbox of geometry when searching for attached streets
[nominatim.git] / sql / tables.sql
index 949dc6ffe1c8c26dc7e6bb48727b61c4a9443a42..e2960aea0147f0069ea0edc0555dd2ed65615314 100644 (file)
@@ -69,6 +69,15 @@ CREATE TABLE location_area (
 
 CREATE TABLE location_area_large () INHERITS (location_area);
 
+DROP TABLE IF EXISTS location_area_country;
+CREATE TABLE location_area_country (
+  place_id BIGINT,
+  country_code varchar(2),
+  geometry GEOMETRY(Geometry, 4326)
+  ) {ts:address-data};
+CREATE INDEX idx_location_area_country_geometry ON location_area_country USING GIST (geometry) {ts:address-index};
+
+
 drop table IF EXISTS location_property CASCADE;
 CREATE TABLE location_property (
   place_id BIGINT,