GLE-Postgis-Strassen

Aus kvwmap
Wechseln zu: Navigation, Suche
CREATE TABLE gd_lk_kreisstrassen
(
  ogc_fid serial NOT NULL,
  the_geom geometry,
  abs character(16),
  strassenname character(12),
  anfangsnetzknoten character(8),
  endnetzknoten character(8),
  strassenart character(1),
  strassennummer character(5),
  abschnittsnummer character(4),
  abschnittslaenge integer,
  bemerkung character(25),
  datum date,
  ui_k character(1),
  vonnp character(1),
  nachnp character(1),
  CONSTRAINT gd_lk_kreisstrassen_pk PRIMARY KEY (ogc_fid),
  CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
  CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR the_geom IS NULL),
  CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 25833)
)
WITH (OIDS=TRUE);
SELECT AddGeometryColumn('', 'gd_lk_kreisstrassen','the_geom',25833,'LINESTRING', 2);

CREATE INDEX gd_lk_kreisstrassen_geom_idx
  ON gd_lk_kreisstrassen
  USING gist
  (the_geom);


CREATE TABLE gd_netzknoten
(
  ogc_fid serial NOT NULL,
  the_geom geometry,
  nk integer NOT NULL,
  bereich integer,
  bindung integer,
  netzknoten character(8),
  "name" character(40),
  kreisverkehr character(1),
  fiktiv character(1),
  planum character(12),
  bw character(7),
  rechtswert double precision,
  hochwert double precision,
  hoehe double precision,
  datum date,
  bemerkung character(30),
  CONSTRAINT gd_netzknoten_pk PRIMARY KEY (nk),
  CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
  CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text OR the_geom IS NULL),
  CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 25833)
)
WITH (OIDS=TRUE);
SELECT AddGeometryColumn('', 'gd_netzknoten','the_geom',25833,'POINT', 2);

CREATE INDEX gd_netzknoten_geom_idx
  ON gd_netzknoten
  USING gist
  (the_geom);


CREATE TABLE gd_netzknoten_bilder
(
  id serial NOT NULL,
  nk integer,
  subnr integer,
  datei character(120),
  datum date,
  CONSTRAINT gd_netzknoten_bilder_pk PRIMARY KEY (id)
)
WITH (OIDS=TRUE);