Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Release 2024-03-13-rc1 #4351

Merged
merged 106 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
058a27c
Merge pull request #4315 from geoadmin/master
rebert Jan 31, 2024
0944507
fix luftbilder_farbe test
ltclm Feb 5, 2024
f3b984f
Merge branch 'develop-2024-03-13' into fix_integration_test
ltclm Feb 5, 2024
2c0a984
after the migration of the lubis datasource to stac the attribute
ltclm Feb 5, 2024
8943618
Merge pull request #4319 from geoadmin/fix_integration_test
ltclm Feb 5, 2024
72aeaba
BGDIDIC-2544: update legends
faselm Feb 5, 2024
42c45b8
BGDIDIC-2544: update legends
faselm Feb 5, 2024
b177609
Merge pull request #4318 from geoadmin/feat-BGDIDIC-2544-klima-co2_au…
faselm Feb 5, 2024
aefd6b4
BGDIDIC-2743: add template
faselm Feb 1, 2024
78d833b
BGDIDIC-2743: add mako
faselm Feb 1, 2024
6d8bec4
BGDIDIC-2743: update mako
faselm Feb 5, 2024
bcedc22
BGDIDIC-2743: update mako
faselm Feb 5, 2024
be34c1d
Merge pull request #4317 from geoadmin/feat-BGDIDIC-2743-armasuisse_n…
faselm Feb 5, 2024
5002c44
BGDIDIC-2743: filter typ only for points
faselm Feb 5, 2024
969c2ae
Merge pull request #4320 from geoadmin/feat-BGDIDIC-2743-armasuisse_n…
faselm Feb 5, 2024
958c803
BGDIDIC-2743: add legends
faselm Feb 6, 2024
a48f528
BGDIDIC-2743: update legends
faselm Feb 6, 2024
253419b
Merge pull request #4321 from geoadmin/feat-BGDIDIC-2743-armasuisse_n…
faselm Feb 6, 2024
d273869
BGDIDIC-984: activate time support / timeseries for
ltclm Feb 7, 2024
68e8bca
Merge pull request #4322 from geoadmin/data_BGDIDIC-984_pk25_timeseries
ltclm Feb 7, 2024
8f84dea
BGDIDIC-2743: fix point filter
faselm Feb 7, 2024
e43bee9
Merge pull request #4323 from geoadmin/feat-BGDIDIC-2743-armasuisse_n…
faselm Feb 7, 2024
145580d
BGDIDIC-2743: fix de translations
faselm Feb 9, 2024
6ea86ca
BGDIDIC-2765: update legends
faselm Feb 9, 2024
cf9ea2d
Merge pull request #4324 from geoadmin/feat-BGDIDIC-2743-armasuisse_n…
faselm Feb 9, 2024
cad069a
Merge pull request #4325 from geoadmin/feat-BGDIDIC-2765-geologie-geo…
faselm Feb 12, 2024
2461b4d
BGDIDIC-2763: add mako
faselm Feb 12, 2024
3535211
BGDIDIC-2763: add model
faselm Feb 12, 2024
7bf6d35
BGDIDIC-2763: update mako
faselm Feb 13, 2024
fa1b289
BGDIDIC-2763: add model
faselm Feb 13, 2024
672af91
BGDIDIC-2768: update legends
faselm Feb 13, 2024
ee0509d
Merge pull request #4327 from geoadmin/feat-BGDIDIC-2768-geologie-geo…
faselm Feb 13, 2024
1e1b749
BGDIDIC-2763: add koord in mako
faselm Feb 13, 2024
86163bf
Merge pull request #4326 from geoadmin/feat-BGDIDIC-2763-standorte-mo…
faselm Feb 13, 2024
a844f3b
BGDIDIC-2743: update mako links
faselm Feb 14, 2024
e483300
BGDIDIC-2743: filter mako links
faselm Feb 14, 2024
5c8f4ba
Merge pull request #4328 from geoadmin/feat-BGDIDIC-2743-armasuisse_n…
faselm Feb 14, 2024
8f73812
BGDIDIC-2763: add legends
faselm Feb 14, 2024
350b256
BGDIDIC-2763: update legends
faselm Feb 14, 2024
87d2664
Merge pull request #4329 from geoadmin/feat-BGDIDIC-2763-standorte-mo…
faselm Feb 14, 2024
a1c1e13
BGDIDIC-2631: add model fields
faselm Feb 19, 2024
438a833
BGDIDIC-2631: add mako fields
faselm Feb 19, 2024
659180b
Merge branch 'develop-2024-03-13' into feat-BGDIDIC-2631-hindernisbeg…
faselm Feb 19, 2024
2c27146
BGDIDIC-2631: fix a href link
faselm Feb 19, 2024
2620ea1
Merge pull request #4330 from geoadmin/feat-BGDIDIC-2631-hindernisbeg…
faselm Feb 19, 2024
e94ee91
BGDIDIC-2631: update legends
faselm Feb 19, 2024
dae2960
BGDIDIC-2631: update legends
faselm Feb 19, 2024
38fa673
Merge pull request #4331 from geoadmin/feat-BGDIDIC-2631-hindernisbeg…
faselm Feb 19, 2024
0bf4139
BGDIDIC-2631: update field names
faselm Feb 20, 2024
33a7ac4
Merge pull request #4332 from geoadmin/feat-BGDIDIC-2631-hindernisbeg…
faselm Feb 20, 2024
82c4a63
BGDIDIC-2631: update legends
faselm Feb 21, 2024
3efe256
BGDIDIC-2724: add model
faselm Feb 22, 2024
4d00cc6
BGDIDIC-2724: add mako
faselm Feb 22, 2024
d0a32bc
BGDIDIC-2724: add legends
faselm Feb 22, 2024
2313712
Merge pull request #4333 from geoadmin/feat-BGDIDIC-2631-hindernisbeg…
faselm Feb 22, 2024
1a8e332
BGDIDIC-2724: update legends
faselm Feb 22, 2024
2e7167e
BGDIDIC-2631: add geom_type field
faselm Feb 22, 2024
481d126
BGDIDIC-2631: add geom_type field
faselm Feb 22, 2024
79418b1
Merge pull request #4335 from geoadmin/feat-BGDIDIC-2631-hindernisbeg…
faselm Feb 22, 2024
fd64af4
BGDIDIC-1844: switch to new datasource from stac for ortschaften
ltclm Feb 22, 2024
86db862
Merge pull request #4334 from geoadmin/feat-BGDIDIC-2724-photovoltaik…
faselm Feb 23, 2024
df6da08
Merge pull request #4336 from geoadmin/data_BGDIDIC-1844_plz_stac
ltclm Feb 23, 2024
6d0ba31
BGDIDIC-2631: remove field display filters
faselm Feb 26, 2024
473a6d3
Merge pull request #4337 from geoadmin/feat-BGDIDIC-2631-hindernisbeg…
faselm Feb 26, 2024
686c3d5
BGDIDIC-644: add stac support for ir images
ltclm Feb 26, 2024
a22ff30
Merge pull request #4338 from geoadmin/data_BGDIDIC-644_stac
ltclm Feb 26, 2024
aac4362
BGDIDIC-2763: update legends
faselm Feb 27, 2024
1b01f79
Revert "BGDIDIC-984: activate time support / timeseries for"
ltclm Feb 27, 2024
072f3f4
Merge pull request #4339 from geoadmin/feat-BGDIDIC-2763-standorte-mo…
faselm Feb 27, 2024
e28aeee
BGDIDIC-642: prepare simple tooltip for stac delivered oblique images
ltclm Feb 27, 2024
eefb9bc
BGDIDIC-642: add legacy support to terrestial images mako and model
ltclm Feb 28, 2024
0edf187
BGDIDIC-2724: update legends
faselm Feb 28, 2024
cbe37c7
BGDIDIC-642: lubis luftbilder farbe has no extended tooltip anymore
ltclm Feb 28, 2024
539521f
Merge pull request #4342 from geoadmin/feat-BGDIDIC-2724-photovoltaik…
faselm Feb 29, 2024
9e3b2c0
Merge pull request #4341 from geoadmin/data_BGDIDIC-642_stac
ltclm Feb 29, 2024
fcfb611
BGDIDIC-2768: update legends
faselm Feb 29, 2024
cbc27c1
Merge pull request #4343 from geoadmin/feat-BGDIDIC-2768-geologie-geo…
faselm Feb 29, 2024
f4dac0a
BGDIDIC-2768: add view for popup window
faselm Mar 1, 2024
fddd301
Merge pull request #4344 from geoadmin/feat-BGDIDIC-2768-geologie-geo…
faselm Mar 1, 2024
55779f8
BGDIDIC-1768: remove jahr field
faselm Mar 4, 2024
b2d4980
Merge pull request #4345 from geoadmin/feat-BGDIDIC-1768-swissprtr
faselm Mar 4, 2024
41a84b2
BGDIDIC-671: update legends
faselm Mar 5, 2024
f183f88
BGDIDIC-1025: update legends
faselm Mar 5, 2024
d507ae7
BGDIDIC-965: update legends
faselm Mar 5, 2024
47a53ef
BGDIDIC-1167: update legends
faselm Mar 5, 2024
54a1fc0
ltmbr bfs layers
marionb Mar 5, 2024
8ec20ba
BGDIDIC-671: update legends
faselm Mar 5, 2024
f95cfac
BGDIDIC-1025: update legends
faselm Mar 5, 2024
3154eb7
BGDIDIC-965: update legends
faselm Mar 5, 2024
9ee97f8
BGDIDIC-1167: update legends
faselm Mar 5, 2024
4755877
Merge pull request #4346 from geoadmin/feat-BGDIDIC-671-aeronautics
faselm Mar 5, 2024
daaa236
BGDIDIC-2631: remove heightaccrodingvil heightaboveground fields
faselm Mar 6, 2024
6212ad9
Merge pull request #4348 from geoadmin/feat-BGDIDIC-2631-hindernisbeg…
faselm Mar 6, 2024
57eab54
BGDIDIC-2768: remove decimals
faselm Mar 6, 2024
10ec28c
Merge pull request #4349 from geoadmin/feat-BGDIDIC-2768-geologie-geo…
faselm Mar 6, 2024
adb17bf
Relnotes 20240313: added accidents
rebert Mar 6, 2024
2b96eac
add ltfas layers
faselm Mar 6, 2024
e5bc89c
add ltfas layers
faselm Mar 6, 2024
d570d59
add ltfas layers
faselm Mar 6, 2024
8d874b0
ltmb add SUG layer
marionb Mar 7, 2024
274b4cb
add announcements
mariokeusen Mar 7, 2024
2733091
PB-130: As announced, api3 is not accepting HTTP PUT, POST and DELETE…
rebert Mar 6, 2024
d7d5d38
Merge pull request #4340 from geoadmin/data_BGDIDIC-984_revert
ltclm Mar 11, 2024
c940f57
Merge pull request #4350 from geoadmin/feat-PB-130-not-accepting-http…
rebert Mar 11, 2024
012ad89
Release note about supporting HTTP GET, HEAD and OPTIONS only
rebert Mar 11, 2024
0c9a16d
Merge pull request #4347 from geoadmin/feat-relnotes_20240313
ltclm Mar 11, 2024
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
69 changes: 42 additions & 27 deletions chsdi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from distutils.util import strtobool
import datetime
from pyramid.config import Configurator
from pyramid.response import Response
from pyramid.renderers import JSONP
from pyramid.request import Request
from sqlalchemy.orm import scoped_session, sessionmaker
Expand Down Expand Up @@ -33,6 +34,16 @@ def __init__(self, environ, **kwargs):
super().__init__(environ, **kwargs)


