Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions egoio/db_tables/boundaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from sqlalchemy import BigInteger, Boolean, Column, Date, Float, Integer, Numeric, String, Table, Text, text
from geoalchemy2.types import Geometry
from sqlalchemy.ext.declarative import declarative_base
from egoio.tools import Base

Base = declarative_base()
metadata = Base.metadata


Expand Down Expand Up @@ -92,7 +92,7 @@ class BkgGn250P(Base):
box_geo = Column(String(250))
box_gk = Column(String(250))
box_utm = Column(String(250))
geom = Column(Geometry('POINT', 31467), index=True)
geom = Column(Geometry('POINT', 31467))


class BkgVg2501Sta(Base):
Expand All @@ -101,7 +101,7 @@ class BkgVg2501Sta(Base):

reference_date = Column(Date, primary_key=True, nullable=False)
id = Column(Integer, primary_key=True, nullable=False, server_default=text("nextval('boundaries.bkg_vg250_1_sta_id_seq'::regclass)"))
geom = Column(Geometry('MULTIPOLYGON', 31467), index=True)
geom = Column(Geometry('MULTIPOLYGON', 31467))
ade = Column(BigInteger)
gf = Column(BigInteger)
bsg = Column(BigInteger)
Expand Down Expand Up @@ -133,7 +133,7 @@ class BkgVg2501Sta(Base):
Column('id', Integer, unique=True),
Column('bez', Text),
Column('area_ha', Float(53)),
Column('geom', Geometry('POLYGON', 3035), index=True),
Column('geom', Geometry('POLYGON', 3035)),
schema='boundaries'
)

Expand All @@ -143,7 +143,7 @@ class BkgVg2501Sta(Base):
Column('id', Integer, unique=True),
Column('error', Boolean),
Column('error_reason', String),
Column('geom', Geometry('POINT', 3035), index=True),
Column('geom', Geometry('POINT', 3035)),
schema='boundaries'
)

Expand All @@ -155,7 +155,7 @@ class BkgVg2501Sta(Base):
Column('bez', Text),
Column('gf', Float(53)),
Column('area_ha', Float(53)),
Column('geom', Geometry('MULTIPOLYGON', 3035), index=True),
Column('geom', Geometry('MULTIPOLYGON', 3035)),
schema='boundaries'
)

Expand All @@ -166,7 +166,7 @@ class BkgVg2501Sta(Base):
Column('id', Integer, unique=True),
Column('bez', Text),
Column('area_ha', Float(53)),
Column('geom', Geometry('MULTIPOLYGON', 3035), index=True),
Column('geom', Geometry('MULTIPOLYGON', 3035)),
schema='boundaries'
)

Expand Down Expand Up @@ -200,7 +200,7 @@ class BkgVg2502Lan(Base):
ags_0 = Column(String(12))
wsk = Column(Date)
debkg_id = Column(String(16))
geom = Column(Geometry('MULTIPOLYGON', 31467), index=True)
geom = Column(Geometry('MULTIPOLYGON', 31467))


t_bkg_vg250_2_lan_brandenburg = Table(
Expand All @@ -224,7 +224,7 @@ class BkgVg2502Lan(Base):
Column('reference_date', Text),
Column('ags_0', String(12), unique=True),
Column('gen', Text),
Column('geom', Geometry('MULTIPOLYGON', 3035), index=True),
Column('geom', Geometry('MULTIPOLYGON', 3035)),
schema='boundaries'
)

Expand Down Expand Up @@ -276,7 +276,7 @@ class BkgVg2503Rbz(Base):
ags_0 = Column(String(12))
wsk = Column(Date)
debkg_id = Column(String(16))
geom = Column(Geometry('MULTIPOLYGON', 31467), index=True)
geom = Column(Geometry('MULTIPOLYGON', 31467))


class BkgVg2504Kr(Base):
Expand Down Expand Up @@ -308,7 +308,7 @@ class BkgVg2504Kr(Base):
ags_0 = Column(String(12))
wsk = Column(Date)
debkg_id = Column(String(16))
geom = Column(Geometry('MULTIPOLYGON', 31467), index=True)
geom = Column(Geometry('MULTIPOLYGON', 31467))


t_bkg_vg250_4_krs_mview = Table(
Expand All @@ -321,7 +321,7 @@ class BkgVg2504Kr(Base):
Column('rs_0', String(12)),
Column('ags_0', String(12)),
Column('area_ha', Float(53)),
Column('geom', Geometry('MULTIPOLYGON', 3035), index=True),
Column('geom', Geometry('MULTIPOLYGON', 3035)),
schema='boundaries'
)

Expand Down Expand Up @@ -355,7 +355,7 @@ class BkgVg2505Vwg(Base):
ags_0 = Column(String(12))
wsk = Column(Date)
debkg_id = Column(String(16))
geom = Column(Geometry('MULTIPOLYGON', 31467), index=True)
geom = Column(Geometry('MULTIPOLYGON', 31467))


class BkgVg2506Gem(Base):
Expand Down Expand Up @@ -387,7 +387,7 @@ class BkgVg2506Gem(Base):
ags_0 = Column(String(12))
wsk = Column(Date)
debkg_id = Column(String(16))
geom = Column(Geometry('MULTIPOLYGON', 31467), index=True)
geom = Column(Geometry('MULTIPOLYGON', 31467))


t_bkg_vg250_6_gem_dump_mview = Table(
Expand All @@ -401,7 +401,7 @@ class BkgVg2506Gem(Base):
Column('rs_0', String(12)),
Column('ags_0', String(12)),
Column('area_ha', Float(53)),
Column('geom', Geometry('POLYGON', 3035), index=True),
Column('geom', Geometry('POLYGON', 3035)),
schema='boundaries'
)

Expand All @@ -411,7 +411,7 @@ class BkgVg2506Gem(Base):
Column('id', Integer, unique=True),
Column('error', Boolean),
Column('error_reason', String),
Column('geom', Geometry('POINT', 3035), index=True),
Column('geom', Geometry('POINT', 3035)),
schema='boundaries'
)

Expand All @@ -432,7 +432,7 @@ class BkgVg2506Gem(Base):
Column('census_count', Integer),
Column('census_density', Integer),
Column('pd', Float(53)),
Column('geom', Geometry('MULTIPOLYGON', 3035), index=True),
Column('geom', Geometry('MULTIPOLYGON', 3035)),
schema='boundaries'
)

Expand Down Expand Up @@ -463,7 +463,7 @@ class BkgVg2506Gem(Base):
Column('census_count', Integer),
Column('census_density', Integer),
Column('pd', Float(53)),
Column('geom', Geometry('MULTIPOLYGON', 3035), index=True),
Column('geom', Geometry('MULTIPOLYGON', 3035)),
schema='boundaries'
)

Expand Down Expand Up @@ -493,7 +493,7 @@ class FfeOsmNut3(Base):
id = Column(Integer, primary_key=True, server_default=text("nextval('boundaries.ffe_osm_nut3_id_seq'::regclass)"))
version = Column(Text)
nuts_code = Column(String(5))
geom = Column(Geometry('MULTIPOLYGON', 3035), index=True)
geom = Column(Geometry('MULTIPOLYGON', 3035))


class OsmPostcode(Base):
Expand All @@ -505,7 +505,7 @@ class OsmPostcode(Base):
stellen = Column(Integer)
plz = Column(String(5))
note = Column(Text)
geom = Column(Geometry('MULTIPOLYGON', 4326), index=True)
geom = Column(Geometry('MULTIPOLYGON', 4326))


t_vg250_statistics = Table(
Expand Down
4 changes: 2 additions & 2 deletions egoio/db_tables/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from sqlalchemy import Column, Integer, text
from geoalchemy2.types import Geometry
from sqlalchemy.ext.declarative import declarative_base
from egoio.tools import Base

Base = declarative_base()
metadata = Base.metadata


Expand All @@ -12,4 +12,4 @@ class Cosmoclmgrid(Base):
__table_args__ = {'schema': 'climate'}

gid = Column(Integer, primary_key=True, server_default=text("nextval('climate.cosmoclmgrid_gid_seq'::regclass)"))
geom = Column(Geometry('MULTIPOLYGON', 4326), index=True)
geom = Column(Geometry('MULTIPOLYGON', 4326))
8 changes: 4 additions & 4 deletions egoio/db_tables/demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from sqlalchemy import Column, Float, Integer, Numeric, String, Table, Text
from geoalchemy2.types import Geometry
from sqlalchemy.ext.declarative import declarative_base
from egoio.tools import Base

Base = declarative_base()
metadata = Base.metadata


Expand Down Expand Up @@ -66,7 +66,7 @@ class EgoDpLoadarea(Base):
geom_centroid = Column(Geometry('POINT', 3035))
geom_surfacepoint = Column(Geometry('POINT', 3035))
geom_centre = Column(Geometry('POINT', 3035))
geom = Column(Geometry('POLYGON', 3035), index=True)
geom = Column(Geometry('POLYGON', 3035))


t_ego_dp_loadarea_v0_4_3_mview = Table(
Expand Down Expand Up @@ -113,7 +113,7 @@ class EgoDpLoadarea(Base):
Column('geom_centroid', Geometry('POINT', 3035)),
Column('geom_surfacepoint', Geometry('POINT', 3035)),
Column('geom_centre', Geometry('POINT', 3035)),
Column('geom', Geometry('POLYGON', 3035), index=True),
Column('geom', Geometry('POLYGON', 3035)),
schema='demand'
)

Expand Down Expand Up @@ -162,6 +162,6 @@ class EgoDpLoadarea(Base):
Column('geom_centroid', Geometry('POINT', 3035)),
Column('geom_surfacepoint', Geometry('POINT', 3035)),
Column('geom_centre', Geometry('POINT', 3035)),
Column('geom', Geometry('POLYGON', 3035), index=True),
Column('geom', Geometry('POLYGON', 3035)),
schema='demand'
)
2 changes: 1 addition & 1 deletion egoio/db_tables/economy.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# coding: utf-8
from sqlalchemy import Column, Float, String
from sqlalchemy.ext.declarative import declarative_base
from egoio.tools import Base

Base = declarative_base()
metadata = Base.metadata


Expand Down
Loading