comparison schema/geonames.sql @ 1109:74a75a5ce770

Added geonames data and extended search for villages/cities. The free data from geonames https://download.geonames.org/ is imported into the gemma data base (for the relevant states) and used to search for cities and villages. This data might be replaced by data from the RIS-index later on..?
author Sascha Wilde <wilde@intevation.de>
date Mon, 05 Nov 2018 13:07:16 +0100
parents
children 2304778c4432
comparison
equal deleted inserted replaced
1108:5adee8b0e29f 1109:74a75a5ce770
1 -- This is Free Software under GNU Affero General Public License v >= 3.0
2 -- without warranty, see README.md and license for details.
3
4 -- SPDX-License-Identifier: AGPL-3.0-or-later
5 -- License-Filename: LICENSES/AGPL-3.0.txt
6
7 -- Copyright (C) 2018 by via donau
8 -- – Österreichische Wasserstraßen-Gesellschaft mbH
9 -- Software engineering by Intevation GmbH
10
11 -- Author(s):
12 -- * Sascha Wilde <wilde@intevation.de>
13
14
15 -- Tables for data from geonames database
16 -- https://download.geonames.org/
17 -- used for searching cities and villages...
18
19 CREATE TABLE waterway.geonames (
20 geonameid int PRIMARY KEY,
21 name varchar(200) NOT NULL,
22 asciiname varchar(200),
23 alternatenames varchar(10000),
24 location geography(POINT, 4326) NOT NULL,
25 feature_class char(1),
26 feature_code varchar(10),
27 country_code char(2),
28 cc2 varchar(200),
29 admin1_code varchar(20),
30 admin2_code varchar(80),
31 admin3_code varchar(20),
32 admin4_code varchar(20),
33 population int,
34 elevation int,
35 dem int,
36 timezone varchar(40),
37 modification_date timestamp
38 );