# This is a wrapper function around all views. If OPTIONS is given, an empty string will be returned
# As HTTP OPTIONS is not cached, this wrapper will safe some power
def options_view(view, info):
def wrapper_view(context, request):
if request.method == 'OPTIONS':
return Response('')
return view(context, request)
return wrapper_view


def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
Expand All @@ -42,9 +53,13 @@ def main(global_config, **settings):

app_version = settings.get('app_version')
settings['app_version'] = app_version
# request_method is the type tuple: string->string without space->array->tuple
request_method = tuple(settings.get('request_method').replace(' ', '').split(','))
config = Configurator(settings=settings, request_factory=WsgiSchemeAdaptedRequest)
config.include('pyramid_mako')
config.include('akhet.static')
# wrapper around all views
config.add_view_deriver(options_view)

# configure 'locale' dir as the translation dir for chsdi app
config.add_translation_dirs('chsdi:locale/')
Expand All @@ -69,33 +84,33 @@ def datetime_adapter(obj, request):
initialize_sql(settings)

# route definitions
config.add_route('dev', '/dev')
config.add_route('ga_api', '/loader.js')
config.add_route('testi18n', '/testi18n')
config.add_route('topics', '/rest/services')
config.add_route('mapservice', '/rest/services/{map}/MapServer')
config.add_route('layersConfig', '/rest/services/{map}/MapServer/layersConfig')
config.add_route('catalog', '/rest/services/{map}/CatalogServer')
config.add_route('identify', '/rest/services/{map}/MapServer/identify')
config.add_route('find', '/rest/services/{map}/MapServer/find')
config.add_route('attribute_values', '/rest/services/{map}/MapServer/{layerId}/attributes/{attribute}')
config.add_route('legend', '/rest/services/{map}/MapServer/{layerId}/legend')
config.add_route('releases', '/rest/services/{map}/MapServer/{layerId}/releases')
config.add_route('cacheUpdate', '/rest/services/{map}/MapServer/{layerId}/cacheUpdate')
config.add_route('featureAttributes', '/rest/services/{map}/MapServer/{layerId}')
config.add_route('feature', '/rest/services/{map}/MapServer/{layerId}/{featureId}')
config.add_route('htmlPopup', '/rest/services/{map}/MapServer/{layerId}/{featureId}/htmlPopup')
config.add_route('iframeHtmlPopup', '/rest/services/{map}/MapServer/{layerId}/{featureId}/iframeHtmlPopup')
config.add_route('extendedHtmlPopup', '/rest/services/{map}/MapServer/{layerId}/{featureId}/extendedHtmlPopup')
config.add_route('luftbilder', '/luftbilder/viewer.html')
config.add_route('historicalmaps', '/historicalmaps/viewer.html')
config.add_route('checker', '/checker')
config.add_route('checker_dev', '/checker_dev')
config.add_route('translations', '/rest/services/translations')

