source: TI01-discovery/branches/ingestAutomation-upgrade/database/spatial_data.sql @ 3967

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/spatial_data.sql@3967
Revision 3967, 568 bytes checked in by cbyrom, 12 years ago (diff)

Update code to allow the extraction of authors, parameters and scope
from moles files + adjust the data model to handle these new data.

Line 
1/*
2 * Table storing spatial information
3 *
4 * C Byrom Apr 08
5 *
6 */
7DROP TABLE spatial_data CASCADE;
8CREATE TABLE spatial_data
9(
10        spatial_data_id SERIAL primary key,
11        description character varying (255),
12        create_date     timestamp
13);
14--ALTER TABLE spatial_data OWNER TO postgres;
15
16-- add 2D geometry column, 'geometry', to table - with SRS val of 4326
17select addgeometrycolumn('spatial_data','geometry',4326,'GEOMETRY',2);
18
19-- Create index on searchable column to speed up searches
20CREATE INDEX spatialsearch_idx ON spatial_data USING GIST(geometry);
Note: See TracBrowser for help on using the repository browser.