forked from GeoNode/geonode
-
Notifications
You must be signed in to change notification settings - Fork 29
/
worldmap_gazetteer.sql
55 lines (43 loc) · 1.38 KB
/
worldmap_gazetteer.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
-- Table: gazetteer_placename
-- DROP TABLE gazetteer_placename;
CREATE TABLE gazetteer_gazetteerentry
(
id serial NOT NULL,
layer_name character varying(256) NOT NULL,
layer_attribute character varying(256) NOT NULL,
feature_type character varying(50) NOT NULL,
feature_fid bigint NOT NULL,
latitude double precision,
longitude double precision,
place_name character varying(2048) NOT NULL,
start_date date,
end_date date,
project character varying(256),
feature geometry NOT NULL,
CONSTRAINT gazetteer_placename_pkey PRIMARY KEY (id ),
CONSTRAINT enforce_dims_feature CHECK (st_ndims(feature) = 2),
CONSTRAINT enforce_srid_feature CHECK (st_srid(feature) = 4326)
)
WITH (
OIDS=FALSE
);
ALTER TABLE gazetteer_placename
OWNER TO wmuser;
-- Index: gazetteer_placename_feature_id
-- DROP INDEX gazetteer_placename_feature_id;
CREATE INDEX gazetteer_placename_feature_id
ON gazetteer_placename
USING gist
(feature );
-- Index: gazetteer_placename_layer_attribute
-- DROP INDEX gazetteer_placename_layer_attribute;
CREATE INDEX gazetteer_placename_layer_attribute
ON gazetteer_placename
USING btree
(layer_attribute COLLATE pg_catalog."default" );
-- Index: gazetteer_placename_layer_name
-- DROP INDEX gazetteer_placename_layer_name;
CREATE INDEX gazetteer_placename_layer_name
ON gazetteer_placename
USING btree
(layer_name COLLATE pg_catalog."default" );