[MapProxy] WMS-C as a source
Jeff Konnen
jaykayone at gmail.com
Tue Mar 6 16:14:16 EST 2012
Hi again,
my server now starts, but I'm still not sure if I can achieve what I want to.
My source is a WMS-C with 256x256 tiles in a certain SRS.
What I want is a WMS Service serving those tiles in another SRS.
I did what I think was correct to configure this (see conf below)
But when I use the WMS I get two kinds of errors that make me think that MP can't work the way I'd need it to:
[1] : Height and width
My request: curl "http://xx.xx.xx:8080/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=Ortho&STYLES=&FORMAT=image/jpeg&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:2169&BBOX=73997.2609715518,110462.75737772,77590.9665471056,112690.471846402&WIDTH=563&HEIGHT=349"
Error: Could not get retrieve any sources:
tile size of cache and tile source do not match: (256, 256) != (563, 349)
I thought that MP would request a series of tiles into its cache and send back a dissolved image?
[2]: SRS
My request: curl "http://xx.xx.xx:8080/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=Ortho&STYLES=&FORMAT=image/jpeg&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:2169&BBOX=80000,80000,81000,81000&WIDTH=256&HEIGHT=256"
Error: Could not get retrieve any sources:
SRS of cache and tile source do not match: SRS('EPSG:310024802') != SRS('EPSG:2169')
This is exactly why I need MapCache, because the tiles are in the wrong SRS ;-)
As you see, I'm still unsure if MapCache can handle my problem, so I'd be glad to know what you think..
Best regards and TIA
Jeff
-----------------------------------------------------------------
services:
demo:
kml:
tms:
# needs no arguments
wms:
srs: ['EPSG:2169','EPSG:310024802']
image_formats: ['image/jpeg']
md:
# metadata used in capabilities documents
title: MapProxy WMS Proxy
abstract: This is the fantastic MapProxy.
online_resource: http://mapproxy.org/
contact:
person: Your Name Here
position: Technical Director
organization:
address: Fakestreet 123
city: Somewhere
postcode: 12345
country: Germany
phone: +49(0)000-000000-0
fax: +49(0)000-000000-0
email: info at omniscale.de
access_constraints:
This service is intended for private and evaluation use only.
The data is licensed as Creative Commons Attribution-Share Alike 2.0
(http://creativecommons.org/licenses/by-sa/2.0/)
fees: 'None'
layers:
- name: Ortho
title: Ortho
sources: [ign_ortho_tile]
grids:
mygrid:
srs: EPSG:310024802
bbox: [-1048576,3670016,2097152,6815744]
bbox_srs: EPSG:310024802
origin: nw
res: [2048,1024,512,256,128,64,32,16,8,4,2,1,0.5,0.25,0.125,0.0625]
tile_size: [256,256]
caches:
simple:
sources: [ign_ortho_tile]
grids: [mygrid]
#disable_storage: true
format: image/jpeg
cache:
type: mbtiles
filename: /tmp/ign_ortho.mbtiles
sources:
ign_ortho_tile:
type: tile
url: http://xx.xx.xx/wmsc?service=WMS&request=GetMap&version=1.1.1&layers=ORTHOIMAGERY.ORTHOPHOTOS&styles=&srs=EPSG:310024802&format=image/jpeg&width=256&height=256&bbox=%(bbox)s
grid: mygrid
globals:
# # coordinate transformation options
srs:
# # WMS 1.3.0 requires all coordiates in the correct axis order,
# # i.e. lon/lat or lat/lon. Use the following settings to
# # explicitly set a CRS to either North/East or East/North
# # ordering.
# axis_order_ne: ['EPSG:9999', 'EPSG:9998']
# axis_order_en: ['EPSG:0000', 'EPSG:0001']
# # you can set the proj4 data dir here, if you need custom
# # epsg definitions. the path must contain a file named 'epsg'
# # the format of the file is:
# # <4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs <>
proj_data_dir: '/usr/share/proj/'
# image/transformation options
image:
resampling_method: nearest
# resampling_method: bilinear
# resampling_method: bicubic
# jpeg_quality: 90
# # stretch cached images by this factor before
# # using the next level
# stretch_factor: 1.15
# # shrink cached images up to this factor before
# # returning an empty image (for the first level)
# max_shrink_factor: 4.0
More information about the MapProxy
mailing list