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.

RevLine 
[3834]1/*
2 * Table storing spatial information
3 *
4 * C Byrom Apr 08
5 *
6 */
7DROP TABLE spatial_data CASCADE;
[3831]8CREATE TABLE spatial_data
9(
10        spatial_data_id SERIAL primary key,
[3849]11        description character varying (255),
12        create_date     timestamp
[3831]13);
[3849]14--ALTER TABLE spatial_data OWNER TO postgres;
[3831]15
16-- add 2D geometry column, 'geometry', to table - with SRS val of 4326
17select addgeometrycolumn('spatial_data','geometry',4326,'GEOMETRY',2);
[3967]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.