Git Product home page Git Product logo

mapproxy-config's Introduction

mapproxy-config

Avaliable maps

🗺 A list of all avaliable maps with demo and editing urls …

Other projects

Add new layer

Install

python3 -m venv env
source env/bin/activate
pip install -r requirements.txt

Run local

mapproxy-util serve-develop config.yml

Deployment

# creates the wsgi.py script
mapproxy-util create -t wsgi-app -f config.yml wsgi.py

Note: We don't use make_wsgi_app(…, reloader=True) but restart the server manually. The auto reloading would only restart if the config is valid, which would hide a broken edit. The manual reload will make the error visible.

Create a systemd service script in /etc/systemd/system/mapproxy.service.

[Unit]
Description=Mapproxy gunicorn daemon
After=network.target

[Service]
User=tiles
Group=tiles
WorkingDirectory=/srv/tiles/proxy
ExecStart=/srv/tiles/proxy/env/bin/gunicorn --access-logfile /var/log/mapproxy/access.log --error-logfile /var/log/mapproxy/error.log --bind unix:/tmp/mapproxy.sock --workers 9 wsgi:application

[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl start mapproxy

Add to nginx configuration:

    location /proxy/ {
        proxy_pass http://unix:/tmp/mapproxy.sock;
        proxy_set_header Host $http_host;
        proxy_set_header X-Script-Name /proxy;
    }
nginx -t
systemctl start nginx

Debugging

Which config sources are recognized by Mapproxy?

Use the Mapproxy Debug Page. It lists all layers that are avaliable based on the config. However, there is an issue with the projection, so the previews do not work.

Which URLs does the Mapproxy call?

Check that log.ini "active" (not commented out); if needed, change and restart. Use cat mapproxy-config/mapproxy_log/source-requests.log to see the requested URLs.

Copy one of those URLs and fiddle with the URL params the browser until the right image is shown.

Remeber to delete the file system cache.

ls mapproxy-config/cache_data/ shows all layer that have cached images. Remove the folder to trigger a cache refresh, eg rm -rf mapproxy-config/cache_data/alkis_30_cache_EPSG900913

Remeber to refresh the browser cache.

Even with a fresh file system cache, images might still be cached in the browser. Unfortunately, iD Editor does not allow hard reloads to refresh this data. One workaround is, to zoom and pan the map so new images are requested.

Which layer are avaliable for a given WMS service?

Use URLs like https://fbinter.stadt-berlin.de/fb/wms/senstadt/wmsk_alkis?service=WMS&request=GetCapabilities&version=1.3.0 to create a list of layer IDs with description. Examples are [layer_alkis_berlin.md] and [layer_strassenbefahrung_berlin.md].

You can also try https://mybinder.org/v2/gh/rbuffat/eli-helper/master (GitHub) with the fbintern URL from above to get a list of avaliable layers.

Mapproxy documentation.

To see the installed version of mapproxy:

cd mapproxy-config
source env/bin/activate
mapproxy-util --version
# MapProxy 1.13.2

Useful WMS query params

?service=WMS&request=GetCapabilities&version=1.3.0
?format=image%2Fpng&height=512&bbox=388800.010065,5818137.195276,393794.488433,5821374.047744&layers=0&srs=ESPG:25833&style=default&service=WMS&request=GetMap&width=512&version=1.3.0
?width=512&height=512&bbox=388800,5818137,393794,5821374&layers=0&srs=EPSG:4326&styles=default&format=image/png&service=WMS&request=GetMap&version=1.3.0

mapproxy-config's People

Contributors

jochenklar avatar tordans avatar wikinaut avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mapproxy-config's Issues

How use it with Mapbox ?

Hello,

I am using mapbox and will use it to show some map from Fisbroker into my map. I can ee my map on mapproxy interface:

image

image

This map works :

	map.addSource('wms-test-source', {
				type: 'raster',
				tiles: ['https://tiles.codefor.de/berlin-2022-dop20rgbi/{z}/{x}/{y}.png'],
				tileSize: 256
			});

image

But not works locally with tile: // tiles: ['http://127.0.0.1:8080/tms/bnp_0/webmercator/{z}/{x}/{y}.png'], or another local.

image

And I have this issues on all layer if try it locally.

Someone can help ?

Greyscale ALKIS layer

In the FIS Broker there is a b/w version of the ALKIS map, is it possible to access this version over the mapproxy?

Get Zoom 20 going for Layer strassenbefahrung

The TMS URL only works up to zoom level 19.
However, the data would allow for more details.

That can be worked around by using maxNativeZoom=19 + maxZoom=20 in Leaflet but not all clients support this and the result is pixelated.

I tried a few tests like 681a5bd but that did not work, yet. They are reverted for now.

Get ALKIS added to the Straßenbefahrung Layer (Make strassenbefahrung Layer transparent)

ALKIS Layer

Update: Lets first wait on openstreetmap/iD#8057; maybe its possible to use the WMS service directly.

Update 2: Now, lets wait for openstreetmap/iD#8113 – at least for a bit.


@jochenklar is it possible to add the this as an output?

https://fbinter.stadt-berlin.de/fb/index.jsp?loginkey=zoomStart&mapId=wmsk_alkis@senstadt&bbox=389377,5819197,391086,5820203

https://fbinter.stadt-berlin.de/fb/berlin/service_intern.jsp?id=wmsk_alkis@senstadt&type=WMS

ALKIS Berlin (Amtliches Liegenschaftskatasterinformationssystem)

Ebenen: | Lagebezeichnung
-- | --
  | Tatsächliche Flächennutzung
  | Gewässer Vegetation Linien
  | Relief
  | Straßennamen
  | Tatsächliche Flächennutzung - Navigation
  | Erläuterungen zu tatsächlichen Flächennutzungen
  | Bauwerke
  | Gebäude
  | Flurstücke
  | Gebäude - Navigation
  | Rechtliche Festlegungen
  | Gewässer- und Vegetationsflächen
  | Erläuterungen zu Bauwerken
  | Flurstücksnummer
  | Erläuterungen zu Gebäuden
  | Erläuterungen zu untergeordneten Gewässern und Vegetation
  | Vegetation - Punkte
  | Ortsteile
  | Besondere Flurstücksgrenzen
  | Land
  | Gemeinde
  | Gemarkung
  | Flur

Rechneradresse: | https://fbinter.stadt-berlin.de/fb/wms/senstadt/wmsk_alkis
-- | --
Standard: | WMS
Version: | 1.0.0
  | 1.1.0
  | 1.1.1
  | 1.3.0
Operationen: | GetCapabilities
  | GetMap
Grafikformate: | image/jpeg
  | image/png

Test and add layer Fußwegenetz

Das Fußgängernetz ist ein Knoten-Kanten-Modell der Fußwege Berlins. Es ist ein eigenständiges, unabhängiges und gleichrangiges Netz neben dem Detailnetz. Die zwei Netze unterscheiden sich durch Ihre Nutzungsart. Das Fußgängernetz steht für das gesamte Land Berlin zur Verfügung und besteht aus zwei Einheiten, dem Kantennetz und den zugehörigen Knoten.

Erste schnelle Beobachtung:

  • An Flächen werden gerne beliebige Linien gelegt um Routingfähigkeit herzustellen, die folgen aber nicht unbedingt der Geometrie vor Ort, bspw. an Gehwegvorstreckungen oder Parkflächen
  • Es gibt Wege, die nicht verbunden sind; Routing hier dann defekt (Bild)
  • Es gibt Wege, wo es keine Übergänge gibt, aufgrund von Barrieren wie einem Auto-Parkstreifen (Bild)
    image

https://fbinter.stadt-berlin.de/fb/index.jsp?loginkey=zoomStart&mapId=k_fussgaengernetz@senstadt&bbox=394327,5814609,394514,5814731

Legende https://fbinter.stadt-berlin.de/fb_daten/beschreibung/datenformatbeschreibung/Datenformatbeschreibung_Fussgaengernetz.pdf

https://fbinter.stadt-berlin.de/fb/berlin/service_intern.jsp?id=k_fussgaengernetz@senstadt&type=WMS

https://fbinter.stadt-berlin.de/fb/wms/senstadt/k_fussgaengernetz

Update sources to use new `gdi.berlin.de` source

The city is working on updating their infrastructure which means we need to update the old fbintern urls with new once. And it sounds like we will also need to checkt the layer configuration…

More info in https://www.berlin.de/sen/sbw/_assets/stadtdaten/geoportal/aktuelles/austausch-diente-server-allgemein.pdf?ts=1691689866

Austausch der Geoportal-Dienste-Server.
Allgemeine Änderungen und Ablauf
Wir planen den Austausch unserer Dienste-Server. Dabei werden schrittweise die Geoportal- (FIS- Broker-) Dienste durch Geoportal- (Geoserver-) Dienste ersetzt. Davon betroffen sind die Dienste WMS (WebMapService) und WFS (WebFeatureService). Wie bisher werden dabei die internationalen Anforderungen an die Schnittstelle erfüllt.

Änderungen beim Umstieg

  • Rechneradresse WMS
    aus https://fbinter.stadt-berlin.de/fb/wms/senstadt/ wird https://gdi.berlin.de/services/wms/
    WFS
    aus https://fbinter.stadt-berlin.de/fb/wfs/senstadt/ wird https://gdi.berlin.de/services/wfs/
  • Name des Layers im WMS
    Diese waren bisher durchnummeriert. Künftig besteht der Name aus Zeichenfolgen.
  • Name des FeatureTypes im WFS
    Der Name des FeatureTypes ändert sich.
  • Umstrukturierung
    Bei der Migration wird es voraussichtlich zu Umstrukturierungen bei einigen Diensten kommen (z.B. Entfernen von Beschriftungslayern, Zusammenfassung von Layern, ggf. Abgabe mehrerer FeatureTypes in einem WFS). Zudem wird sich die Reihenfolge der Layer in den Capabilities Responses des WMS ändern. Wenn nicht anders konfiguriert, liefert der Geoserver in alphabetischer Anordnung aus. Der WMS wird einen Rootlayer behalten, dieser wird beim geplanten möglichst einfachen Umstieg nicht mehr abfragbar sein.
    Hinzu kommt beim WMS die Funktion GetFeatureInfo zur Sachdatenanzeige, der WFS kann mehrere FeatureTypes abgeben.

Zeitliche Planung
Die Umstellung wird schrittweise erfolgen, demnächst beginnen und sich über einen längeren Zeitraum erstrecken. Eine genauere Aussage liegt bislang nicht vor.

Dienst zum Testen
An diesen Geoserver-(Internet-) Diensten kann Einbindung vorab probiert werden: Öffentliche Toiletten WMS https://gdi.berlin.de/services/wms/toiletten? Öffentliche Toiletten WFS https://gdi.berlin.de/services/wfs/toiletten?
10.8.2023

Capabilities Requests
https://gdi.berlin.de/services/wms/toiletten?Request=GetCapabilities&Service=WMS&Version=1.3.0 https://gdi.berlin.de/services/wfs/toiletten?Request=GetCapabilities&Service=WFS&Version=2.0.0
Bei Fragen wenden Sie sich bitte an III D 1, 90139-5257, [email protected]


Ping codeforberlin/luftbilder.berlin.codefor.de#14

Test and add layers from Geoportal Brandenburg

There is OpenData in Brandenburg that also shows up two date information about Berlin.

more sources

https://wiki.openstreetmap.org/wiki/Brandenburg/Geoportal

webatlas

Website https://geoportal.brandenburg.de/detailansichtdienst/render?view=gdibb&url=https%3A%2F%2Fgeoportal.brandenburg.de%2Fgs-json%2Fxml%3Ffileid%3D31591bca-bb40-4d8a-98ad-35efc37524c9

WMS URL

https://isk.geobasis-bb.de/mapproxy/webatlasde_topplus/service/wms?SERVICE=WMS
&VERSION=1.3.0
&REQUEST=GetMap
&FORMAT=image%2Fpng
&TRANSPARENT=false
&LAYERS=topplus_farbe%2Cwebatlas_farbe
&STYLES=
&CRS={proj}
&WIDTH={width}
&HEIGHT={height}
&BBOX={bbox}

Test URL: Test in iD

alkis_wms

Website: Nicht ganz klar, vermutlich https://geobasis-bb.de/lgb/de/geodaten/liegenschaftskataster/alkis/#

WMS URL

https://isk.geobasis-bb.de/ows/alkis_wms?EXCEPTION=inimage
&FORMAT=image/jpeg
&TRANSPARENT=false
&VERSION=1.1.1
&SERVICE=WMS
&REQUEST=GetMap
&LAYERS=adv_alkis_gesetzl_festlegungen,adv_alkis_bodensch,adv_alkis_oeff_rechtl_sonst_festl,adv_alkis_tatsaechliche_nutzung,adv_alkis_gewaesser,adv_alkis_vegetation,adv_alkis_verkehr,adv_alkis_siedlung,adv_alkis_gebaeude,adv_alkis_flurstuecke
&styles=
&SRS={proj}
&WIDTH={width}
&HEIGHT={height}
&BBOX={bbox}

Source

  1. Basis URL aus https://wiki.openstreetmap.org/wiki/Brandenburg/Geoportal#N.C3.BCtzliche_WMS-Layer_f.C3.BCr_OSM
  2. Liste der Layer aus https://isk.geobasis-bb.de/ows/alkis_wms?request=GetCapabilities&service=WMS extrahiert.

Test URL: Test in iD

Verwaltungsgrenzen Brandenburg mit Berlin (WMS)

Website

WMS URL

https://isk.geobasis-bb.de/ows/vg_wms?language=ger
&service=WMS
&version=1.3.0
&request=GetMap
&exception=inimage
&format=image/png
&layers=sorbgeb,otl,vgrz,nvgrz,nam,nge,notl
&styles=
&CRS={proj}
&width={width}
&height={height}
&bbox={bbox}

Issues:
The background (bg) is either black or transparent. No white option. Which breaks in iD, since the default BG ist black as well.

Workaround: Manually change the bg color:
image

Or: We need to add this to the mapproxy and add the bg color.

Source
2. Liste der Layer aus https://geobroker.geobasis-bb.de/gbss.php?MODE=GetProductPreview&PRODUCTID=b759d0a6-5a46-45d3-8b7b-fe684ae7159f

Test URL: Test in iD

Increase Zoom levels

The underlying data for the non-aerial image maps collected from FIS Broker allows for way more details and subsequent zoom levels – see for example the ALKIS map, the proxy only goes up to 19, while I can zoom way more using the FIS Broker website. Is there a specific reason the zoom level stops at 19? And would it be possible to increase the zoom level a bit more? (For my usecase 22 would be great)
imageimage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.