{"id":42572221,"url":"https://github.com/codeforberlin/mapproxy-config","last_synced_at":"2026-01-28T21:18:12.136Z","repository":{"id":42976050,"uuid":"193568538","full_name":"codeforberlin/mapproxy-config","owner":"codeforberlin","description":"Proxy for the FIS-Broker Berlin.","archived":false,"fork":false,"pushed_at":"2025-08-02T21:59:06.000Z","size":173,"stargazers_count":5,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-11T15:43:12.509Z","etag":null,"topics":["fis-broker","mapproxy","python"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeforberlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-24T19:44:17.000Z","updated_at":"2025-08-04T05:38:07.000Z","dependencies_parsed_at":"2022-09-22T05:29:00.311Z","dependency_job_id":"b85dd24b-2cb5-4fd5-817e-ab13811d423f","html_url":"https://github.com/codeforberlin/mapproxy-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codeforberlin/mapproxy-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforberlin%2Fmapproxy-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforberlin%2Fmapproxy-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforberlin%2Fmapproxy-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforberlin%2Fmapproxy-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeforberlin","download_url":"https://codeload.github.com/codeforberlin/mapproxy-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforberlin%2Fmapproxy-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28852134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fis-broker","mapproxy","python"],"created_at":"2026-01-28T21:18:11.495Z","updated_at":"2026-01-28T21:18:12.125Z","avatar_url":"https://github.com/codeforberlin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mapproxy-config\n\nA MapProxy configuration that groups layers **by WMS endpoint/service URL** for better organization and maintainability.\n\n```\nmapproxy-config/\n├── config.yml                # Main configuration (loads all source modules)\n├── config_layers.yml         # All layer definitions (loaded first)\n├── sources/                  # One file per WMS endpoint (caches \u0026 sources only)\n│   ├── shared-alkis.yaml          # �️  Shared ALKIS background cache\n│   ├── fbinter-alkis.yaml          # 🗺️  ALKIS cadastral data\n│   ├── fbinter-senstadt.yaml       # 🛰️  Aerial imagery (2015, 2016 CIR)\n│   ├── fbinter-oeffbeleucht.yaml   # 💡 Public lighting\n│   ├── gdi-bdom.yaml               # 🏔️  Digital elevation model\n│   ├── gdi-strassenbefahrung.yaml  # 🛣️  Street survey 2014\n│   ├── gdi-baumbestand.yaml        # 🌳 Tree inventory (all variants)\n│   ├── gdi-tempolimits.yaml        # 🚦 Speed limits\n│   ├── gdi-fussgaengernetz.yaml    # 🚶 Pedestrian network\n│   ├── gdi-postleitzahlen.yaml     # 📮 Postal codes\n│   ├── gdi-abstell-mikromob.yaml   # 🛴 Micromobility parking\n│   └── gdi-fahrradreparatur.yaml   # 🔧 Bicycle repair stations\n├── demo_links/               # Demo URLs for all available layers\n└── docker-compose.yml        # Local development environment\n```\n\n## Quick Start (Local Development)\n\n```bash\n# Start MapProxy locally with Docker\ndocker-compose up -d\n\n# View demo with all layers\nopen http://localhost:8080/demo/\n\n# View generated demo links\nopen http://localhost:3001/\n```\n\n## Available maps\n\n[🗺 A list of all available maps with demo and editing urls …](./demo_links)\n\n## Other projects\n\n- [luftbilder.berlin.codefor.de](https://luftbilder.berlin.codefor.de) showcases aerial images from different years [Github](https://github.com/codeforberlin/luftbilder.berlin.codefor.de)\n- [maps.berlin.codefor.de](https://maps.berlin.codefor.de) showcases all kind of maps [Github](https://github.com/codeforberlin/maps.berlin.codefor.de)\n- [github.com/codeforberlin/tilestache-config](https://github.com/codeforberlin/tilestache-config) is the config for serving aerial imagery from file ([config](https://github.com/codeforberlin/tilestache-config/blob/master/config.json))\n\u003c!-- * [github.com/codeforberlin/mapproxy-config](https://github.com/codeforberlin/mapproxy-config) is a map proxy for some imagery layers by the City of Berlin --\u003e\n\n## Configuration Architecture\n\nThis MapProxy setup uses a **modular architecture** that separates concerns:\n\n- **`config_layers.yml`**: Contains ALL layer definitions (must be first in base array)\n- **`sources/`**: Individual files per data source containing only caches \u0026 sources\n- **`config.yml`**: Main config that includes all modules via `base` directive\n\n⚠️ **Important**: MapProxy only processes the first file with a `layers:` section, so all layers must be defined in `config_layers.yml`.\n\n## Add new layer\n\n### For Existing Data Sources\n\n1. **Add layer definition** to `config_layers.yml`:\n   ```yaml\n   layers:\n     - name: my_new_layer\n       sources: [my_new_cache]\n       title: \"My New Layer\"\n   ```\n\n2. **Add cache and source** to the appropriate `sources/xxx.yaml` file:\n   ```yaml\n   caches:\n     my_new_cache:\n       grids: [mercator]\n       sources: [my_new_source]\n   \n   sources:\n     my_new_source:\n       type: wms\n       req:\n         url: https://gdi.berlin.de/services/wms/my_service\n         layers: my_layer\n   ```\n\n3. Use https://gdi.berlin.de/viewer/main/ to inspect network requests\n4. Add documentation in `layer_docs/` if helpful\n\n### For New Data Sources\n\n1. **Create** `sources/new-service.yaml` with caches and sources\n2. **Add layer definitions** to `config_layers.yml` \n3. **Include the new file** in `config.yml` base section:\n   ```yaml\n   base:\n     - config_layers.yml  # Must be first!\n     # ... existing files\n     - sources/new-service.yaml\n   ```\n\n## Install\n\n```\npython3 -m venv env\nsource env/bin/activate\npip install -r requirements.txt\n```\n\n## Run local\n\n```\nmapproxy-util serve-develop config.yml\n```\n\n## Deployment\n\n```\n# creates the wsgi.py script\nmapproxy-util create -t wsgi-app -f config.yml wsgi.py\n```\n\nNote: 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.\n\nCreate a systemd service script in `/etc/systemd/system/mapproxy.service`.\n\n```\n[Unit]\nDescription=Mapproxy gunicorn daemon\nAfter=network.target\n\n[Service]\nUser=tiles\nGroup=tiles\nWorkingDirectory=/srv/tiles/proxy\nExecStart=/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\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```bash\nsystemctl daemon-reload\nsystemctl start mapproxy\n```\n\nAdd to nginx configuration:\n\n```\n    location /proxy/ {\n        proxy_pass http://unix:/tmp/mapproxy.sock;\n        proxy_set_header Host $http_host;\n        proxy_set_header X-Script-Name /proxy;\n    }\n```\n\n```bash\nnginx -t\nsystemctl start nginx\n```\n\n## Debugging\n\n### Which config sources are recognized by Mapproxy?\n\nUse the [Mapproxy Debug Page](https://mapproxy.codefor.de/demo/). It lists all layers that are avaliable based on the config.\nHowever, there is an issue with the projection, so the previews do not work.\n\n### Which URLs does the Mapproxy call?\n\nCheck that [log.ini](log.ini) \"active\" (not commented out); if needed, change and restart.\nUse `cat mapproxy-config/mapproxy_log/source-requests.log` to see the requested URLs.\n\nCopy one of those URLs and fiddle with the URL params the browser until the right image is shown.\n\n### Remeber to delete the file system cache.\n\n`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`\n\n### Remeber to refresh the browser cache.\n\nEven 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.\n\n### Which layer are avaliable for a given WMS service?\n\nUse URLs like `https://fbinter.stadt-berlin.de/fb/wms/senstadt/wmsk_alkis?service=WMS\u0026request=GetCapabilities\u0026version=1.3.0` to create a list of layer IDs with description. Examples are [layer_alkis_berlin.md] and [layer_strassenbefahrung_berlin.md].\n\nYou can also try https://mybinder.org/v2/gh/rbuffat/eli-helper/master ([GitHub](https://github.com/rbuffat/eli-helper)) with the fbintern URL from above to get a list of avaliable layers.\n\n### Mapproxy documentation.\n\n- https://mapproxy.github.io/mapproxy/latest/index.html\n- https://mapproxy.github.io/mapproxy/latest/configuration_examples.html#merge-multiple-layers how to merge layers\n\nTo see the installed version of mapproxy:\n\n```\ncd mapproxy-config\nsource env/bin/activate\nmapproxy-util --version\n# MapProxy 1.13.2\n```\n\n## Useful WMS query params\n\n```\n?service=WMS\u0026request=GetCapabilities\u0026version=1.3.0\n```\n\n```\n?format=image%2Fpng\u0026height=512\u0026bbox=388800.010065,5818137.195276,393794.488433,5821374.047744\u0026layers=0\u0026srs=ESPG:25833\u0026style=default\u0026service=WMS\u0026request=GetMap\u0026width=512\u0026version=1.3.0\n```\n\n```\n?width=512\u0026height=512\u0026bbox=388800,5818137,393794,5821374\u0026layers=0\u0026srs=EPSG:4326\u0026styles=default\u0026format=image/png\u0026service=WMS\u0026request=GetMap\u0026version=1.3.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforberlin%2Fmapproxy-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeforberlin%2Fmapproxy-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforberlin%2Fmapproxy-config/lists"}