config.add_route('stationboard', '/stationboard/stops/{id}')
config.add_route('faqlist', '/rest/services/{map}/faqlist')
config.add_route('color', '/color/{r},{g},{b}/{image}')
config.add_route('dev', '/dev', request_method=request_method)
config.add_route('ga_api', '/loader.js', request_method=request_method)
config.add_route('testi18n', '/testi18n', request_method=request_method)
config.add_route('topics', '/rest/services', request_method=request_method)
config.add_route('mapservice', '/rest/services/{map}/MapServer', request_method=request_method)
config.add_route('layersConfig', '/rest/services/{map}/MapServer/layersConfig', request_method=request_method)
config.add_route('catalog', '/rest/services/{map}/CatalogServer', request_method=request_method)
config.add_route('identify', '/rest/services/{map}/MapServer/identify', request_method=request_method)
config.add_route('find', '/rest/services/{map}/MapServer/find', request_method=request_method)
config.add_route('attribute_values', '/rest/services/{map}/MapServer/{layerId}/attributes/{attribute}', request_method=request_method)
config.add_route('legend', '/rest/services/{map}/MapServer/{layerId}/legend', request_method=request_method)
config.add_route('releases', '/rest/services/{map}/MapServer/{layerId}/releases', request_method=request_method)
config.add_route('cacheUpdate', '/rest/services/{map}/MapServer/{layerId}/cacheUpdate', request_method=request_method)
config.add_route('featureAttributes', '/rest/services/{map}/MapServer/{layerId}', request_method=request_method)
config.add_route('feature', '/rest/services/{map}/MapServer/{layerId}/{featureId}', request_method=request_method)
config.add_route('htmlPopup', '/rest/services/{map}/MapServer/{layerId}/{featureId}/htmlPopup', request_method=request_method)
config.add_route('iframeHtmlPopup', '/rest/services/{map}/MapServer/{layerId}/{featureId}/iframeHtmlPopup', request_method=request_method)
config.add_route('extendedHtmlPopup', '/rest/services/{map}/MapServer/{layerId}/{featureId}/extendedHtmlPopup', request_method=request_method)
config.add_route('luftbilder', '/luftbilder/viewer.html', request_method=request_method)
config.add_route('historicalmaps', '/historicalmaps/viewer.html', request_method=request_method)
config.add_route('checker', '/checker', request_method=request_method)
config.add_route('checker_dev', '/checker_dev', request_method=request_method)
config.add_route('translations', '/rest/services/translations', request_method=request_method)

config.add_route('stationboard', '/stationboard/stops/{id}', request_method=request_method)
config.add_route('faqlist', '/rest/services/{map}/faqlist', request_method=request_method)
config.add_route('color', '/color/{r},{g},{b}/{image}', request_method=request_method)

# Static route
static_max_age = int(settings['static_max_age']) if settings['static_max_age'] else None
Expand Down
1 change: 1 addition & 0 deletions chsdi/config/base.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use = egg:chsdi
app_version = ${APP_VERSION}
available_languages = de fr it en rm
request_method = GET, HEAD, OPTIONS

pyramid.reload_templates = false
pyramid.debug_authorization = false
Expand Down
1 change: 0 additions & 1 deletion chsdi/models/vector/bafu.py
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,6 @@ class Swissprtr(Base, Vector):
id = Column('prtrnr', Integer, primary_key=True)
betrieb = Column('betrieb', Unicode)
ort = Column('ort', Unicode)
jahr = Column('jahr', Integer)
the_geom = Column(Geometry2D)

register('ch.bafu.swissprtr', Swissprtr)
Expand Down
33 changes: 33 additions & 0 deletions chsdi/models/vector/dritte.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,36 @@ class AsylPlanningRasterKraft(Base, AsylPlanning, Vector):
register('ch.sem.sachplan-asyl_anhoerung', AsylPlanningRasterAnhoerung)
register('ch.sem.sachplan-asyl_kraft', AsylPlanningKraft)
register('ch.sem.sachplan-asyl_kraft', AsylPlanningRasterKraft)


class ArmasuisseNaturLandschaftArmee(Base, Vector):
__bodId__ = 'ch.armasuisse.natur-landschaft_armee'
__table_args__ = ({'schema': 'armasuisse', 'autoload': False})
__tablename__ = 'natur_landschaft_armee_tooltip'
__template__ = 'templates/htmlpopup/armasuisse_natur_landschaft_armee.mako'
__label__ = 'standort'
id = Column('bgdi_id', Integer, primary_key=True)
standort = Column('standort', Unicode)
nla_name = Column('nla_name', Unicode)
lebr_de = Column('lebr_de', Unicode)
lebr_fr = Column('lebr_fr', Unicode)
lebr_it = Column('lebr_it', Unicode)
sublebr_de = Column('sublebr_de', Unicode)
sublebr_fr = Column('sublebr_fr', Unicode)
sublebr_it = Column('sublebr_it', Unicode)
schutz_de = Column('schutz_de', Unicode)
schutz_fr = Column('schutz_fr', Unicode)
schutz_it = Column('schutz_it', Unicode)
typ_de = Column('typ_de', Unicode)
typ_fr = Column('typ_fr', Unicode)
typ_it = Column('typ_it', Unicode)
link_nla_de = Column('link_nla_de', Unicode)
link_nla_fr = Column('link_nla_fr', Unicode)
link_nla_it = Column('link_nla_it', Unicode)
link_flyer_de = Column('link_flyer_de', Unicode)
link_flyer_fr = Column('link_flyer_fr', Unicode)
link_flyer_it = Column('link_flyer_it', Unicode)
geom_type = Column('geom_type', Unicode)
the_geom = Column(Geometry2D)

register('ch.armasuisse.natur-landschaft_armee', ArmasuisseNaturLandschaftArmee)
7 changes: 4 additions & 3 deletions chsdi/models/vector/lubis.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class LuftbilderBase:
__template__ = 'templates/htmlpopup/lubis.mako'
__returnedGeometry__ = 'the_geom_footprint'
__timeInstant__ = 'bgdi_flugjahr'
__extended_info__ = True
__label__ = 'flugdatum'
id = Column('ebkey', Unicode, primary_key=True)
filename = Column('filename', Unicode)
Expand Down Expand Up @@ -60,7 +59,8 @@ class LuftbilderSwisstopoFarbe(Base, LuftbilderBaseStac, Vector):
register('ch.swisstopo.lubis-luftbilder_farbe', LuftbilderSwisstopoFarbe)


class LuftbilderSwisstopoIr(Base, LuftbilderBase, Vector):
class LuftbilderSwisstopoIr(Base, LuftbilderBaseStac, Vector):
__extended_info__ = True
__tablename__ = 'luftbilder_swisstopo_ir'
__bodId__ = 'ch.swisstopo.lubis-luftbilder_infrarot'
image_height = Column('image_height', Integer)
Expand Down Expand Up @@ -143,6 +143,7 @@ class LuftbilderSchraegaufnahmen(Base, Vector):
# Composite labels
__label__ = 'flightdate'
id = Column('ebkey', Unicode, primary_key=True)
ebkey_old = Column('ebkey_old', Unicode)
inventory_number = Column('inventory_number', Unicode)
flightdate = Column('flightdate', Unicode)
medium_format = Column('medium_format', Unicode)
Expand All @@ -167,10 +168,10 @@ class LuftbilderTerrA(Base, Vector):
__bodId__ = 'ch.swisstopo.lubis-terrestrische_aufnahmen'
__timeInstant__ = 'bgdi_flugjahr'
__returnedGeometry__ = 'the_geom_footprint'
__timeInstant__ = 'bgdi_flugjahr'
__extended_info__ = True
__label__ = 'flugdatum'
id = Column('inventory_number', Unicode, primary_key=True)
inventarnummer_old = Column('inventarnummer_old', Unicode)
inventarnummer = Column('objectid', Integer)
image_number = Column('image_number', Integer)
flugdatum = Column('bgdi_flugdatum', Unicode)
Expand Down
6 changes: 4 additions & 2 deletions chsdi/models/vector/stopo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ class GeologieHydroKarteGrundwasservulneabilitaet(Base, Vector):


class GeologieGeothermie(Base, Vector):
__tablename__ = 'geophysik_geothermie'
__tablename__ = 'view_geophysik_geothermie_tooltip'
__table_args__ = ({'schema': 'geol', 'autoload': False})
__template__ = 'templates/htmlpopup/geothermie.mako'
__bodId__ = 'ch.swisstopo.geologie-geophysik-geothermie'
Expand Down Expand Up @@ -1922,7 +1922,7 @@ class SwissmapOnlineWanderwege(Base, Vector):


class PLZOrtschaften(Base, Vector):
__tablename__ = 'gabmo_plz'
__tablename__ = 'amtovz_ortschaften'
__table_args__ = ({'schema': 'vd', 'autoload': False})
__template__ = 'templates/htmlpopup/gabmo_plz.mako'
__bodId__ = 'ch.swisstopo-vd.ortschaftenverzeichnis_plz'
Expand All @@ -1931,6 +1931,8 @@ class PLZOrtschaften(Base, Vector):
plz = Column('plz', Integer)
zusziff = Column('zusziff', Unicode)
langtext = Column('langtext', Unicode)
status = Column('status', Unicode)
modified = Column('modified', DateTimeChsdi)
bgdi_created = Column('bgdi_created', Unicode)
the_geom = Column(Geometry2D)

Expand Down
69 changes: 67 additions & 2 deletions chsdi/models/vector/uvek.py
Original file line number Diff line number Diff line change
Expand Up @@ -1716,8 +1716,9 @@ class HindernisbegrenzungsflaechenKataster:
__bodId__ = 'ch.bazl.hindernisbegrenzungsflaechen-kataster'
id = Column('bgdi_id', Integer, primary_key=True)
icaoloc = Column('icaoloc', Unicode)
validfrom = Column('validfrom', Unicode)
validuntil = Column('validuntil', Unicode)
surfacetype = Column('surfacetype', Unicode)
document = Column('document', Unicode)
geom_type = Column('geom_type', Unicode)
the_geom = Column(Geometry2D)


Expand Down Expand Up @@ -4062,3 +4063,67 @@ class LageStoerfallverordnungEisenbahnanlagen (Base, Vector):
the_geom = Column(Geometry2D)

register('ch.bav.lage-stoerfallverordnung_eisenbahnanlagen', LageStoerfallverordnungEisenbahnanlagen)


class BakomchStandorteMobilfunkanlagen (Base, Vector):
__table_args__ = ({'schema': 'bakom', 'autoload': False})
__tablename__ = 'standorte_mobilfunkanlagen'
__template__ = 'templates/htmlpopup/bakom_standorte_mobilfunkanlagen.mako'
__bodId__ = 'ch.bakom.standorte-mobilfunkanlagen'
__label__ = 'station'
id = Column('bgdi_id', Integer, primary_key=True)
station = Column('station', Unicode)
typ_de = Column('typ_de', Unicode)
typ_fr = Column('typ_fr', Unicode)
typ_it = Column('typ_it', Unicode)
typ_en = Column('typ_en', Unicode)
koord = Column('koord', Unicode)
power_de = Column('power_de', Unicode)
power_fr = Column('power_fr', Unicode)
power_it = Column('power_it', Unicode)
power_en = Column('power_en', Unicode)
techno_de = Column('techno_de', Unicode)
techno_fr = Column('techno_fr', Unicode)
techno_it = Column('techno_it', Unicode)
techno_en = Column('techno_en', Unicode)
adaptiv_de = Column('adaptiv_de', Unicode)
adaptiv_fr = Column('adaptiv_fr', Unicode)
adaptiv_it = Column('adaptiv_it', Unicode)
adaptiv_en = Column('adaptiv_en', Unicode)
bewilligung_de = Column('bewilligung_de', Unicode)
bewilligung_fr = Column('bewilligung_fr', Unicode)
bewilligung_it = Column('bewilligung_it', Unicode)
bewilligung_en = Column('bewilligung_en', Unicode)
agw_de = Column('agw_de', Unicode)
agw_fr = Column('agw_fr', Unicode)
agw_it = Column('agw_it', Unicode)
agw_en = Column('agw_en', Unicode)
the_geom = Column(Geometry2D)

register('ch.bakom.standorte-mobilfunkanlagen', BakomchStandorteMobilfunkanlagen)


class PhotovoltaikGrossanlagen (Base, Vector):
__table_args__ = ({'schema': 'bfe', 'autoload': False})
__tablename__ = 'photovoltaik_grossanlagen'
__template__ = 'templates/htmlpopup/bfe_photovoltaik_grossanlagen.mako'
__bodId__ = 'ch.bfe.photovoltaik-grossanlagen'
__label__ = 'projectname'
id = Column('bgdi_id', Integer, primary_key=True)
projectname = Column('projectname', Unicode)
projectmanagement = Column('projectmanagement', Unicode)
projectweb = Column('projectweb', Unicode)
elevation = Column('elevation', Integer)
power = Column('power', Unicode)
annualproduction = Column('annualproduction', Unicode)
winterproduction = Column('winterproduction', Unicode)
specificannualproduction = Column('specificannualproduction', Unicode)
specificwinterproduction = Column('specificwinterproduction', Unicode)
ref_status = Column('ref_status', Unicode)
statuscategory_de = Column('statuscategory_de', Unicode)
statuscategory_fr = Column('statuscategory_fr', Unicode)
statuscategory_it = Column('statuscategory_it', Unicode)
statuscategory_en = Column('statuscategory_en', Unicode)
the_geom = Column(Geometry2D)

register('ch.bfe.photovoltaik-grossanlagen', PhotovoltaikGrossanlagen)
2 changes: 1 addition & 1 deletion chsdi/response_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def add_default_cache_control(request, response):

def add_cors_header(request, response):
response.headers['Access-Control-Allow-Origin'] = "*"
response.headers['Access-Control-Allow-Methods'] = "POST, GET, OPTIONS"
response.headers['Access-Control-Allow-Methods'] = request.registry.settings['request_method']
response.headers['Access-Control-Allow-Headers'] = "*"


Expand Down
Loading
Loading