[MapProxy] non-MIME supported format for WMS source
Oliver Tonnhofer
tonnhofer at omniscale.de
Mon Jul 27 00:10:14 PDT 2015
Hi,
the configuration is right, but it doesn’t work. This is clearly a bug.
I’ve created an issue https://github.com/mapproxy/mapproxy/issues/188
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
OpenStreetMap WMS and tile services | http://maps.omniscale.com
> On 24.07.2015, at 21:00, Pestereva, Anna <apestereva at aerialservicesinc.com> wrote:
>
> Oliver,
>
> Thank you very much for the suggestion! I'm sorry, replied too quickly last time.
>
> I removed my custom image format options, but still getting same problems.. I am also looking at source-requests.log now.
> If I remove supported_formats: ['...'] line - Mapproxy requests data in image/png format, and nothing shows up in the browser
> If I use supported_formats: ['JPG'] or with 'JPG/JPEG' or 'JPEG/JPG' or 'jpg' - request goes as image/jpg and I see same old error in the browser: Unsupported format image/jpg. Try JPG instead.
> If I use supported_formats: ['JPEG'] - request goes as image/jpeg and I see the error in the browser: Unsupported format image/jpeg. Try JPG instead.
>
> I am not sure what else I can do.. Or maybe I'm missing something obvious.
> Below is my full configuration in case it affects something (left out a few other layers, caches and sources)
>
> services:
> demo:
> tms:
> use_grid_names: true
> # origin for /tiles service
> origin: 'nw'
> kml:
> use_grid_names: true
> wmts:
> md:
> title: ASI WMTS Imagery
> abstract: WMTS Imagery service by Aerial Services, Inc. via Mapproxy
> wms:
> # attribution:
> # text: Imagery by Aerial Services, Inc.
> md:
> title: ASI WMS Imagery
> abstract: WMS Imagery service by Aerial Services, Inc. via Mapproxy
>
> layers:
> - name: asi_lidarhs
> title: Lidar HS from DNR WMS for asi
> sources: [lidar_cache]
>
> caches:
> lidar_cache:
> grids: [webmercator]
> sources: [lidar_wms]
>
> parts:
> on_error: &onerror
> other:
> response: transparent
> cache: false
>
> sources:
> lidar_wms:
> type: wms
> wms_opts:
> version: 1.0.0
> req:
> url: http://ortho.gis.iastate.edu/server.cgi
> layers: lidar_hs
> # transparent: true
> supported_srs: ['EPSG:26915']
> supported_formats: ['JPG']
> coverage:
> bbox: [-96.8, 39, -90, 45.1]
> bbox_srs: 'EPSG:4326'
>
> grids:
> webmercator:
> base: GLOBAL_WEBMERCATOR
>
> globals:
> image:
> paletted: false
> cache:
> meta_size: [4, 4]
>
>
> Thank you very much! Will appreciate any help.
> Anna
>
> On Fri, Jul 24, 2015 at 1:55 AM, Oliver Tonnhofer <tonnhofer at omniscale.de> wrote:
> Hi,
>
> please always reply to the list. We do our free support only on the public mailing list, so that all users can benefit.
> JPG/JPEG is the valid format name for 1.0.0 and it should work if you remove all your custom image/format options.
>
>
> Regards,
> Oliver
> --
> Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
> OpenStreetMap WMS and tile services | http://maps.omniscale.com
>
>
> > On 23.07.2015, at 19:30, Pestereva, Anna <apestereva at aerialservicesinc.com> wrote:
> >
> > Oliver,
> >
> > thank you very much for quick reply and the tip! Unfortunately I am still receiving the same error.. I made sure to clean all cache. Any other suggestions? I am using Mapproxy 1.7.1 on Ubuntu 14.04.1
> >
> > lidar_wms:
> > type: wms
> > wms_opts:
> > version: 1.0.0
> > req:
> > url: http://ortho.gis.iastate.edu/server.cgi
> > layers: lidar_hs
> > # transparent: true
> > supported_srs: ['EPSG:26915']
> > supported_formats: ['JPG']
> > coverage:
> > bbox: [-96.8, 39, -90, 45.1]
> > bbox_srs: 'EPSG:4326'
> >
> >
> > globals:
> > image:
> > formats:
> > JPG:
> > format: image/jpeg
> >
> >
> > Anna
> >
> > On Thu, Jul 23, 2015 at 3:52 AM, Oliver Tonnhofer <tonnhofer at omniscale.de> wrote:
> > Hi,
> >
> > it looks like this is a WMS 1.0.0 service. You can set the version with wms_opts. See:
> > http://mapproxy.org/docs/nightly/sources.html#wms-opts
> >
> > lidar_wms:
> > wms_opts:
> > version: 1.0.0
> > req:
> > url: http://ortho.gis.iastate.edu/server.cgi
> > ...
> >
> > Regards,
> > Oliver
> >
> > --
> > Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
> > OpenStreetMap WMS and tile services | http://maps.omniscale.com
> >
> >
> > > On 23.07.2015, at 05:34, Pestereva, Anna <apestereva at aerialservicesinc.com> wrote:
> > >
> > > Hello all,
> > >
> > > I am trying to use a WMS source that only works when requested in 'JPG' format, not 'image/jpeg'. I am trying following in my configuration:
> > >
> > > lidar_wms:
> > > type: wms
> > > req:
> > > url: http://ortho.gis.iastate.edu/server.cgi?wmtver=1.0
> > > layers: lidar_hs
> > > transparent: true
> > > supported_srs: ['EPSG:26915']
> > > supported_formats: ['JPG']
> > > coverage:
> > > bbox: [-96.8, 39, -90, 45.1]
> > > bbox_srs: 'EPSG:4326'
> > >
> > > globals:
> > > image:
> > > formats:
> > > JPG:
> > > format: image/jpeg
> > >
> > >
> > > However I am still receiving error response from the server - "Unsupported format image/jpg. Try JPG instead." So it looks like even when specifying custom format xxx, Mapproxy sends request as image/xxx. But this source will only accept exact 'JPG' requests.
> > >
> > > What can I do to make it work?
> > >
> > > Example of successful request:
> > > http://ortho.gis.iastate.edu/server.cgi?wmtver=1.0&SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=lidar_hs&FORMAT=JPG&HEIGHT=256&WIDTH=256&SRS=EPSG%3A26915&BBOX=524288,4587520,655360,4718592
> > >
> > > Thank you!
> > >
> > > --
> > > Anna Pestereva | Application Developer & Cartographer
>
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy
More information about the MapProxy
mailing list