[MapProxy] proxy by mask?

Russ Nelson nelson at crynwr.com
Sat Aug 21 13:37:15 EDT 2010

Hi.  I'm trying to edit OSM in New York State.  Unfortunately, the
aerial imagery is split up into 90 different layers.  I'd like to use
code similar to combined_layer as described here:
Fetching 90 different layers and merging them all would be insanely
slow.  Instead, I'm going to consult a pixmap which tells me which WMS
has coverage at the requested bbox.  Then I'll fetch all the ones that
have coverage, turn the white into transparent, and merge.

I'm trying to determine how mapproxy is configured to fetch multiple
layers.  Is it the simple existance of multiple sources in
config.yaml?  Or is it "transparent: true"?

Can I get a few hints about how things are implemented?

  o How are the pixmaps merged into a single image?  It looks like
    wms/layer.py:VLayer returns multiple images every time you
    call render.
  o How are bboxes handled?  Are the bboxes for a layer fetched,
    and requests sent to the WMS server only if the request is
    inside its bbox?  If so, I can't find the code which does that.
    looked in wms/*, core/layer.py and core/image.py

Also, here's my design for the configuration.  It will work just like
the combined layer above with one added configuration option, "mask".
It will have as a parameter a local filename which is a pixmap image.
The boundaries of the pixmap will match the bbox of the specified
layer.  The projection of the pixmap will be EPSG:4326.  The pixmap
will be white where the layer has data, and black where it does not.
The higher the resolution of the pixmap, the more accurately the code
can determine whether a layer's data overlaps the given bbox.

--my blog is at    http://blog.russnelson.com
Crynwr supports open source software
521 Pleasant Valley Rd. | +1 315-600-8815
Potsdam, NY 13676-3213  |     Sheepdog       

More information about the MapProxy mailing list