Skip to content

Commit

Permalink
Merge pull request #4413 from geoadmin/feat-BGDIDIC-2849-grundeinheiten
Browse files Browse the repository at this point in the history
…_stufe

Feat bgdidic 2849 grundeinheiten stufe
  • Loading branch information
faselm committed Jul 15, 2024
2 parents b953135 + 6f80848 commit 1e67166
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 0 deletions.
35 changes: 35 additions & 0 deletions chsdi/models/vector/edi.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,38 @@ class GebaeudeWohnungsRegisterWaermequelle(Base, Vector):
the_geom = Column('the_geom', Geometry2D)

register('ch.bfs.gebaeude_wohnungs_register_waermequelle_heizung', GebaeudeWohnungsRegisterWaermequelle)


class StatistischeGrundeinheitenStufe1(Base, Vector):
__tablename__ = 'grundeinheiten_stufe1'
__table_args__ = ({'schema': 'bfs', 'autoload': False})
__bodId__ = 'ch.bfs.statistische-grundeinheiten_stufe1'
__template__ = 'templates/htmlpopup/bfs_statistische_grundeinheiten_stufe1.mako'
__label__ = 'u1_id'
id = Column('bgdi_id', Integer, primary_key=True)
u1_id = Column('u1_id', Integer)
u1_name = Column('u1_name', Unicode)
kt_id = Column('kt_id', Integer)
u1_typ = Column('u1_typ', Integer)
u1_gr_typ = Column('u1_gr_typ', Integer)
u1_gr_jr = Column('u1_gr_jr', Integer)
typ_de = Column('typ_de', Unicode)
typ_fr = Column('typ_fr', Unicode)
the_geom = Column('the_geom', Geometry2D)

register('ch.bfs.statistische-grundeinheiten_stufe1', StatistischeGrundeinheitenStufe1)


class StatistischeGrundeinheitenStufe2(Base, Vector):
__tablename__ = 'grundeinheiten_stufe2'
__table_args__ = ({'schema': 'bfs', 'autoload': False})
__bodId__ = 'ch.bfs.statistische-grundeinheiten_stufe1'
__template__ = 'templates/htmlpopup/bfs_statistische_grundeinheiten_stufe2.mako'
__label__ = 'u2_id'
id = Column('bgdi_id', Integer, primary_key=True)
u2_id = Column('u2_id', Integer)
u2_name = Column('u2_name', Unicode)
kt_id = Column('kt_id', Integer)
the_geom = Column('the_geom', Geometry2D)

register('ch.bfs.statistische-grundeinheiten_stufe2', StatistischeGrundeinheitenStufe2)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<%inherit file="base.mako"/>

<%def name="table_body(c,lang)">
<%
lang = 'de' if lang in ('de', 'rm', 'en') else 'fr'
typ = 'typ_%s' % lang
%>
<tr>
<td class="cell-left">${_('ch.bfs.statistische-grundeinheiten_stufe1.u1_id')}</td>
<td>${c['attributes']['u1_id'] or '-'}</td>
</tr>
<tr>
<td class="cell-left">${_('ch.bfs.statistische-grundeinheiten_stufe1.u1_name')}</td>
<td>${c['attributes']['u1_name'] or '-'}</td>
</tr>
<tr>
<td class="cell-left">${_('ch.bfs.statistische-grundeinheiten_stufe1.u1_gr_typ')}</td>
<td>${c['attributes'][typ] or '-'}</td>
</tr>
</%def>

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<%inherit file="base.mako"/>

<%def name="table_body(c,lang)">
<tr>
<td class="cell-left">${_('ch.bfs.statistische-grundeinheiten_stufe2.u2_id')}</td>
<td>${c['attributes']['u2_id'] or '-'}</td>
</tr>
<tr>
<td class="cell-left">${_('ch.bfs.statistische-grundeinheiten_stufe2.u2_name')}</td>
<td>${c['attributes']['u2_name'] or '-'}</td>
</tr>
</%def>

0 comments on commit 1e67166

Please sign in to comment.