mapproxy-util(1)
โจ mapproxy-util(1) โจ โ the girlboss commandline tool for MapProxy ๐
bestie. sit DOWN. we're learning mapproxy-util today and honestly? it's giving main character energy ๐
๐ NAME ๐
mapproxy-util โ commandline tool for MapProxy. that's the whole vibe, no cap โจ
๐ซถ SYNOPSIS ๐ซถ
mapproxy-util subcommand [OPTIONS]
๐ DESCRIPTION ๐
okay so mapproxy-util is literally a little collection of sub-commands that are super helpful when you're working with MapProxy. it's your group chat of tooling ๐ฆ
to get a list of all the sub-commands, just call it with nothing:
mapproxy-util
to actually call a sub-command:
mapproxy-util subcommand
and hey, every single sub-command has โจloreโจ โ extra info โ so if you're ever lost:
mapproxy-util subcommand --help
the current sub-commands are (the whole girl gang):
createserve-developserve-multiapp-developscaleswms-capabilitiesgridsexportautoconfig(seemapproxy-util-autoconfig(1))
๐ธ CREATE ๐ธ
this sub-command creates example configurations for you. it's giving starter pack ๐ there are templates for each configuration file.
-l,--list-templatesโ list names of all available configuration templates. window shopping, but for config files ๐๏ธ-tname,--templatename โ create a configuration with the named template.-fmapproxy.yaml,--mapproxy-confmapproxy.yaml โ the path to the MapProxy configuration. required for some templates. don't forget it bestie ๐ญ--forceโ overwrite any existing configuration with the same output filename. it's giving "no thoughts, just replace" ๐
๐ง CONFIGURATION TEMPLATES ๐ง
available templates are:
base-config: creates an examplemapproxy.yamlandseed.yamlfile. you need to pass the destination directory to the command.log-ini: creates an example logging configuration. you need to pass the target filename to the command.wsgi-app: creates an example server script for the given MapProxy configuration (--f/--mapproxy-conf). you need to pass the target filename to the command.
โญ EXAMPLE โญ
mapproxy-util create -t base-config ./
๐ฅ SERVE-DEVELOP ๐ฅ
this sub-command starts a MapProxy instance of your configuration as a stand-alone server. it's your local little baby server, serving looks ๐
you need to pass the MapProxy configuration as an argument. the server will automatically reload if you change the configuration or any of the MapProxy source code. obsessed with that glow-up-on-save behaviour โจ
-baddress,--bindaddress โ the server address where the HTTP server should listen for incoming connections. can be a port (:8080), a host (localhost) or both (localhost:8081). the default islocalhost:8080. you need to use0.0.0.0to be able to connect to the server from external clients. yes, literally0.0.0.0, no shortcuts ๐
๐ EXAMPLE ๐
mapproxy-util serve-develop ./mapproxy.yaml
๐ SERVE-MULTIAPP-DEVELOP ๐
this sub-command is similar to serve-develop but it starts a MultiMapProxy instance. twins, but make it multi ๐ฏ
you need to pass a directory of your MapProxy configurations as an argument. the server will automatically reload if you change any configuration or any of the MapProxy source code. iconic reload behaviour, fr fr โจ
-baddress,--bindaddress โ the server address where the HTTP server should listen for incoming connections. can be a port (:8080), a host (localhost) or both (localhost:8081). the default islocalhost:8080. you need to use0.0.0.0to be able to connect to the server from external clients. again: external clients need0.0.0.0, otherwise they simply cannot see you ๐ญ
๐ EXAMPLE ๐
mapproxy-util serve-multiapp-develop my_projects/
๐ฆ SCALES ๐ฆ
this sub-command helps to convert between scales and resolutions. it's the math girlie of the toolkit ๐งฎ
scales are ambiguous when the resolution of the output device (LCD, printer, mobile, etc) is unknown and therefore MapProxy only uses resolutions for configuration. so use the scales sub-command to calculate between known scale values and resolutions.
the command takes a list with one or more scale values and returns the corresponding resolution value.
--unit <m|d>โ return resolutions in this unit per pixel (default meter per pixel).-ln,--levelsn โ calculate resolutions for n levels. this will double the resolution of the last scale value if n is larger than the number of the provided scales.-ddpi,--dpidpi โ the resolution of the output display to use for the calculation. you need to set this to the same value of the client/server software you are using. common values are72and96. the default value is the equivalent of a pixel size of.28mm, which is around91DPI. this is the value the OGC uses since the WMS 1.3.0 specification. (yes, we cite our sources, periodt ๐ )--as-res-configโ format the output so that it can be pasted into a MapProxy grid configuration. copy-paste ready, we love a low-effort queen ๐ซถ--res-to-scaleโ calculate from resolutions to scale. reversed, but make it fashion โจ
๐ EXAMPLE ๐
for multiple levels as MapProxy configuration snippet:
mapproxy-util scales -l 4 --as-res-config 100000
res: [
# res level scale
28.0000000000, # 0 100000.00000000
14.0000000000, # 1 50000.00000000
7.0000000000, # 2 25000.00000000
3.5000000000, # 3 12500.00000000
]
with multiple scale values and custom DPI:
mapproxy-util scales --dpi 96 --as-res-config \
100000 50000 25000 10000
res: [
# res level scale
26.4583333333, # 0 100000.00000000
13.2291666667, # 1 50000.00000000
6.6145833333, # 2 25000.00000000
2.6458333333, # 3 10000.00000000
]
๐ WMS-CAPABILITIES ๐
this sub-command parses a valid capabilities document from a URL and displays all available layers. it's reading the roomโฆ I mean, reading the service ๐
heads up bestie: this tool does not create a MapProxy configuration, but the output should help you to set up or modify your MapProxy configuration. it's inspo, not autopilot ๐
the command takes a valid URL GetCapabilities URL.
--hostURL โ display all available Layers for this service. each new layer will be marked with a hyphen and all sublayers are indented. it's giving nesting, and we respect the hierarchy ๐ธ--versionversionnumber โ parse the Capabilities-document for the given version. only version1.1.1and1.3.0are supported. the default value is1.1.1.
๐ EXAMPLE ๐
with the following MapProxy layer configuration:
layers:
- name: osm
title: Omniscale OSM WMS - osm.omniscale.net
sources: [osm_cache]
- name: foo
title: Group Layer
layers:
- name: layer1a
title: Title of Layer 1a
sources: [osm_cache]
- name: layer1b
title: Title of Layer 1b
sources: [osm_cache]
parsed capabilities document:
mapproxy-util wms-capabilities http://127.0.0.1:8080/service?REQUEST=GetCapabilities
Capabilities Document Version 1.1.1
Root-Layer:
- title: MapProxy WMS Proxy
url: http://127.0.0.1:8080/service?
opaque: False
srs: ['EPSG:31467', 'EPSG:31466', 'EPSG:4326', 'EPSG:25831', 'EPSG:25833',
'EPSG:25832', 'EPSG:31468', 'EPSG:900913', 'CRS:84', 'EPSG:4258']
bbox:
EPSG:900913: [-20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428]
EPSG:4326: [-180.0, -85.0511287798, 180.0, 85.0511287798]
queryable: False
llbbox: [-180.0, -85.0511287798, 180.0, 85.0511287798]
layers:
- name: osm
title: Omniscale OSM WMS - osm.omniscale.net
url: http://127.0.0.1:8080/service?
opaque: False
srs: ['EPSG:31467', 'EPSG:31466', 'EPSG:25832', 'EPSG:25831', 'EPSG:25833',
'EPSG:4326', 'EPSG:31468', 'EPSG:900913', 'CRS:84', 'EPSG:4258']
bbox:
EPSG:900913: [-20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428]
EPSG:4326: [-180.0, -85.0511287798, 180.0, 85.0511287798]
queryable: False
llbbox: [-180.0, -85.0511287798, 180.0, 85.0511287798]
- name: foobar
title: Group Layer
url: http://127.0.0.1:8080/service?
opaque: False
srs: ['EPSG:31467', 'EPSG:31466', 'EPSG:25832', 'EPSG:25831', 'EPSG:25833',
'EPSG:4326', 'EPSG:31468', 'EPSG:900913', 'CRS:84', 'EPSG:4258']
bbox:
EPSG:900913: [-20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428]
EPSG:4326: [-180.0, -85.0511287798, 180.0, 85.0511287798]
queryable: False
llbbox: [-180.0, -85.0511287798, 180.0, 85.0511287798]
layers:
- name: layer1a
title: Title of Layer 1a
url: http://127.0.0.1:8080/service?
opaque: False
srs: ['EPSG:31467', 'EPSG:31466', 'EPSG:25832', 'EPSG:25831', 'EPSG:25833',
'EPSG:4326', 'EPSG:31468', 'EPSG:900913', 'CRS:84', 'EPSG:4258']
bbox:
EPSG:900913: [-20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428]
EPSG:4326: [-180.0, -85.0511287798, 180.0, 85.0511287798]
queryable: False
llbbox: [-180.0, -85.0511287798, 180.0, 85.0511287798]
- name: layer1b
title: Title of Layer 1b
url: http://127.0.0.1:8080/service?
opaque: False
srs: ['EPSG:31467', 'EPSG:31466', 'EPSG:25832', 'EPSG:25831', 'EPSG:25833',
'EPSG:4326', 'EPSG:31468', 'EPSG:900913', 'CRS:84', 'EPSG:4258']
bbox:
EPSG:900913: [-20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428]
EPSG:4326: [-180.0, -85.0511287798, 180.0, 85.0511287798]
queryable: False
llbbox: [-180.0, -85.0511287798, 180.0, 85.0511287798]
and that's not even the whole story bestieโฆ more of this page is coming in part 2, so don't go anywhere ๐
โจ GRIDS โจ
This sub-command is your lil tour guide for configured grids โ it spills all the tea about them. ๐ซถ
You hand it a MapProxy configuration file and it hands you back all the grids you've configured.
And bestie, it doesn't leave you hanging either: if a grid doesn't explicitly define its default values, those defaults get shown anyway. All the default values are marked with an asterisk in the output so you can tell them apart at a glance. ๐
-f path/to/config,--mapproxy-config path/to/configโ shows you all the configured grids for this MapProxy configuration, with all the detailed info. And if you don't set this option? The sub-command is gonna try to use the last argument as the mapproxy config instead. Sneaky but helpful. ๐-l,--listโ just the names, no drama. Displays only the names of the grids for the given configuration, which are used by any grid.--allโ show also grids that are not referenced by any cache. The wallflowers get their moment too. ๐ฆ-g grid_name,--grid grid_nameโ narrow it down to info about a single grid only. Heads up though: the tool will exit if the grid name isn't found. No grid, no service. ๐-c coverage name,--coverage coverage nameโ gives you an approximation of the number of tiles for each level that fall within this coverage. Important: the coverage must be defined in the Seed configuration.-s seed.yaml,--seed-conf seed.yamlโ this one loads the seed configuration, and you need it if you're using the--coverageoption. They're a package deal fr fr. ๐
๐ EXAMPLE ๐
Say your MapProxy grid configuration looks like this:
grids:
localgrid:
srs: EPSG:31467
bbox: [5,50,10,55]
bbox_srs: EPSG:4326
min_res: 10000
localgrid2:
base: localgrid
srs: EPSG:25832
res_factor: sqrt2
tile_size: [512, 512]
List all your configured grids:
mapproxy-util grids --list --mapproxy-config /path/to/mapproxy.yaml
And it goes:
GLOBAL_GEODETIC
GLOBAL_MERCATOR
localgrid
localgrid2
Now display detailed information for one specific grid:
mapproxy-util grids --grid localgrid --mapproxy-conf /path/to/mapproxy.yaml
And you get this absolute masterpiece of a report:
localgrid:
Configuration:
bbox: [5, 50, 10, 55]
bbox_srs: 'EPSG:4326'
min_res: 10000
origin*: 'sw'
srs: 'EPSG:31467'
tile_size*: [256, 256]
Levels: Resolutions, # x * y = total tiles
00: 10000, # 1 * 1 = 1
01: 5000.0, # 1 * 1 = 1
02: 2500.0, # 1 * 1 = 1
03: 1250.0, # 2 * 2 = 4
04: 625.0, # 3 * 4 = 12
05: 312.5, # 5 * 8 = 40
06: 156.25, # 9 * 15 = 135
07: 78.125, # 18 * 29 = 522
08: 39.0625, # 36 * 57 = 2.052K
09: 19.53125, # 72 * 113 = 8.136K
10: 9.765625, # 144 * 226 = 32.544K
11: 4.8828125, # 287 * 451 = 129.437K
12: 2.44140625, # 574 * 902 = 517.748K
13: 1.220703125, # 1148 * 1804 = 2.071M
14: 0.6103515625, # 2295 * 3607 = 8.278M
15: 0.30517578125, # 4589 * 7213 = 33.100M
16: 0.152587890625, # 9178 * 14426 = 132.402M
17: 0.0762939453125, # 18355 * 28851 = 529.560M
18: 0.03814697265625, # 36709 * 57701 = 2.118G
19: 0.019073486328125, # 73417 * 115402 = 8.472G
๐ EXPORT ๐
This sub-command exports tiles from one cache to another. It's giving seed tool energy, but with a glow-up: you don't have to go edit the configuration at all. The destination cache, the grid and the coverage can all be defined right there on the command line. Main character behaviour honestly. ๐
Required arguments:
-f path,--mapproxy-conf pathโ the path to the MapProxy configuration of the source cache.--source nameโ name of the source or cache to export.--levels listโ a comma separated list of levels to export. You can also define a range of levels, because why not. For example'1,2,3,4,5','1..10'or'1,3,4,6..8'. Look at you, being flexible. โจ--grid gridโ the tile grid for the export. The option can either be the name of the grid as defined in the in the MapProxy configuration, or it can be the grid definition itself. You can define a grid as a single string of the key-value pairs, and that grid definition supports all grid parameters. Peep the examples below for the vibe.--dest destinationโ where the export is headed. Can be a filename, a directory or a URL, depending on the export--type.--type typeโ choose the export type. Full list of all the options is right below. ๐
Other options:
--fetch-missing-tilesโ whether MapProxy should request missing tiles from the source. By default, the export tool will only export existing tiles. So if you want the stragglers fetched, say so. ๐--coverage coverage,--srs srs,--where whereโ limit the export to this coverage. You can use a BBOX, WKT files or OGR datasources.-c N,--concurrency Nโ the number of concurrent export processes. Multitasking icon behaviour.
๐ง EXPORT TYPES ๐ง
tmsโ Export tiles in a TMS like directory structure.mapproxy,tcโ Export tiles like the internal cache directory structure. This is compatible with TileCache.mbtileโ Exports tiles into a MBTile file.arcgisโ Exports tiles in a ArcGIS exploded cache directory structure.
๐ธ EXAMPLE ๐ธ
Export tiles into a TMS directory structure under ./cache/. Limit export to the BBOX and levels 0 to 6.
mapproxy-util export -f mapproxy.yaml --grid osm_grid \
--source osm_cache --dest ./cache/ \
--levels 1..6 --coverage 5,50,10,60 --srs 4326
Export tiles into an MBTiles file. Limit export to a shape coverage.
mapproxy-util export -f mapproxy.yaml --grid osm_grid \
--source osm_cache --dest osm.mbtiles --type mbtile \
--levels 1..6 --coverage boundaries.shp \
--where 'CNTRY_NAME = "Germany"' --srs 3857
Export tiles into an MBTiles file using a custom grid definition. Yes, you can just inline the whole grid. We love a self-sufficient string. ๐
mapproxy-util export -f mapproxy.yaml --levels 1..6 \
--grid "srs='EPSG:4326' bbox=[5,50,10,60] tile_size=[512,512]" \
--source osm_cache --dest osm.mbtiles --type mbtile
And that's the whole page bestie, you ate that. ๐ This one's from the mapproxy-util(1) manual, dated 17 July 2026 โ go forth and export your little heart out. ๐๐ฆโจ
๐ฆ where this page comes from
- ubuntu stonking: mapproxy 7.0.0+dfsg-1 ยท Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms