Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapproxy 1.9, TMS: wrong capabilities and demo not working if combined with WMTS #239

Closed
anneb opened this issue Jul 25, 2016 · 2 comments
Closed

Comments

@anneb
Copy link

anneb commented Jul 25, 2016

I believe I found a problem in the Mapproxy 1.9 tms demo for the case where the configuration contains both WMTS and TMS services for MERCATOR layers.

In version 1.8 the TMS demo generates TMS requests like:
http://servername/mapproxy/myconfig/tms/1.0.0/osm/EPSG900913/0/0/1.png

Using the same configuration in version 1.9, the TMS capabilities look like:

<?xml version="1.0"?>
    <TileMapService version="1.0.0">
    <Title>MapProxy WMS</Title>
    <Abstract></Abstract>
    <TileMaps>
        <TileMap title="OpenStreetmap"
                 srs="OSGEO:41001"
                 profile="global-mercator"
href="http://localhost/mapproxy/osmtmsproblem/tms/1.0.0/osm/GLOBAL_MERCATOR" />
    </TileMaps>
</TileMapService>

and the the TMS demo generates TMS requests like:
http://servername/mapproxy/myconfig/tms/1.0.0/osm/GLOBAL_MERCATOR/0/0/1.png

However, Mapproxy TMS does not support these requests and result in 404 responses with the following error message:

<?xml version="1.0"?>
<TileMapServerError>
    <Message>unknown layer: osm</Message>
</TileMapServerError>

The TMS requests containing /GLOBAL_MERCATOR/ are generated only if a WMTS service is included in the configuration.

The config that I am using to reproduce the problem in Mapproxy 1.9:

services:
  #sets up how to make the source data available
  demo:
  tms:
  wmts:
  wms:

    #srs sets the coordinate reference systems as which you want to make your data available. MapProxy reprojects the source data very well to these projections.
    srs: ['EPSG:900913','EPSG:3857']
    image_formats: ['image/png']

layers:
  #sets up which layers you want to make available using the services above. You can add many, but let's stick to osm data here.
  - name: osm
    title: OpenStreetmap
    sources: [osm_cache]

caches:
  #setup the cache for the open streetmap tiles. This cache is used by the layer above.
  osm_cache:
    disable_storage: true
    sources: [osm_tiles]

sources:
   osm_tiles:
     #the osm_tiles source refers to the openstreetmap.org tiles. These will be downloaded upon request (if not already cached) and served by MapProxy
     type: tile
     url: http://b.tile.openstreetmap.org/%(tms_path)s.%(format)s
     grid: osm_grid #the grid to use for the osm tiles. This is really important. It is specified below.

grids:
  osm_grid:
    #this srs and origin specify a grid that can be used elsewhere in the configuration. In this example it is used for the osm_tiles source. These settings are correct for openstreetmap.org tiles.
    #The google mercator srs is used (also called EPSG:900913), and the origin of the tiles is north-west). If you get this wrong, you might very well get an all-blue world.
    srs: EPSG:900913
    origin: nw

globals:
  #next are some global configuration options for MapProxy. They mostly explain themselves, or can be looked-up in the MapProxy docs.
  cache:
    # where to store the cached images
    base_dir: '/path_to_cache_dir'
    # where to store lockfiles
    lock_dir: '/path_to_locks/'


@anneb anneb changed the title Mapproxy 1.9 problem in TMS demo Mapproxy 1.9, TMS: wrong capabilities and demo not working if combined with WMTS Jul 28, 2016
@olt olt closed this as completed in 004fb6c Aug 4, 2016
@olt
Copy link
Member

olt commented Aug 4, 2016

The metadata of the tile_layer, which contains the URL path was overwritten. This is now fixed.

@justb4
Copy link
Contributor

justb4 commented Sep 20, 2016

+1 : found same issue in MP 1.9.0, but indeed fixed in TMS/WMTS demo in MapProxy 1.9.1a0-20160920.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants