diff --git a/chsdi/__init__.py b/chsdi/__init__.py index 4cf4a5df91..63e9f39828 100644 --- a/chsdi/__init__.py +++ b/chsdi/__init__.py @@ -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 @@ -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. """ @@ -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/') @@ -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 diff --git a/chsdi/config/base.ini.in b/chsdi/config/base.ini.in index d4bbbf5714..cabb72c4c4 100644 --- a/chsdi/config/base.ini.in +++ b/chsdi/config/base.ini.in @@ -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 diff --git a/chsdi/models/vector/bafu.py b/chsdi/models/vector/bafu.py index 87609d0a83..346b2ae1e3 100644 --- a/chsdi/models/vector/bafu.py +++ b/chsdi/models/vector/bafu.py @@ -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) diff --git a/chsdi/models/vector/dritte.py b/chsdi/models/vector/dritte.py index daea50e448..4fb2cc3eb5 100644 --- a/chsdi/models/vector/dritte.py +++ b/chsdi/models/vector/dritte.py @@ -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) diff --git a/chsdi/models/vector/lubis.py b/chsdi/models/vector/lubis.py index 872535d072..50a5b1fc75 100644 --- a/chsdi/models/vector/lubis.py +++ b/chsdi/models/vector/lubis.py @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/chsdi/models/vector/stopo.py b/chsdi/models/vector/stopo.py index 0d5914b1e0..c6217a9ed4 100644 --- a/chsdi/models/vector/stopo.py +++ b/chsdi/models/vector/stopo.py @@ -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' @@ -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' @@ -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) diff --git a/chsdi/models/vector/uvek.py b/chsdi/models/vector/uvek.py index 59e34facf1..9fad6ee740 100644 --- a/chsdi/models/vector/uvek.py +++ b/chsdi/models/vector/uvek.py @@ -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) @@ -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) diff --git a/chsdi/response_callbacks.py b/chsdi/response_callbacks.py index c1ee014e16..7695409b89 100644 --- a/chsdi/response_callbacks.py +++ b/chsdi/response_callbacks.py @@ -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'] = "*" diff --git a/chsdi/static/doc/source/releasenotes/index.rst b/chsdi/static/doc/source/releasenotes/index.rst index 28a67c754a..270fa40cc4 100644 --- a/chsdi/static/doc/source/releasenotes/index.rst +++ b/chsdi/static/doc/source/releasenotes/index.rst @@ -14,6 +14,110 @@ Release Notes

RSS Feeds

+.. _releasenotes_20240313: + +Release 20240313 - Wednesday, March 13th 2024 +------------------------------------------------- + +API & applications +****************** + +`API `__ +''''''''''''''''''''''''''''' + +- Bug fixes +- **HTTP** **POST**, **PUT** and **DELETE** on api3.geo.admin.ch/rest/services//MapServer/* are **no longer accepted**. This behavior has already been documented in the official API documentation and has been `announced `__ last year in September. All API REST endpoints support only the following HTTP methods (unless specified): GET, HEAD and OPTIONS +- Announcements: + - the layer *ch.swisstopo-vd.ortschaftenverzeichnis_plz* has now the additional attributes 'status' and 'modification', as previously announced + - the layer *ch.bfs.generalisierte-grenzen_agglomerationen_g2* has been removed from chsdi services as previously announced + - the layers *ch.swisstopo.geologie-geotechnik-mineralische_rohstoffe200* and *ch.swisstopo.geologie-geotechnik-gk200* have been removed from chsdi services as previously announced + - the layers *ch.bakom.mobil-antennenstandorte-5g, ch.bakom.mobil-antennenstandorte-gsm, ch.bakom.mobil-antennenstandorte-umts, ch.bakom.mobil-antennenstandorte-lte* have been removed from chsdi services as previously announced + - following attributes for the layers *ch.swisstopo.lubis-luftbilder_schwarzweiss*, *ch.swisstopo.lubis-luftbilder_farbe* and *ch.swisstopo.lubis-luftbilder_infrarot* will be removed from chsdi services later this year: 'inventarnummer', 'bildnummer', 'orientierung', 'rotation', 'filesize_mb', 'ort', 'image_height' and 'image_width' +- `Full changelog `__ + +Geodata +******* + ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| New | `NLA Natural values / habitats `__ (ch.armasuisse.natur-landschaft_armee) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| New | `swissALTIRegio monodirectional hillshade `__ (ch.swisstopo.swissaltiregio-reliefschattierung_monodirektional) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| New | `swissALTIRegio multidirectional hillshade `__ (ch.swisstopo.swissaltiregio-reliefschattierung_multidirektional) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| New | `Large-scale photovoltaik systems `__ (ch.bfe.photovoltaik-grossanlagen) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| New | `Mobile phone base stations `__ (ch.bakom.standorte-mobilfunkanlagen) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| New | `Obstacle limitation surfaces `__ (ch.bazl.hindernisbegrenzungsflaechen-kataster) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Employment (FTE) `__ (ch.bfs.betriebszaehlungen-beschaeftigte_vollzeitaequivalente) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Enterprises `__ (ch.bfs.betriebszaehlungen-arbeitsstaetten) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Dwellings `__ (ch.bfs.volkszaehlung-gebaeudestatistik_wohnungen) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Buildings `__ (ch.bfs.volkszaehlung-gebaeudestatistik_gebaeude) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Population (residents) `__ (ch.bfs.volkszaehlung-bevoelkerungsstatistik_einwohner) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Accidents involving a bicycle `__ (ch.astra.unfaelle-personenschaeden_fahrraeder) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Accidents with fatalities `__ (ch.astra.unfaelle-personenschaeden_getoetete) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Accidents with personal injury `__ (ch.astra.unfaelle-personenschaeden_alle) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Accidents involving a pedestrian `__ (ch.astra.unfaelle-personenschaeden_fussgaenger) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Accidents involving a motorcycle `__ (ch.astra.unfaelle-personenschaeden_motorraeder) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Accidents per inhabitant `__ (ch.astra.schwerverunfallte-kanton_pro_einwohner) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Accidents per inhabitant - Speeding `__ (ch.astra.schwerverunfallte-kanton_geschwindigkeit) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Accidents per inhabitant - Alcohol `__ (ch.astra.schwerverunfallte-kanton_alkohol) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `swissBATHY3D Hillshade `__ (ch.swisstopo.swissbathy3d-reliefschattierung) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Pro Natura: Nature Preserves `__ (ch.pronatura.naturschutzgebiete) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Wind energy plants `__ (ch.bfe.windenergieanlagen) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `SIL consultation `__ (ch.bazl.sachplan-infrastruktur-luftfahrt_anhorung) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `SP Aviation infrastructure `__ (ch.bazl.sachplan-infrastruktur-luftfahrt_kraft) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Hydrography swissTLM3D `__ (ch.swisstopo.swisstlm3d-gewaessernetz) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Railway swissTLM3D `__ (ch.swisstopo.swisstlm3d-eisenbahnnetz) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Cableways swissTLM3D `__ (ch.swisstopo.swisstlm3d-uebrigerverkehr) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Roads and Tracks swissTLM3D `__ (ch.swisstopo.swisstlm3d-strassen) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Hiking trails `__ (ch.swisstopo.swisstlm3d-wanderwege) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Forest swissTLM3D `__ (ch.swisstopo.swisstlm3d-wald) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `CO2 Emissions Buildings (SIA 380/1) `__ (ch.bafu.klima-co2_ausstoss_gebaeude) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Pollutant releases (SwissPRTR) `__ (ch.bafu.swissprtr) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Aeronautical Chart ICAO `__ (ch.bazl.luftfahrtkarten-icao) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Glider Chart `__ (ch.bazl.segelflugkarte) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Map of restricted and danger areas `__ (ch.vbs.sperr-gefahrenzonenkarte) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Mil Airspace Chart `__ (ch.vbs.milairspacechart) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `Heat flux 500 `__ (ch.swisstopo.geologie-geophysik-geothermie) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `SUG Consultation `__ (ch.bav.sachplan-unterirdischer-guetertransport_anhoerung) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Update | `SP Underground freight transport `__ (ch.bav.sachplan-unterirdischer-guetertransport_kraft) | ++--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + .. _releasenotes_20240131: Release 20240131 - Wednesday, January 31st 2024 diff --git a/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_de.png b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_de.png new file mode 100644 index 0000000000..be38120cab Binary files /dev/null and b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_de.png differ diff --git a/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_en.png b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_en.png new file mode 100644 index 0000000000..be38120cab Binary files /dev/null and b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_en.png differ diff --git a/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_fr.png b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_fr.png new file mode 100644 index 0000000000..9570d4d354 Binary files /dev/null and b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_fr.png differ diff --git a/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_it.png b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_it.png new file mode 100644 index 0000000000..556f29e3e3 Binary files /dev/null and b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_it.png differ diff --git a/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_rm.png b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_rm.png new file mode 100644 index 0000000000..be38120cab Binary files /dev/null and b/chsdi/static/images/legends/ch.armasuisse.natur-landschaft_armee_rm.png differ diff --git a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_de.png b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_de.png index c261cf1d32..75331e388f 100644 Binary files a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_de.png and b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_de.png differ diff --git a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_en.png b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_en.png index c2013962b7..8562565e68 100644 Binary files a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_en.png and b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_en.png differ diff --git a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_fr.png b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_fr.png index 136c2b222d..8032708583 100644 Binary files a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_fr.png and b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_fr.png differ diff --git a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_it.png b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_it.png index cdf3edd08b..22e9a4dc2a 100644 Binary files a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_it.png and b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_it.png differ diff --git a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_rm.png b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_rm.png index fee546311d..707cfdfaee 100644 Binary files a/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_rm.png and b/chsdi/static/images/legends/ch.bafu.klima-co2_ausstoss_gebaeude_rm.png differ diff --git a/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_de.png b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_de.png new file mode 100644 index 0000000000..afb11de408 Binary files /dev/null and b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_de.png differ diff --git a/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_en.png b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_en.png new file mode 100644 index 0000000000..392f25411b Binary files /dev/null and b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_en.png differ diff --git a/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_fr.png b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_fr.png new file mode 100644 index 0000000000..b95ed5b709 Binary files /dev/null and b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_fr.png differ diff --git a/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_it.png b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_it.png new file mode 100644 index 0000000000..aacf3b55a4 Binary files /dev/null and b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_it.png differ diff --git a/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_rm.png b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_rm.png new file mode 100644 index 0000000000..afb11de408 Binary files /dev/null and b/chsdi/static/images/legends/ch.bakom.standorte-mobilfunkanlagen_rm.png differ diff --git a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_de.png b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_de.png index 5caadb40ca..00e57a4fd4 100644 Binary files a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_de.png and b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_de.png differ diff --git a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_en.png b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_en.png index 241795fb78..3f960a9a05 100644 Binary files a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_en.png and b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_en.png differ diff --git a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_fr.png b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_fr.png index d0af640424..9bd13dc86d 100644 Binary files a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_fr.png and b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_fr.png differ diff --git a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_it.png b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_it.png index 6760389f13..eef92b07d4 100644 Binary files a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_it.png and b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_it.png differ diff --git a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_rm.png b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_rm.png index 5caadb40ca..00e57a4fd4 100644 Binary files a/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_rm.png and b/chsdi/static/images/legends/ch.bazl.hindernisbegrenzungsflaechen-kataster_rm.png differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_de.png b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_de.png index 40bfe140d3..265c66f464 100755 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_de.png and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_de.png differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_de_big.pdf b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_de_big.pdf index 0ae90b016f..e9cb6979a6 100644 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_de_big.pdf and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_de_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_en.png b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_en.png index 40bfe140d3..265c66f464 100755 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_en.png and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_en.png differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_en_big.pdf b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_en_big.pdf index 0ae90b016f..e9cb6979a6 100644 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_en_big.pdf and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_en_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_fr.png b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_fr.png index 40bfe140d3..265c66f464 100755 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_fr.png and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_fr.png differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_fr_big.pdf b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_fr_big.pdf index 0ae90b016f..e9cb6979a6 100644 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_fr_big.pdf and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_fr_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_it.png b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_it.png index 40bfe140d3..265c66f464 100755 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_it.png and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_it.png differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_it_big.pdf b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_it_big.pdf index 0ae90b016f..e9cb6979a6 100644 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_it_big.pdf and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_it_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_rm.png b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_rm.png index 40bfe140d3..265c66f464 100755 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_rm.png and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_rm.png differ diff --git a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_rm_big.pdf b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_rm_big.pdf index 0ae90b016f..e9cb6979a6 100644 Binary files a/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_rm_big.pdf and b/chsdi/static/images/legends/ch.bazl.luftfahrtkarten-icao_rm_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_de.png b/chsdi/static/images/legends/ch.bazl.segelflugkarte_de.png index 421c5d6b93..ccb265804d 100755 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_de.png and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_de.png differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_de_big.pdf b/chsdi/static/images/legends/ch.bazl.segelflugkarte_de_big.pdf index a5fc81472a..193d5335c5 100644 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_de_big.pdf and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_de_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_en.png b/chsdi/static/images/legends/ch.bazl.segelflugkarte_en.png index 421c5d6b93..ccb265804d 100755 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_en.png and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_en.png differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_en_big.pdf b/chsdi/static/images/legends/ch.bazl.segelflugkarte_en_big.pdf index a5fc81472a..193d5335c5 100644 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_en_big.pdf and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_en_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_fr.png b/chsdi/static/images/legends/ch.bazl.segelflugkarte_fr.png index 421c5d6b93..ccb265804d 100755 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_fr.png and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_fr.png differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_fr_big.pdf b/chsdi/static/images/legends/ch.bazl.segelflugkarte_fr_big.pdf index a5fc81472a..193d5335c5 100644 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_fr_big.pdf and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_fr_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_it.png b/chsdi/static/images/legends/ch.bazl.segelflugkarte_it.png index 421c5d6b93..ccb265804d 100755 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_it.png and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_it.png differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_it_big.pdf b/chsdi/static/images/legends/ch.bazl.segelflugkarte_it_big.pdf index a5fc81472a..193d5335c5 100644 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_it_big.pdf and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_it_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_rm.png b/chsdi/static/images/legends/ch.bazl.segelflugkarte_rm.png index 421c5d6b93..ccb265804d 100755 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_rm.png and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_rm.png differ diff --git a/chsdi/static/images/legends/ch.bazl.segelflugkarte_rm_big.pdf b/chsdi/static/images/legends/ch.bazl.segelflugkarte_rm_big.pdf index a5fc81472a..193d5335c5 100644 Binary files a/chsdi/static/images/legends/ch.bazl.segelflugkarte_rm_big.pdf and b/chsdi/static/images/legends/ch.bazl.segelflugkarte_rm_big.pdf differ diff --git a/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_de.png b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_de.png new file mode 100644 index 0000000000..82f789628b Binary files /dev/null and b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_de.png differ diff --git a/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_en.png b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_en.png new file mode 100644 index 0000000000..13dd218ca3 Binary files /dev/null and b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_en.png differ diff --git a/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_fr.png b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_fr.png new file mode 100644 index 0000000000..ccdd612986 Binary files /dev/null and b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_fr.png differ diff --git a/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_it.png b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_it.png new file mode 100644 index 0000000000..af997bd73a Binary files /dev/null and b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_it.png differ diff --git a/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_rm.png b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_rm.png new file mode 100644 index 0000000000..82f789628b Binary files /dev/null and b/chsdi/static/images/legends/ch.bfe.photovoltaik-grossanlagen_rm.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_de.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_de.png index be60993234..c43896cbc4 100755 Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_de.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_de.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_en.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_en.png index be60993234..5b1a3308a6 100755 Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_en.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_en.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_fr.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_fr.png index 7c37ed2b88..ac62d98f4c 100755 Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_fr.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_fr.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_it.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_it.png index 7c37ed2b88..6647d0ebd9 100755 Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_it.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_it.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_rm.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_rm.png index be60993234..c43896cbc4 100755 Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_rm.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geophysik-geothermie_rm.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_de.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_de.png old mode 100755 new mode 100644 index d885d7cbc2..c3c8675167 Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_de.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_de.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_en.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_en.png old mode 100755 new mode 100644 index 64a62d075b..2dfa0a741c Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_en.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_en.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_fr.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_fr.png old mode 100755 new mode 100644 index 5b7e71be7c..371e525ee9 Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_fr.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_fr.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_it.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_it.png old mode 100755 new mode 100644 index 9bb3e306d3..17342ea3ab Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_it.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_it.png differ diff --git a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_rm.png b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_rm.png old mode 100755 new mode 100644 index d885d7cbc2..c3c8675167 Binary files a/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_rm.png and b/chsdi/static/images/legends/ch.swisstopo.geologie-geotechnik-gk500-lithologie_hauptgruppen_rm.png differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_de.png b/chsdi/static/images/legends/ch.vbs.milairspacechart_de.png index 0c98883403..e63ca87155 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_de.png and b/chsdi/static/images/legends/ch.vbs.milairspacechart_de.png differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_de_big.pdf b/chsdi/static/images/legends/ch.vbs.milairspacechart_de_big.pdf index a45c38ee72..881540b67c 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_de_big.pdf and b/chsdi/static/images/legends/ch.vbs.milairspacechart_de_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_en.png b/chsdi/static/images/legends/ch.vbs.milairspacechart_en.png index 0c98883403..e63ca87155 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_en.png and b/chsdi/static/images/legends/ch.vbs.milairspacechart_en.png differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_en_big.pdf b/chsdi/static/images/legends/ch.vbs.milairspacechart_en_big.pdf index a45c38ee72..881540b67c 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_en_big.pdf and b/chsdi/static/images/legends/ch.vbs.milairspacechart_en_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_fr.png b/chsdi/static/images/legends/ch.vbs.milairspacechart_fr.png index 0c98883403..e63ca87155 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_fr.png and b/chsdi/static/images/legends/ch.vbs.milairspacechart_fr.png differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_fr_big.pdf b/chsdi/static/images/legends/ch.vbs.milairspacechart_fr_big.pdf index a45c38ee72..881540b67c 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_fr_big.pdf and b/chsdi/static/images/legends/ch.vbs.milairspacechart_fr_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_it.png b/chsdi/static/images/legends/ch.vbs.milairspacechart_it.png index 0c98883403..e63ca87155 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_it.png and b/chsdi/static/images/legends/ch.vbs.milairspacechart_it.png differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_it_big.pdf b/chsdi/static/images/legends/ch.vbs.milairspacechart_it_big.pdf index a45c38ee72..881540b67c 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_it_big.pdf and b/chsdi/static/images/legends/ch.vbs.milairspacechart_it_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_rm.png b/chsdi/static/images/legends/ch.vbs.milairspacechart_rm.png index 0c98883403..e63ca87155 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_rm.png and b/chsdi/static/images/legends/ch.vbs.milairspacechart_rm.png differ diff --git a/chsdi/static/images/legends/ch.vbs.milairspacechart_rm_big.pdf b/chsdi/static/images/legends/ch.vbs.milairspacechart_rm_big.pdf index a45c38ee72..881540b67c 100644 Binary files a/chsdi/static/images/legends/ch.vbs.milairspacechart_rm_big.pdf and b/chsdi/static/images/legends/ch.vbs.milairspacechart_rm_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_de.png b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_de.png index 7deb0d7343..08e478ba9f 100755 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_de.png and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_de.png differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_de_big.pdf b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_de_big.pdf index 4bd83b591c..bad6d1d658 100644 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_de_big.pdf and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_de_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_en.png b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_en.png index 7deb0d7343..08e478ba9f 100755 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_en.png and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_en.png differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_en_big.pdf b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_en_big.pdf index 4bd83b591c..bad6d1d658 100644 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_en_big.pdf and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_en_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_fr.png b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_fr.png index 7deb0d7343..08e478ba9f 100755 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_fr.png and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_fr.png differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_fr_big.pdf b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_fr_big.pdf index 4bd83b591c..bad6d1d658 100644 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_fr_big.pdf and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_fr_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_it.png b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_it.png index 7deb0d7343..08e478ba9f 100755 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_it.png and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_it.png differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_it_big.pdf b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_it_big.pdf index 4bd83b591c..bad6d1d658 100644 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_it_big.pdf and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_it_big.pdf differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_rm.png b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_rm.png index 7deb0d7343..08e478ba9f 100755 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_rm.png and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_rm.png differ diff --git a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_rm_big.pdf b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_rm_big.pdf index 4bd83b591c..bad6d1d658 100644 Binary files a/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_rm_big.pdf and b/chsdi/static/images/legends/ch.vbs.sperr-gefahrenzonenkarte_rm_big.pdf differ diff --git a/chsdi/templates/htmlpopup/armasuisse_natur_landschaft_armee.mako b/chsdi/templates/htmlpopup/armasuisse_natur_landschaft_armee.mako new file mode 100644 index 0000000000..94d1511965 --- /dev/null +++ b/chsdi/templates/htmlpopup/armasuisse_natur_landschaft_armee.mako @@ -0,0 +1,59 @@ +<%inherit file="base.mako"/> + +<%def name="table_body(c, lang)"> + <% + lang = lang if lang in ('fr','it') else 'de' + lebr_text = 'lebr_%s' %lang + sublebr_text = 'sublebr_%s' %lang + schutz_text = 'schutz_%s' %lang + typ_text = 'typ_%s' %lang + link_nla_col = 'link_nla_%s' %lang + link_flyer_col = 'link_flyer_%s' %lang + + link_nla_text = c['attributes'][link_nla_col] or '-' + link_flyer_text = c['attributes'][link_flyer_col] or '-' + %> + + ${_('ch.armasuisse.natur-landschaft_armee.standort')} + ${c['attributes']['standort'] or '-'} + + + ${_('ch.armasuisse.natur-landschaft_armee.nla_name')} + ${c['attributes']['nla_name'] or '-'} + + + ${_('ch.armasuisse.natur-landschaft_armee.lebr')} + ${c['attributes'][lebr_text] or '-'} + + + ${_('ch.armasuisse.natur-landschaft_armee.sublebr')} + ${c['attributes'][sublebr_text] or '-'} + + + ${_('ch.armasuisse.natur-landschaft_armee.schutz')} + ${c['attributes'][schutz_text] or '-'} + + %if c['attributes']['geom_type'] == 'ST_MultiPoint': + + ${_('ch.armasuisse.natur-landschaft_armee.typ')} + ${c['attributes'][typ_text] or '-'} + + %endif + + ${_('ch.armasuisse.natur-landschaft_armee.link_nla')} + %if link_nla_text.startswith('http'): + ${_('link')} + %else: + ${link_nla_text} + %endif + + + ${_('ch.armasuisse.natur-landschaft_armee.link_flyer')} + %if link_flyer_text.startswith('http'): + ${_('link')} + %else: + ${link_flyer_text} + %endif + + + diff --git a/chsdi/templates/htmlpopup/bakom_standorte_mobilfunkanlagen.mako b/chsdi/templates/htmlpopup/bakom_standorte_mobilfunkanlagen.mako new file mode 100644 index 0000000000..7eb170fd4a --- /dev/null +++ b/chsdi/templates/htmlpopup/bakom_standorte_mobilfunkanlagen.mako @@ -0,0 +1,46 @@ +<%inherit file="base.mako"/> + +<%def name="table_body(c, lang)"> + <% + lang = lang if lang in ('fr','it','rm','en') else 'de' + typ_text = 'typ_%s' %lang + power_text = 'power_%s' %lang + techno_text = 'techno_%s' %lang + adaptiv_text = 'adaptiv_%s' %lang + bewilligung_text = 'bewilligung_%s' %lang + agw_text = 'agw_%s' %lang + %> + + ${_('ch.bakom.standorte-mobilfunkanlagen.station')} + ${c['attributes']['station'] or '-'} + + + ${_('ch.bakom.standorte-mobilfunkanlagen.typ')} + ${c['attributes'][typ_text] or '-'} + + + ${_('ch.bakom.standorte-mobilfunkanlagen.koord')} + ${c['attributes']['koord'] or '-'} + + + ${_('ch.bakom.standorte-mobilfunkanlagen.power')} + ${c['attributes'][power_text] or '-'} + + + + ${c['attributes'][techno_text] or '-'} + + + + ${c['attributes'][adaptiv_text] or '-'} + + + ${_('ch.bakom.standorte-mobilfunkanlagen.bewilligung')} + ${c['attributes'][bewilligung_text] or '-'} + + + + ${c['attributes'][agw_text] or '-'} + + + diff --git a/chsdi/templates/htmlpopup/bfe_photovoltaik_grossanlagen.mako b/chsdi/templates/htmlpopup/bfe_photovoltaik_grossanlagen.mako new file mode 100644 index 0000000000..79509b4c1e --- /dev/null +++ b/chsdi/templates/htmlpopup/bfe_photovoltaik_grossanlagen.mako @@ -0,0 +1,44 @@ +<%inherit file="base.mako"/> + +<%def name="table_body(c, lang)"> + <% + lang = lang if lang in ('fr','it','en') else 'de' + status_text = 'statuscategory_%s' % lang + %> + + ${_('ch.bfe.photovoltaik-grossanlagen.projectname')} + ${c['attributes']['projectname']} + + + ${_('ch.bfe.photovoltaik-grossanlagen.projectmanagement')} + ${c['attributes']['projectmanagement'] or '-'} + + + ${_('ch.bfe.photovoltaik-grossanlagen.status')} + ${c['attributes'][status_text] or '-'} + + + ${_('ch.bfe.photovoltaik-grossanlagen.power')} + ${c['attributes']['power'] or '-'} + + + ${_('ch.bfe.photovoltaik-grossanlagen.annualproduction')} + ${c['attributes']['annualproduction'] or '-'} + + + ${_('ch.bfe.photovoltaik-grossanlagen.winterproduction')} + ${c['attributes']['winterproduction'] or '-'} + + + ${_('ch.bfe.photovoltaik-grossanlagen.specificannualproduction')} + ${c['attributes']['specificannualproduction'] or '-'} + + + ${_('ch.bfe.photovoltaik-grossanlagen.specificwinterproduction')} + ${c['attributes']['specificwinterproduction'] or '-'} + + + ${_('ch.bfe.photovoltaik-grossanlagen.elevation')} + ${c['attributes']['elevation'] or '-'} + + diff --git a/chsdi/templates/htmlpopup/gabmo_plz.mako b/chsdi/templates/htmlpopup/gabmo_plz.mako index 64caf7aec4..20097b6052 100644 --- a/chsdi/templates/htmlpopup/gabmo_plz.mako +++ b/chsdi/templates/htmlpopup/gabmo_plz.mako @@ -2,13 +2,9 @@ <%def name="table_body(c,lang)"> <% c['stable_id'] = True %> - ${_('ch.swisstopo-vd.ortschaftenverzeichnis_plz.plz')} ${c['attributes']['plz'] or '-'} - ${_('zusziff')} - % if len(str(c['attributes']['zusziff'])) == 1: - ${'0' + str(c['attributes']['zusziff'])} - % else: - ${c['attributes']['zusziff'] or '00'} - % endif - - ${_('langtext')} ${c['attributes']['langtext']} + ${_('ch.swisstopo-vd.ortschaftenverzeichnis_plz.plz')} ${c['attributes']['plz'] or '-'} + ${_('ch.swisstopo-vd.ortschaftenverzeichnis_plz.zusziff')} ${c['attributes']['zusziff'] or '-'} + ${_('ch.swisstopo-vd.ortschaftenverzeichnis_plz.langtext')} ${c['attributes']['langtext']} + ${_('ch.swisstopo-vd.ortschaftenverzeichnis_plz.status')} ${c['attributes']['status']} + ${_('ch.swisstopo-vd.ortschaftenverzeichnis_plz.modified')} ${c['attributes']['modified']} diff --git a/chsdi/templates/htmlpopup/geothermie.mako b/chsdi/templates/htmlpopup/geothermie.mako index a6991da0b3..361154e31b 100644 --- a/chsdi/templates/htmlpopup/geothermie.mako +++ b/chsdi/templates/htmlpopup/geothermie.mako @@ -1,5 +1,5 @@ <%inherit file="base.mako"/> <%def name="table_body(c,lang)"> - ${_('geothermie')}${c['attributes']['contour'] or '-'} + ${_('geothermie')}${int(c['attributes']['contour']) or '-'} diff --git a/chsdi/templates/htmlpopup/hindernisbegrenzungsflaechen_kataster.mako b/chsdi/templates/htmlpopup/hindernisbegrenzungsflaechen_kataster.mako index 862aa8dc10..54ce9adbc6 100644 --- a/chsdi/templates/htmlpopup/hindernisbegrenzungsflaechen_kataster.mako +++ b/chsdi/templates/htmlpopup/hindernisbegrenzungsflaechen_kataster.mako @@ -6,11 +6,15 @@ ${c['attributes']['icaoloc'] or '-'} - ${_('ch.bazl.hindernisbegrenzungsflaechen-kataster.validfrom')} - ${c['attributes']['validfrom'] or '-'} + ${_('ch.bazl.hindernisbegrenzungsflaechen-kataster.surfacetype')} + ${c['attributes']['surfacetype'] or '-'} - ${_('ch.bazl.hindernisbegrenzungsflaechen-kataster.validuntil')} - ${c['attributes']['validuntil'] or '-'} + ${_('ch.bazl.hindernisbegrenzungsflaechen-kataster.document')} + %if c['attributes']['document'].startswith('http'): + ${_('ch.bazl.hindernisbegrenzungsflaechen-kataster.link')} + %else: + - + %endif diff --git a/chsdi/templates/htmlpopup/lubis_schraegaufnahmen.mako b/chsdi/templates/htmlpopup/lubis_schraegaufnahmen.mako index 695f07f77d..3ca7ee5146 100644 --- a/chsdi/templates/htmlpopup/lubis_schraegaufnahmen.mako +++ b/chsdi/templates/htmlpopup/lubis_schraegaufnahmen.mako @@ -29,7 +29,6 @@ def determinePreviewUrl(tileUrlBasePath, ebkey): return url - def date_to_str(datum): try: return datetime.datetime.strptime(datum.strip(), "%Y%m%d").strftime("%d-%m-%Y") @@ -49,6 +48,7 @@ def get_viewer_url(request, params): } return h.make_agnostic(route_url('luftbilder', request)) + '?' + urllib.parse.urlencode(f) + %> <%def name="table_body(c, lang)"> @@ -57,26 +57,64 @@ def get_viewer_url(request, params): lang = lang if lang in ('fr','it','en') else 'de' c['stable_id'] = True request = context.get('request') -tileUrlBasePath = request.registry.settings['aerialimages_data_host'] + '/tiles' -preview_url = determinePreviewUrl(tileUrlBasePath, c['featureId']) - -image_rotation = 0 -wh = h.imagesize_from_metafile(tileUrlBasePath, c['featureId']) -image_width = wh[0] -image_height = wh[1] +aerialimages_data_host = request.registry.settings['aerialimages_data_host'] +tileUrlBasePath = aerialimages_data_host + '/tiles' datum = date_to_str(c['attributes']['flightdate']) -params = ( - image_width, - image_height, - _('tt_lubis_ebkey'), - c['featureId'], - 'swisstopo', - c['layerBodId'], - lang, - image_rotation) -viewer_url = get_viewer_url(request, params) +tt_lubis_Quickview='tt_lubis_Quickview' +image_width = None + +# set true if featureId comes from stac +isStac = c['featureId'].startswith('lubis-luftbilder_schraegaufnahmen') +# new feature ids start with: lubis-luftbilder +# simply create a link to the stac browser +# there is no way to open to activate the orthophoto with the link parameters +if isStac: + dataGeoAdminHost = request.registry.settings['datageoadminhost'] + asset_url=f"{dataGeoAdminHost}/{c['layerBodId']}/{c['featureId']}/{c['featureId']}.tif" + preview_url=f"{dataGeoAdminHost}/{c['layerBodId']}/{c['featureId']}/{c['featureId']}.jpg" + meta_csv_url=f"{dataGeoAdminHost}/{c['layerBodId']}/{c['featureId']}/{c['featureId']}.csv" + viewer_url=asset_url + tt_lubis_Quickview='tt_lubis_Quickview_stac' +# legacy: old ebkeys with fullresviewer in aerialimages bucket +# this part can be removed when the migration of the aerialimages bucket to stac/data.geo.admin.ch is finished +else: + preview_url = determinePreviewUrl(tileUrlBasePath, c['featureId']) + image_rotation = 0 + wh = h.imagesize_from_metafile(tileUrlBasePath, c['featureId']) + image_width = wh[0] + image_height = wh[1] + + params = ( + image_width, + image_height, + _('tt_lubis_ebkey'), + c['featureId'], + 'swisstopo', + c['layerBodId'], + lang, + image_rotation) + viewer_url = get_viewer_url(request, params) + %> +% if isStac: # STAC Tooltips + ${_('tt_lubis_ebkey')} ${c['featureId']} + ${_('tt_lubis_Flugdatum')} ${datum} + ${_('tt_lubis_bildpfad')} ${c['attributes']['filename']} + ${_('tt_lubis_schraegaufnahmen_stereo_couple')} ${c['attributes']['stereo_couple']} + ${_('tt_lubis_schraegaufnahmen_x')} ${c['attributes']['x']} + ${_('tt_lubis_schraegaufnahmen_y')} ${c['attributes']['y']} + ${_("zusatzinfo")} + + ${_(f"{c['layerBodId']}.meta_csv_url")} + + + ${_(tt_lubis_Quickview)} + + quickview + + +% else: # OLD Tooltips with GDWH datasource ${_('tt_lubis_ebkey')} ${c['featureId']} ${_('tt_lubis_inventarnummer')} ${c['attributes']['inventory_number']} ${_('tt_lubis_Flugdatum')} ${datum} @@ -84,9 +122,7 @@ viewer_url = get_viewer_url(request, params) % if preview_url != "" and image_width != None: ${_('tt_lubis_Quickview')} - - quickview - + quickview % else: @@ -95,37 +131,57 @@ viewer_url = get_viewer_url(request, params) % endif +% endif + <%def name="extended_info(c, lang)"> <% +# TODO: extended tooltip can be completely removed after the migration to stac c['stable_id'] = True protocol = request.scheme c['baseUrl'] = h.make_agnostic(''.join((protocol, '://', request.registry.settings['geoadminhost']))) -aerialimages_data_host = request.registry.settings['aerialimages_data_host'] -tileUrlBasePath = aerialimages_data_host + '/tiles' topic = request.matchdict.get('map') lang = request.lang -preview_url = determinePreviewUrl(tileUrlBasePath, c['featureId']) -image_rotation = 0 -wh = h.imagesize_from_metafile(tileUrlBasePath, c['featureId']) -image_width = wh[0] -image_height = wh[1] datum = date_to_str(c['attributes']['flightdate']) -params = ( - image_width, - image_height, - _('tt_lubis_ebkey'), - c['featureId'], - 'swisstopo', - c['layerBodId'], - lang, - image_rotation) -viewer_url = get_viewer_url(request, params) + +isStac = c['featureId'].startswith('lubis-luftbilder_schraegaufnahmen') +if not isStac: + aerialimages_data_host = request.registry.settings['aerialimages_data_host'] + tileUrlBasePath = aerialimages_data_host + '/tiles' + preview_url = determinePreviewUrl(tileUrlBasePath, c['featureId']) + image_rotation = 0 + wh = h.imagesize_from_metafile(tileUrlBasePath, c['featureId']) + image_width = wh[0] + image_height = wh[1] + params = ( + image_width, + image_height, + _('tt_lubis_ebkey'), + c['featureId'], + 'swisstopo', + c['layerBodId'], + lang, + image_rotation) + viewer_url = get_viewer_url(request, params) + %> +% if isStac: # STAC Tooltips +${_('tt_lubis_ebkey')}: ${c['featureId']} + + + + + + + + +
${_('tt_lubis_ebkey')} ${c['featureId']}
${_('tt_lubis_Flugdatum')} ${datum}
${_('tt_lubis_bildpfad')} ${c['attributes']['filename']}
${_('tt_lubis_schraegaufnahmen_stereo_couple')} ${c['attributes']['stereo_couple']}
${_('tt_lubis_schraegaufnahmen_x')} ${c['attributes']['x']}
${_('tt_lubis_schraegaufnahmen_y')} ${c['attributes']['y']}
+ +% else: # quickview and iframe are only activated for the old images ${_('tt_lubis_ebkey')}: ${c['featureId']} @@ -160,6 +216,8 @@ viewer_url = get_viewer_url(request, params) +% endif + <%def name="extended_resources(c, lang)"> diff --git a/chsdi/templates/htmlpopup/lubis_terra.mako b/chsdi/templates/htmlpopup/lubis_terra.mako index 9f50b2529b..453f1b66c3 100644 --- a/chsdi/templates/htmlpopup/lubis_terra.mako +++ b/chsdi/templates/htmlpopup/lubis_terra.mako @@ -11,7 +11,6 @@ import markupsafe def br(text): return text.replace('\n', markupsafe.Markup('
')) - def determinePreviewUrl(tileUrlBasePath, ebkey): tileUrlBasePath = tileUrlBasePath @@ -64,57 +63,73 @@ lang = lang if lang in ('fr','it','en') else 'de' c['stable_id'] = True request = context.get('request') -toposhopscan = 'nein' -if c['attributes']['filename'] : - toposhopscan = 'ja' - aerialimages_data_host = request.registry.settings['aerialimages_data_host'] tileUrlBasePath = aerialimages_data_host + '/tiles' preview_url = determinePreviewUrl(tileUrlBasePath, c['featureId']) -image_width = c['attributes']['image_width'] if 'image_width' in c['attributes'] else None -image_height = c['attributes']['image_height'] if 'image_height' in c['attributes'] else None -image_rotation = 0 -firma = '-' -if image_width is None or image_height is None: +# set true if featureId comes from stac +isStac = c['featureId'].startswith('lubis-terrestrische_aufnahmen') + +datum = date_to_str(c['attributes']['flugdatum']) +if isStac: + dataGeoAdminHost = request.registry.settings['datageoadminhost'] + asset_url=f"{dataGeoAdminHost}/{c['layerBodId']}/{c['featureId']}/{c['featureId']}.tif" + preview_url=f"{dataGeoAdminHost}/{c['layerBodId']}/{c['featureId']}/{c['featureId']}.jpg" + meta_csv_url=f"{dataGeoAdminHost}/{c['layerBodId']}/{c['featureId']}/{c['featureId']}.csv" + viewer_url=asset_url + tt_lubis_Quickview='tt_lubis_Quickview_stac' + url_pdf = dataGeoAdminHost + "/" + c['layerBodId'] + "/pdf/" + c['attributes']['base_uuid'] + '.pdf' + pdf = h.resource_exists(url_pdf) or None + url_smapshot= "https://smapshot.heig-vd.ch/map/?imageId={}".format(c['attributes']['smapshot_id']) +# legacy: old ebkeys with fullresviewer in aerialimages bucket +# this part can be removed when the migration of the aerialimages bucket to stac/data.geo.admin.ch is finished +else: + image_rotation = 0 + firma = '-' wh = h.imagesize_from_metafile(tileUrlBasePath, c['featureId']) image_width = wh[1] image_height = wh[0] + params = ( + image_width, + image_height, + _('tt_lubis_ebkey'), + c['featureId'], + firma, + c['layerBodId'], + lang, + image_rotation) + viewer_url = get_viewer_url(request, params) - -datum = date_to_str(c['attributes']['flugdatum']) -params = ( - image_width, - image_height, - _('tt_lubis_ebkey'), - c['featureId'], - firma, - c['layerBodId'], - lang, - image_rotation) -viewer_url = get_viewer_url(request, params) %> - - ${_(tt_lubis_ebkey)} - ${c['attributes']['image_number'] or '-'} - -${_('tt_lubis_inventarnummer')} ${c['attributes']['inventarnummer'] or '-'} - - ${_('ch.swisstopo.lubis-terrestrische_aufnahmen.tt_lubis_aufnahmedatum')} - ${datum or '-'} - - - ${_('tt_lubis_Filmart')} - ${c['attributes']['filmart'] or '-'} +% if isStac: # STAC Tooltips +${_(tt_lubis_ebkey)} ${c['attributes']['image_number'] or '-'} +${_('ch.swisstopo.lubis-terrestrische_aufnahmen.tt_lubis_aufnahmedatum')}${datum or '-'} +${_('tt_lubis_bildpfad')} ${c['attributes']['filename'] or '-'} +${_('ch.swisstopo.lubis-terrestrische_aufnahmen.operate_name')} ${c['attributes']['ort'] or '-'} +${_('ch.swisstopo.lubis-terrestrische_aufnahmen.station')} ${c['attributes']['station'] or '-'} +${_('tt_lubis_schraegaufnahmen_x')} ${c['attributes']['x'] or '-'} +${_('tt_lubis_schraegaufnahmen_y')} ${c['attributes']['y'] or '-'} +${_('tt_lubis_Filmart')} ${c['attributes']['filmart'] or '-'} +% if pdf: +${_('link')}${_('ch.swisstopo.lubis-terrestrische_aufnahmen.expertenlink')} - pdf +% endif +${_('link')} smapshot ${_('link')} smapshot +${_("zusatzinfo")} + + ${_(f"{c['layerBodId']}.meta_csv_url")} + - -% if 'contact_image_url' in c['attributes'] and c['attributes']['contact_image_url']: - - ${_('tt_lubis_url_canton')} - ${c['attributes']['contact_image_url']} +${_(tt_lubis_Quickview)} + + quickview + -% endif +% else: # OLD Tooltips with GDWH datasource +${_(tt_lubis_ebkey)} ${c['attributes']['image_number'] or '-'} +${_('tt_lubis_inventarnummer')} ${c['attributes']['inventarnummer'] or '-'} +${_('ch.swisstopo.lubis-terrestrische_aufnahmen.tt_lubis_aufnahmedatum')}${datum or '-'} +${_('tt_lubis_Filmart')}${c['attributes']['filmart'] or '-'} % if preview_url != "" and image_width != None: @@ -129,73 +144,34 @@ viewer_url = get_viewer_url(request, params) ${_('tt_lubis_noQuickview')} % endif - -% if 'contact_web' in c['attributes']: - - ${_('tt_lubis_bildorder')} - - ${c['attributes']['contact'] | br } -
- ${c['attributes']['contact_email']} -
- -% if c['attributes']['contact_web'] != '-': - -% endif - - ${c['attributes']['contact_web']} - -% if c['attributes']['contact_web'] != '-': - -% endif - - - % endif <%def name="extended_info(c, lang)"> <% +# TODO: extended tooltip can be completely removed after the migration to stac from chsdi.lib.helpers import resource_exists c['stable_id'] = True -if c['layerBodId'] == 'ch.swisstopo.lubis-luftbilder_farbe': - imgtype = 1 -elif c['layerBodId'] == 'ch.swisstopo.lubis-luftbilder_infrarot': - imgtype = 2 -else: - imgtype = 0 -endif protocol = request.scheme c['baseUrl'] = h.make_agnostic(''.join((protocol, '://', request.registry.settings['geoadminhost']))) topic = request.matchdict.get('map') lang = request.lang + aerialimages_data_host = request.registry.settings['aerialimages_data_host'] tileUrlBasePath = aerialimages_data_host + '/tiles' - - preview_url = determinePreviewUrl(tileUrlBasePath, c['featureId']) -filesize_mb = '-' -toposhopscan = 'nein' -filename = c['attributes']['filename'] -if filename: - filesize_mb = c['attributes']['filesize_mb'] - toposhopscan = 'ja' -endif +filename = c['attributes']['filename'] or '-' +filesize_mb = c['attributes']['filesize_mb'] or '-' datum = date_to_str(c['attributes']['flugdatum']) -image_width = c['attributes']['image_width'] if 'image_width' in c['attributes'] else None -image_height = c['attributes']['image_height'] if 'image_height' in c['attributes'] else None image_rotation = 0 firma = '-' - -if image_width is None or image_height is None: - wh = h.imagesize_from_metafile(tileUrlBasePath, c['featureId']) - image_width = wh[1] - image_height = wh[0] - +wh = h.imagesize_from_metafile(tileUrlBasePath, c['featureId']) +image_width = wh[1] +image_height = wh[0] params = ( image_width, image_height, @@ -210,11 +186,12 @@ viewer_url = get_viewer_url(request, params) dataPath = 'ch.swisstopo.lubis-terrestrische_aufnahmen/' dataGeoAdminHost = request.registry.settings['datageoadminhost'] pdf = None - url_pdf = dataGeoAdminHost + "/" + dataPath + "pdf/" + c['attributes']['base_uuid'] + '.pdf' pdf = resource_exists(url_pdf) url_smapshot= "https://smapshot.heig-vd.ch/map/?imageId={}".format(c['attributes']['smapshot_id']) + +isStac = c['featureId'].startswith('lubis-terrestrische_aufnahmen') %> ${_('tt_lubis_ebkey')}: ${c['featureId']} @@ -242,6 +219,7 @@ url_smapshot= "https://smapshot.heig-vd.ch/map/?imageId={}".format(c['attributes ${_('link')} smapshot ${_('link')} smapshot +% if not isStac:
@@ -260,7 +238,7 @@ url_smapshot= "https://smapshot.heig-vd.ch/map/?imageId={}".format(c['attributes %endif } - +% endif diff --git a/chsdi/templates/htmlpopup/swissprtr.mako b/chsdi/templates/htmlpopup/swissprtr.mako index 20839d711f..a8188bf353 100644 --- a/chsdi/templates/htmlpopup/swissprtr.mako +++ b/chsdi/templates/htmlpopup/swissprtr.mako @@ -8,6 +8,5 @@ ${_('betrieb')} ${c['attributes']['betrieb'] or '-'} ${_('tt_swissprtr_ort')} ${c['attributes']['ort'] or '-'} - ${_('tt_swissprtr_detaildaten')} ${_('linkzurbeschreibung')} diff --git a/tests/integration/test_features_service.py b/tests/integration/test_features_service.py index d299ca789d..41a978cd88 100644 --- a/tests/integration/test_features_service.py +++ b/tests/integration/test_features_service.py @@ -194,8 +194,8 @@ def test_find_non_integer(self): self.assertIn('Please provide an integer', resp.text) def test_find_boolean_true(self): - params = {'layer': 'ch.swisstopo.lubis-luftbilder_farbe', - 'searchField': 'orientierung', + params = {'layer': 'ch.swisstopo.swissboundaries3d-gemeinde-flaeche.fill', + 'searchField': 'is_current_jahr', 'searchText': 'True', 'returnGeometry': 'false', 'contains': 'false'} @@ -205,8 +205,8 @@ def test_find_boolean_true(self): self.assertEsrijsonFeature(resp.json['results'][0], 21781, hasGeometry=False) def test_find_boolean_false(self): - params = {'layer': 'ch.swisstopo.lubis-luftbilder_farbe', - 'searchField': 'orientierung', + params = {'layer': 'ch.swisstopo.swissboundaries3d-gemeinde-flaeche.fill', + 'searchField': 'is_current_jahr', 'searchText': 'FALSE', 'returnGeometry': 'false', 'contains': 'false'} @@ -563,10 +563,6 @@ def test_extendedhtmlpopup_valid(self): resp = self.testapp.get('/rest/services/ech/MapServer/ch.bakom.radio-fernsehsender/11/extendedHtmlPopup', status=200) self.assertEqual(resp.content_type, 'text/html') - def test_extendedhtmlpopup_valid_lubis(self): - resp = self.testapp.get('/rest/services/all/MapServer/ch.swisstopo.lubis-luftbilder_farbe/19981551013722/extendedHtmlPopup', status=200) - self.assertEqual(resp.content_type, 'text/html') - def test_extendedhtmlpopup_valid_langs(self): for lang in ('de', 'fr', 'it', 'rm', 'en'): try: