class bildstreifen(Base, Vector): __tablename__ = 'view_bildstreifen' __table_args__ = ({'schema': 'ads40', 'autoload': False}) __template__ = 'templates/htmlpopup/lubis_bildstreifen.mako' __bodId__ = 'ch.swisstopo.lubis-bildstreifen' __returnedGeometry__ = 'the_geom_footprint' __timeInstant__ = 'bgdi_flugjahr' __extended_info__ = True id = Column('bildstreifen_nr', Text, primary_key=True) the_geom = GeometryColumn('the_geom', Geometry(dimensions=2, srid=21781)) the_geom_footprint = GeometryColumn('the_geom_footprint', Geometry(dimensions=2, srid=21781)) flugdatum = Column('flugdatum', Text) firma = Column('firma', Text) filmart = Column('filmart', Text) bgdi_flugjahr = Column('bgdi_flugjahr', Integer) resolution = Column('resolution', Text) objectid = Column('objectid', Text) area = Column('area', Text) gsd = Column('gsd', Numeric) toposhop_length = Column('toposhop_length', Numeric) toposhop_start_x = Column('toposhop_start_x', Integer) toposhop_start_y = Column('toposhop_start_y', Integer) toposhop_end_x = Column('toposhop_end_x', Integer) toposhop_end_y = Column('toposhop_end_y', Integer) toposhop_date = Column('toposhop_date', Text)
class luftbilder_swisstopo_sw(Base, Vector): __tablename__ = 'luftbilder_swisstopo_bw' __table_args__ = ({ 'schema': 'public', 'autoload': False, 'extend_existing': True }) __template__ = 'templates/htmlpopup/lubis.mako' __bodId__ = 'ch.swisstopo.lubis-luftbilder_schwarzweiss' __returnedGeometry__ = 'the_geom_footprint' __timeInstant__ = 'bgdi_flugjahr' __extended_info__ = True id = Column('ebkey', Text, primary_key=True) the_geom = GeometryColumn('the_geom', Geometry(dimensions=2, srid=21781)) the_geom_footprint = GeometryColumn('the_geom_footprint', Geometry(dimensions=2, srid=21781)) filename = Column('filename', Text) inventarnummer = Column('inventarnummer', Integer) bildnummer = Column('bildnummer', Integer) flugdatum = Column('flugdatum', Text) firma = Column('firma', Text) filmart = Column('filmart', Text) bgdi_flugjahr = Column('bgdi_flugjahr', Integer) orientierung = Column('orientierung', Boolean) originalsize = Column('originalsize', Text) x = Column('x', Integer) y = Column('y', Integer) flughoehe = Column('flughoehe', Integer) ort = Column('ort', Text) massstab = Column('massstab', Integer) filesize_mb = Column('filesize_mb', Text) bgdi_imagemode = Column('bgdi_imagemode', Text) image_height = Column('image_height', Integer) image_width = Column('image_width', Integer)
class Article(Base, GeometryTableMixIn): __tablename__ = "articles" exported_keys = ["title","links_count"] id = Column(Integer, primary_key=True) title = Column(Unicode()) links_count = Column(Integer) the_geom = GeometryColumn(Geometry(srid=4326)) # @property # def links_count(self): # return len( Session.query(Link).filter(self.id == Link.id_parent).all() ) def get_linked_articles(self,as_features=False): """Return the articles linked from this article""" articles = [] for link in Session.query(Link) \ .join((Article,Article.id == Link.id_parent)) \ .filter(Article.id == self.id).all(): if link.child_article: if as_features: articles.append(link.child_article.toFeature()) else: articles.append(link.child_article) if articles and as_features: return FeatureCollection(articles) else: return articles
class Kulturgueter(Base, Vector): __tablename__ = 'kgs' __table_args__ = ({'schema': 'babs', 'autoload': False}) __template__ = 'templates/htmlpopup/kgs.mako' __queryable_attributes__ = ['zkob'] __bodId__ = 'ch.babs.kulturgueter' __extended_info__ = True id = Column('kgs_nr', Integer, primary_key=True) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781)) zkob = Column('zkob', Text) x = Column('x', Numeric) y = Column('y', Numeric) kategorie = Column('kategorie', Text) gemeinde = Column('gemeinde', Text) gemeinde_ehemalig = Column('gemeinde_ehemalig', Text) objektart = Column('objektart', Text) hausnr = Column('hausnr', Text) adresse = Column('adresse', Text) kurztexte = Column('kurztexte', Text) kt_kz = Column('kt_kz', Text) pdf_list = Column('pdf_list', Text) link_uri = Column('link_uri', Text) link_title = Column('link_title', Text) link_2_uri = Column('link_2_uri', Text) link_2_title = Column('link_2_title', Text) link_3_uri = Column('link_3_uri', Text) link_3_title = Column('link_3_title', Text)
class Lake(Base): __tablename__ = 'lakes' lake_id = Column(Integer, primary_key=True) lake_name = Column(String) lake_geom = GeometryColumn(Geometry(2, wkt_internal=True), comparator=PGComparator) road_id = Column(Integer, ForeignKey('ROADS.road_id'))
class oekom_abstuerze(Base, Vector): __tablename__ = 'oekom_abstuerze' __table_args__ = ({'schema': 'wasser', 'autoload': False}) __bodId__ = 'ch.bafu.oekomorphologie-f_abstuerze' __template__ = 'templates/htmlpopup/oekom_abstuerze.mako' __extended_info__ = True id = Column('bgdi_id', Integer, primary_key=True) abstnr = Column('abstnr', Text) absttyp_de = Column('absttyp_de', Text) absttyp_fr = Column('absttyp_fr', Text) abstmat_de = Column('abstmat_de', Text) abstmat_fr = Column('abstmat_fr', Text) absthoehe = Column( 'absthoehe', Numeric, ) bemerkung = Column('bemerkung', Text) mass = Column( 'mass', Numeric, ) rechtswert = Column('rechtswert', Numeric) hochwert = Column('hochwert', Numeric) abschnr = Column('abschnr', Text) notizen = Column('notizen', Text) translid = Column('translid', Numeric) loc_angle_geo = Column('loc_angle_geo', Numeric) datum = Column('datum', Text) absttyp = Column('absttyp', Numeric) abstmat = Column('abstmat', Numeric) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class oekom_abschnitte(Base, Vector): __tablename__ = 'oekom_abschnitte' __table_args__ = ({'schema': 'wasser', 'autoload': False}) __bodId__ = 'ch.bafu.oekomorphologie-f_abschnitte' __template__ = 'templates/htmlpopup/oekom_abschnitte.mako' __extended_info__ = True id = Column('bgdi_id', Integer, primary_key=True) abschnr = Column('abschnr', Text) gsbreite = Column('gsbreite', Numeric) breitenvar_de = Column('breitenvar_de', Text) breitenvar_fr = Column('breitenvar_fr', Text) sohlver_de = Column('sohlver_de', Text) sohlver_fr = Column('sohlver_fr', Text) lufbebre = Column('lufbebre', Numeric) rufbebre = Column('rufbebre', Numeric) oekomklasse_de = Column('oekomklasse_de', Text) oekomklasse_fr = Column('oekomklasse_fr', Text) bemerkung = Column('bemerkung', Text) anfangsmass = Column('anfangsmass', Numeric) endmass = Column('endmass', Numeric) anfangsrechtswert = Column('anfangsrechtswert', Numeric) anfangshochwert = Column('anfangshochwert', Numeric) endrechtswert = Column('endrechtswert', Numeric) endhochwert = Column('endhochwert', Numeric) eindol_de = Column('eindol_de', Text) eindol_fr = Column('eindol_fr', Text) vnatabst_de = Column('vnatabst_de', Text) vnatabst_fr = Column('vnatabst_fr', Text) tiefenvar_de = Column('tiefenvar_de', Text) tiefenvar_fr = Column('tiefenvar_fr', Text) sohlmat = Column('sohlmat', Numeric) lbukver_de = Column('lbukver_de', Text) lbukver_fr = Column('lbukver_fr', Text) rbukver_de = Column('rbukver_de', Text) rbukver_fr = Column('rbukver_fr', Text) lbukmat_de = Column('lbukmat_de', Text) lbukmat_fr = Column('lbukmat_fr', Text) rbukmat_de = Column('rbukmat_de', Text) rbukmat_fr = Column('rbukmat_fr', Text) luferber_de = Column('luferber_de', Text) luferber_fr = Column('luferber_fr', Text) ruferber_de = Column('ruferber_de', Text) ruferber_fr = Column('ruferber_fr', Text) lufbebew_de = Column('lufbebew_de', Text) lufbebew_fr = Column('lufbebew_fr', Text) rufbebew_de = Column('rufbebew_de', Text) rufbebew_fr = Column('rufbebew_fr', Text) bewalgen_de = Column('bewalgen_de', Text) bewalgen_fr = Column('bewalgen_fr', Text) bewmakro_de = Column('bewmakro_de', Text) bewmakro_fr = Column('bewmakro_fr', Text) totholz_de = Column('totholz_de', Text) totholz_fr = Column('totholz_fr', Text) notizen = Column('notizen', Text) translid = Column('translid', Numeric) datum = Column('datum', Text) oekomklasse = Column('oekomklasse', Numeric) sohlmat_de = Column('sohlmat_de', Text) sohlmat_fr = Column('sohlmat_fr', Text) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class Gebietsauslaesse(Base, Vector): __tablename__ = 'outlets' __table_args__ = ({'schema': 'wasser', 'autoload': False}) __bodId__ = 'ch.bafu.wasser-gebietsauslaesse' __template__ = 'templates/htmlpopup/gebietsauslaesse.mako' __extended_info__ = True id = Column('bgdi_id', Integer, primary_key=True) ezgnr = Column('ezgnr', Integer) gwlnr = Column('gwlnr', Text) measure = Column('measure', Integer) gesamtflae = Column('gesamtflae', Text) gewaessern = Column('gewaessern', Text) anteil_ch = Column('anteil_ch', Text) kanal_de = Column('kanal_de', Text) kanal_fr = Column('kanal_fr', Text) kanal_it = Column('kanal_it', Text) kanal_rm = Column('kanal_rm', Text) kanal_en = Column('kanal_en', Text) meanalt = Column('meanalt', Text) maxalt = Column('maxalt', Text) mq_jahr = Column('mq_jahr', Text) feuchtflae = Column('feuchtflae', Text) wasserflae = Column('wasserflae', Text) bebautefl = Column('bebautefl', Text) landwirtsc = Column('landwirtsc', Text) wald_natur = Column('wald_natur', Text) the_geom = GeometryColumn(Geometry(dimensions=2, srid=21781))
class MappedClass(Base): __tablename__ = "table" id = Column(types.Integer, primary_key=True) text = Column(types.Unicode) geom = GeometryColumn(Geometry(dimension=2, srid=4326)) def __init__(self, feature): self.id = feature.id self.__update__(feature) def __update__(self, feature): geometry = feature.geometry if geometry is not None and \ not isinstance(geometry, Default): shape = asShape(feature.geometry) self.geom = WKBSpatialElement(buffer(shape.wkb), srid=4326) self.geom.shape = shape self.text = feature.properties.get('text', None) @property def __geo_interface__(self): id = self.id geometry = self.geom.shape properties = dict(text=self.text) return Feature(id=id, geometry=geometry, properties=properties)
class RoutingEdge(Base, GeometryTableMixIn): __tablename__ = 'edges' __table_args__ = { "autoload": True, "autoload_with": Session.bind } the_geom = GeometryColumn(Geometry(srid=4326))
class emissionplan(Base, Vector): __tablename__ = 'laerm_emplan_bahn_2015' __table_args__ = ({'schema': 'diverse', 'autoload': False}) __bodId__ = 'ch.bav.laerm-emissionplan_eisenbahn_2015' __template__ = 'templates/htmlpopup/emissionplan.mako' __extended_info__ = True id = Column('id', Integer, primary_key=True) lin_nr_dfa = Column('lin_nr_dfa', Numeric) von_m = Column('von_m', Numeric) bis_m = Column('bis_m', Numeric) lre_t = Column('lre_t', Numeric) lre_n = Column('lre_n', Numeric) k1_t = Column('k1_t', Numeric) k1_n = Column('k1_n', Numeric) fb1 = Column('fb1', Numeric) fb2 = Column('fb2', Numeric) grund1 = Column('grund1', Text) grund2 = Column('grund2', Text) linienbeze = Column('linienbeze', Text) von_abkz = Column('von_abkz', Text) von_bpk_bp = Column('von_bpk_bp', Text) bis_abkz = Column('bis_abkz', Text) bis_bpk_bp = Column('bis_bpk_bp', Text) typ_aender = Column('typ_aender', Text) datum = Column('datum', Text) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class baugrundklassen(Base, Vector): __tablename__ = 'baugrundklassen' __table_args__ = ({'schema': 'gefahren', 'autoload': False}) __bodId__ = 'ch.bafu.gefahren-baugrundklassen' __template__ = 'templates/htmlpopup/baugrundklassen.mako' id = Column('_count', Integer, primary_key=True) bgk = Column('bgk', Text) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class LHG(Base, Vector): __tablename__ = 'lhg' __table_args__ = ({'schema': 'hydrologie', 'autoload': False}) __bodId__ = 'ch.bafu.hydrologie-hydromessstationen' __template__ = 'templates/htmlpopup/hydromessstationen.mako' id = Column('edv_nr4', Text, primary_key=True) lhg_name = Column('lhg_name', Text) the_geom = GeometryColumn(Geometry(dimensions=2, srid=21781))
class AM_G(Base, Vector): __tablename__ = 'am_g' __table_args__ = ({'schema': 'bundinv', 'autoload': False}) __bodId__ = 'ch.bafu.bundesinventare-amphibien_wanderobjekte' __template__ = 'templates/htmlpopup/bundinv_amphibien_w.mako' id = Column('am_g_obj', Integer, primary_key=True) am_g_name = Column('am_g_name', Text) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class Road(Base): __tablename__ = 'ROADS' road_id = Column(Integer, primary_key=True) road_name = Column(String) road_geom = GeometryColumn(Geometry(2), comparator=PGComparator, nullable=False)
class Road(Base): __tablename__ = 'ROADS' road_id = Column(Integer, primary_key=True) road_name = Column(String) road_geom = GeometryColumn(Geometry(2), comparator=PGComparator, nullable=False) lakes = relationship('Lake', backref="road")
class TERRITORIALREGIONEN(Base, Vector): __tablename__ = 'territorialregionen' __table_args__ = ({'autoload': False}) __template__ = 'templates/htmlpopup/territorialregionen.mako' __bodId__ = 'ch.vbs.territorialregionen' id = Column('terreg_nr', Integer, primary_key=True) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781)) name = Column('name', Text)
class Beschaeftigtendichte(Base, Vector): __tablename__ = 'beschaeftigtendichte' __table_args__ = ({'schema': 'siedlung_landschaft', 'autoload': False}) __template__ = 'templates/htmlpopup/beschaeftigtendichte.mako' __bodId__ = 'ch.are.beschaeftigtendichte' id = Column('row_id', Integer, primary_key=True) empt_ha = Column('empt_ha', Numeric) stand = Column('stand', Numeric) the_geom = GeometryColumn(Geometry(dimensions=2, srid=21781))
class GueteklasseOev(Base, Vector): __tablename__ = 'gueteklassen' __table_args__ = ({'schema': 'oeffentlicher_verkehr', 'autoload': False}) __template__ = 'templates/htmlpopup/gueteklasseoev.mako' __bodId__ = 'ch.are.gueteklassen_oev' id = Column('id', Integer, primary_key=True) klasse_de = Column('klasse_de', Text) klasse_fr = Column('klasse_fr', Text) the_geom = GeometryColumn(Geometry(dimensions=2, srid=21781))
class Alpenkonvention(Base, Vector): __tablename__ = 'alpenkonvention' __table_args__ = ({'schema': 'siedlung_landschaft', 'autoload': False}) __template__ = 'templates/htmlpopup/alpenkonvention.mako' __bodId__ = 'ch.are.alpenkonvention' id = Column('row_id', Integer, primary_key=True) the_geom = GeometryColumn(Geometry(dimensions=2, srid=21781)) flaeche_ha = Column('flaeche_ha', Numeric) stand = Column('stand', Numeric)
class Gemeindetyp(Base, Vector): __tablename__ = 'gemeindetyp_1990_9klassen' __table_args__ = ({'schema': 'siedlung_landschaft', 'autoload': False}) __template__ = 'templates/htmlpopup/gemeindetyp.mako' __bodId__ = 'ch.are.gemeindetyp-1990-9klassen' id = Column('gde_no', Integer, primary_key=True) name = Column('name', Text) nom = Column('nom', Text) the_geom = GeometryColumn(Geometry(dimensions=2, srid=21781))
class UNESCO(Base, Vector): __tablename__ = 'unesco' __table_args__ = ({'autoload': False}) __template__ = 'templates/htmlpopup/unesco_bak.mako' __bodId__ = 'ch.bak.schutzgebiete-unesco_weltkulturerbe' id = Column('bgdi_id', Integer, primary_key=True) bgdi_name = Column('bgdi_name', Text) bgdi_surface = Column('bgdi_surface', Text) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class Teileinzugsgebiete40(Base, Vector): __tablename__ = 'ebene_40km' __table_args__ = ({'schema': 'wasser', 'autoload': False}) __bodId__ = 'ch.bafu.wasser-teileinzugsgebiete_40' __template__ = 'templates/htmlpopup/teileinzugsgebiete40.mako' id = Column('bgdi_id', Integer, primary_key=True) tezgnr40 = Column('tezgnr40', Integer) teilezgfla = Column('teilezgfla', Numeric) the_geom = GeometryColumn(Geometry(dimensions=2, srid=21781))
class HOLZZUWACHS(Base, Vector): __tablename__ = 'holzzuwachs' __table_args__ = ({'schema': 'wald', 'autoload': False}) __bodId__ = 'ch.bafu.holzzuwachs' __template__ = 'templates/htmlpopup/holzzuwachs.mako' id = Column('gid', Integer, primary_key=True) wirtschaftsregion = Column('wirtschaftsregion', Text) holzzuwachs = Column('holzzuwachs', Numeric) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class HOLZNUTZUNG(Base, Vector): __tablename__ = 'holznutzung' __table_args__ = ({'schema': 'wald', 'autoload': False}) __bodId__ = 'ch.bafu.holznutzung' __template__ = 'templates/htmlpopup/holznutzung.mako' id = Column('gid', Integer, primary_key=True) wireg_ = Column('wireg_', Text) nutzung = Column('nutzung', Numeric) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class totholz(Base, Vector): __tablename__ = 'totholzvolumen' __table_args__ = ({'schema': 'wald', 'autoload': False}) __bodId__ = 'ch.bafu.landesforstinventar-totholz' __template__ = 'templates/htmlpopup/totholz.mako' id = Column('bgdi_id', Integer, primary_key=True) wirtschaft = Column('wirtschaft', Text) totholzvol = Column('totholzvol', Numeric) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class AGNES(Base, Vector): __tablename__ = 'agnes' __table_args__ = ({'schema': 'fpds', 'autoload': False}) __template__ = 'templates/htmlpopup/agnes.mako' __bodId__ = 'ch.swisstopo.fixpunkte-agnes' id = Column('no', Text, primary_key=True) url = Column('url', Text) bgdi_id = Column('bgdi_id', Integer) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class amphibien_anhang4(Base, Vector): __tablename__ = 'amphibien_anhang4' __table_args__ = ({'schema': 'bundinv', 'autoload': False}) __bodId__ = 'ch.bafu.bundesinventare-amphibien_anhang4' __template__ = 'templates/htmlpopup/amphibien_anhang4.mako' id = Column('bgdi_id', Integer, primary_key=True) name = Column('name', Text) obnr = Column('obnr', Text) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781))
class Kataster_belasteten_standorte_Oereb(Base, Vector): __tablename__ = 'kataster_belasteter_standorte_oev_oereb' __table_args__ = ({'schema': 'bav', 'autoload': False}) __bodId__ = 'ch.bav.kataster-belasteter-standorte-oev.oereb' id = Column('stabil_id', Text, primary_key=True) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781)) geomType = Column('geom_type', Text) xmlData = Column('xml_data', Text) bgdi_created = Column('bgdi_created', Text) data_created = Column('data_created', Text)
class Sichereitszonen_Oereb(Base, Vector): __tablename__ = 'sichereitszonen_oereb' __table_args__ = ({'schema': 'bazl', 'autoload': False}) __bodId__ = 'ch.bazl.sicherheitszonenplan.oereb' id = Column('stabil_id', Text, primary_key=True) the_geom = GeometryColumn(Geometry(dimension=2, srid=21781)) geomType = Column('geom_type', Text) xmlData = Column('xml_data', Text) bgdi_created = Column('bgdi_created', Text) data_created = Column('data_created', Text)