Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql-spatial.sql @ 1243:3ebc0a7d6793
Removed all tables for different datasets at HYdrologie/Hydr.Grenzen/Linien/*
flys-backend/trunk@2716 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Hans Plum <hans.plum@intevation.de> |
---|---|
date | Tue, 13 Sep 2011 10:34:44 +0000 |
parents | d6520d46edb7 |
children | b28ab244a77d |
comparison
equal
deleted
inserted
replaced
1242:d6520d46edb7 | 1243:3ebc0a7d6793 |
---|---|
124 -- ); | 124 -- ); |
125 -- SELECT AddGeometryColumn('hws','geom',31466,'MULTILINESTRING',2); | 125 -- SELECT AddGeometryColumn('hws','geom',31466,'MULTILINESTRING',2); |
126 -- ALTER TABLE hw ALTER COLUMN id SET DEFAULT NEXTVAL('HWS_ID_SEQ'); | 126 -- ALTER TABLE hw ALTER COLUMN id SET DEFAULT NEXTVAL('HWS_ID_SEQ'); |
127 | 127 |
128 -- Hydrologie/Hydr. Grenzen/Linien | 128 -- Hydrologie/Hydr. Grenzen/Linien |
129 -- BfG/boeschung_*.shp | |
130 CREATE SEQUENCE BANKS_ID_SEQ; | |
131 CREATE TABLE banks ( | |
132 id int PRIMARY KEY NOT NULL, | |
133 river_id int REFERENCES rivers(id) | |
134 ); | |
135 SELECT AddGeometryColumn('banks','geom',31466,'MULTILINESTRING',2); | |
136 ALTER TABLE banks ALTER COLUMN id SET DEFAULT NEXTVAL('BANKS_ID_SEQ'); | |
137 | |
138 -- BfG/hauptoeff_*.shp | |
139 CREATE SEQUENCE MAINSPANS_ID_SEQ; | |
140 CREATE TABLE mainspans( | |
141 id int PRIMARY KEY NOT NULL, | |
142 river_id int REFERENCES rivers(id) | |
143 ); | |
144 SELECT AddGeometryColumn('mainspans','geom',31466,'MULTILINESTRING',2); | |
145 ALTER TABLE mainspans ALTER COLUMN id SET DEFAULT NEXTVAL('MAINSPANS_ID_SEQ'); | |
146 | |
147 -- BfG/MNQ-*.shp | |
148 CREATE SEQUENCE MNQ_ID_SEQ; | |
149 CREATE TABLE mnq (gid serial PRIMARY KEY, | |
150 id int PRIMARY KEY NOT NULL, | |
151 river_id int REFERENCES rivers(id), | |
152 haltung varchar(16) | |
153 ); | |
154 SELECT AddGeometryColumn('mnq', 'the_geom',31466,'MULTIPOLYGON',2); | |
155 ALTER TABLE mnq ALTER COLUMN id SET DEFAULT NEXTVAL('MNQ_ID_SEQ'); | |
156 | |
157 -- BfG/modellgrenze*.shp | |
158 CREATE SEQUENCE MODELBOUNDARY_ID_SEQ; | |
159 CREATE TABLE modelboundary ( | |
160 id int PRIMARY KEY NOT NULL, | |
161 river_id int REFERENCES rivers(id) | |
162 ); | |
163 SELECT AddGeometryColumn('modelboundary','geom',31466,'MULTILINESTRING',2); | |
164 ALTER TABLE modelboundary ALTER COLUMN id SET DEFAULT NEXTVAL('MODELBOUNDARY_ID_SEQ'); | |
165 | |
166 -- TODO: Klaeren ob benoetigt, da einzel Geometrien in Tabelle vorland. | |
167 -- BfG/saar-sld-vorland.shp | |
168 | |
169 -- BfG/uferlinie.shp | |
170 CREATE SEQUENCE SHORELINE_ID_SEQ; | |
171 CREATE TABLE shoreline( | |
172 id int PRIMARY KEY NOT NULL, | |
173 river_id int REFERENCES rivers(id) | |
174 ); | |
175 SELECT AddGeometryColumn('shoreline','geom',31466,'MULTILINESTRING',2); | |
176 ALTER TABLE shoreline ALTER COLUMN id SET DEFAULT NEXTVAL('SHORELINE_ID_SEQ'); | |
177 | |
178 -- BfG/vorland_*.shp | |
179 CREATE SEQUENCE FORELAND_ID_SEQ; | |
180 CREATE TABLE foreland( | |
181 id int PRIMARY KEY NOT NULL, | |
182 river_id int REFERENCES rivers(id) | |
183 ); | |
184 SELECT AddGeometryColumn('foreland','geom',31466,'MULTILINESTRING',2); | |
185 ALTER TABLE foreland ALTER COLUMN id SET DEFAULT NEXTVAL('FORELANDS_ID_SEQ'); | |
186 | 129 |
187 | 130 |
188 -- Hydrologie/Streckendaten | 131 -- Hydrologie/Streckendaten |
189 -- pegellage_saar.shp | 132 -- pegellage_saar.shp |
190 CREATE SEQUENCE LEVELPOSITION_ID_SEQ; | 133 CREATE SEQUENCE LEVELPOSITION_ID_SEQ; |