Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/database/spatial_data_MEDIN.sql@7185
Revision 7185,
647 bytes
checked in by sdonegan, 11 years ago
(diff) |
Adding files from v4.2.0 tag to form basis for v4.3.0 version
|
Line | |
---|
1 | /* |
---|
2 | * Table storing spatial information |
---|
3 | * |
---|
4 | * C Byrom Apr 08 |
---|
5 | * |
---|
6 | */ |
---|
7 | DROP TABLE spatial_data CASCADE; |
---|
8 | CREATE TABLE spatial_data |
---|
9 | ( |
---|
10 | spatial_data_id SERIAL primary key, |
---|
11 | original_document_id int references original_document(original_document_id), |
---|
12 | description character varying (255), |
---|
13 | create_date timestamp |
---|
14 | ); |
---|
15 | --ALTER TABLE spatial_data OWNER TO postgres; |
---|
16 | |
---|
17 | -- add 2D geometry column, 'geometry', to table - with SRS val of 4326 |
---|
18 | select addgeometrycolumn('spatial_data','geometry',4326,'GEOMETRY',2); |
---|
19 | |
---|
20 | -- Create index on searchable column to speed up searches |
---|
21 | CREATE INDEX spatialsearch_idx ON spatial_data USING GIST(geometry); |
---|
Note: See
TracBrowser
for help on using the repository browser.