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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
-- Drops any existing OSMM related tables and creates fresh tables ready to receive data
DROP TABLE IF EXISTS "osmm"."boundaryline" CASCADE;
DELETE FROM geometry_columns WHERE f_table_name = 'boundaryline' AND f_table_schema = 'osmm';
CREATE TABLE "osmm"."boundaryline" ( OGC_FID SERIAL, CONSTRAINT "boundaryline_pk" PRIMARY KEY (OGC_FID) );
SELECT AddGeometryColumn('osmm','boundaryline','wkb_geometry',27700,'GEOMETRY',2);
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "fid" varchar;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "featurecode" INTEGER;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "version" INTEGER;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "versiondate" varchar;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "theme" varchar[];
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "accuracyofposition" varchar;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "changedate" varchar[];
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "reasonforchange" varchar[];
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "descriptivegroup" varchar[];
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "descriptiveterm" varchar[];
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "make" varchar;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "physicallevel" INTEGER;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "physicalpresence" varchar;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "filename" varchar;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "themes" varchar;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "descriptivegroups" varchar;
ALTER TABLE "osmm"."boundaryline" ADD COLUMN "descriptiveterms" varchar;
DROP TABLE IF EXISTS "osmm"."cartographicsymbol" CASCADE;
DELETE FROM geometry_columns WHERE f_table_name = 'cartographicsymbol' AND f_table_schema = 'osmm';
CREATE TABLE "osmm"."cartographicsymbol" ( OGC_FID SERIAL, CONSTRAINT "cartographicsymbol_pk" PRIMARY KEY (OGC_FID) );
SELECT AddGeometryColumn('osmm','cartographicsymbol','wkb_geometry',27700,'POINT',2);
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "fid" varchar;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "featurecode" INTEGER;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "version" INTEGER;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "versiondate" varchar;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "theme" varchar[];
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "changedate" varchar[];
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "reasonforchange" varchar[];
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "descriptivegroup" varchar[];
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "descriptiveterm" varchar[];
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "orientation" INTEGER;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "physicallevel" INTEGER;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "physicalpresence" varchar;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "referencetofeature" VARCHAR;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "filename" varchar;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "themes" varchar;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "descriptivegroups" varchar;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "descriptiveterms" varchar;
ALTER TABLE "osmm"."cartographicsymbol" ADD COLUMN "orientdeg" varchar;
DROP TABLE IF EXISTS "osmm"."cartographictext" CASCADE;
DELETE FROM geometry_columns WHERE f_table_name = 'cartographictext' AND f_table_schema = 'osmm';
CREATE TABLE "osmm"."cartographictext" ( OGC_FID SERIAL, CONSTRAINT "cartographictext_pk" PRIMARY KEY (OGC_FID) );
SELECT AddGeometryColumn('osmm','cartographictext','wkb_geometry',27700,'POINT',2);
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "fid" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "featurecode" INTEGER;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "version" INTEGER;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "versiondate" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "theme" varchar[];
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "changedate" varchar[];
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "reasonforchange" varchar[];
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "descriptivegroup" varchar[];
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "descriptiveterm" varchar[];
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "make" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "physicallevel" INTEGER;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "physicalpresence" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "anchorposition" INTEGER;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "font" INTEGER;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "height" FLOAT8;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "orientation" INTEGER;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "textstring" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "filename" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "themes" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "descriptivegroups" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "descriptiveterms" varchar;
ALTER TABLE "osmm"."cartographictext" ADD COLUMN "orientdeg" varchar;
DROP TABLE IF EXISTS "osmm"."topographicarea" CASCADE;
DELETE FROM geometry_columns WHERE f_table_name = 'topographicarea' AND f_table_schema = 'osmm';
CREATE TABLE "osmm"."topographicarea" ( OGC_FID SERIAL, CONSTRAINT "topographicarea_pk" PRIMARY KEY (OGC_FID) );
SELECT AddGeometryColumn('osmm','topographicarea','wkb_geometry',27700,'POLYGON',2);
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "fid" varchar;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "featurecode" INTEGER;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "version" INTEGER;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "versiondate" varchar;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "theme" varchar[];
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "calculatedareavalue" FLOAT8;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "changedate" varchar[];
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "reasonforchange" varchar[];
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "descriptivegroup" varchar[];
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "descriptiveterm" varchar[];
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "make" varchar;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "physicallevel" INTEGER;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "physicalpresence" varchar;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "filename" varchar;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "themes" varchar;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "descriptivegroups" varchar;
ALTER TABLE "osmm"."topographicarea" ADD COLUMN "descriptiveterms" varchar;
DROP TABLE IF EXISTS "osmm"."topographicline" CASCADE;
DELETE FROM geometry_columns WHERE f_table_name = 'topographicline' AND f_table_schema = 'osmm';
CREATE TABLE "osmm"."topographicline" ( OGC_FID SERIAL, CONSTRAINT "topographicline_pk" PRIMARY KEY (OGC_FID) );
SELECT AddGeometryColumn('osmm','topographicline','wkb_geometry',27700,'MULTILINESTRING',2);
ALTER TABLE "osmm"."topographicline" ADD COLUMN "fid" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "featurecode" INTEGER;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "version" INTEGER;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "versiondate" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "theme" varchar[];
ALTER TABLE "osmm"."topographicline" ADD COLUMN "accuracyofposition" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "changedate" varchar[];
ALTER TABLE "osmm"."topographicline" ADD COLUMN "reasonforchange" varchar[];
ALTER TABLE "osmm"."topographicline" ADD COLUMN "descriptivegroup" varchar[];
ALTER TABLE "osmm"."topographicline" ADD COLUMN "descriptiveterm" varchar[];
ALTER TABLE "osmm"."topographicline" ADD COLUMN "nonboundingline" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "heightabovedatum" FLOAT8;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "accuracyofheightabovedatum" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "heightabovegroundlevel" FLOAT8;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "accuracyofheightabovegroundlevel" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "make" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "physicallevel" INTEGER;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "physicalpresence" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "filename" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "themes" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "descriptivegroups" varchar;
ALTER TABLE "osmm"."topographicline" ADD COLUMN "descriptiveterms" varchar;
DROP TABLE IF EXISTS "osmm"."topographicpoint" CASCADE;
DELETE FROM geometry_columns WHERE f_table_name = 'topographicpoint' AND f_table_schema = 'osmm';
CREATE TABLE "osmm"."topographicpoint" ( OGC_FID SERIAL, CONSTRAINT "topographicpoint_pk" PRIMARY KEY (OGC_FID) );
SELECT AddGeometryColumn('osmm','topographicpoint','wkb_geometry',27700,'POINT',2);
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "fid" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "featurecode" INTEGER;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "version" INTEGER;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "versiondate" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "theme" varchar[];
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "accuracyofposition" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "changedate" varchar[];
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "reasonforchange" varchar[];
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "descriptivegroup" varchar[];
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "descriptiveterm" varchar[];
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "heightabovedatum" FLOAT8;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "accuracyofheightabovedatum" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "make" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "physicallevel" INTEGER;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "physicalpresence" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "referencetofeature" VARCHAR;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "filename" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "themes" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "descriptivegroups" varchar;
ALTER TABLE "osmm"."topographicpoint" ADD COLUMN "descriptiveterms" varchar;
|