[MapProxy] mapproxy-seed - Create OSM like tile
Mayeul Kauffmann
mayeul.kauffmann at free.fr
Sat Feb 25 21:01:04 EST 2012
Hello,
I'm trying to do something similar to Debasish Sahu: transforming maps
from my WMS into tiles visible with openlayers from a plain file system,
using mapproxy.
(Context is this: http://wiki.openstreetmap.org/wiki/ViaAlpina )
Currently I'm "seeding" simply by browsing the demo (which I updated for
my WMS URL):
http://localhost:8080/demo/?tms_layer=osm&format=png&srs=EPSG%3A900913
Vertical tile order is incorrect.
Following your suggestions, I tried playing around with y
For instance var y = 2^z - 1 - Math.round ((this.maxExtent.top -
bounds.top) / (res * this.tileSize.h));
but it did not work.
I've tried the dame approach modifying the various examples I found
there,
http://openlayers.org/dev/examples/tms.html
http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example
without any success.
Do you have any simple openlayers page that correctly get the /y/ from a
a tms cache?
My mapproxy.yaml is this:
services:
demo:
kml:
tms:
wms:
# srs: ['EPSG:4326', 'EPSG:900913']
# image_formats: ['image/jpeg', 'image/png']
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: osm
title: My OSM WMS
sources: [osm_cache]
# - name: osm_full_example
# title: Omniscale OSM WMS - osm.omniscale.net
# sources: [osm_cache_full_example]
caches:
osm_cache:
grids: [GLOBAL_MERCATOR] #, global_geodetic_sqrt2]
sources: [osm_wms]
cache:
type: file
directory_layout: tms
sources:
osm_wms:
type: wms
req:
url:
http://localhost/cgi-bin/qgis_mapserv.fcgi?map=/home/mk/sig/projects/via_alpina_climat_qgis19_v1_extrait.qgs&
layers: countries,srtm_italy_x4,cities,towns
# layers: terrain,cities,towns,tracks_VA_MK
grids:
global_geodetic_sqrt2:
base: GLOBAL_GEODETIC
res_factor: 'sqrt2'
globals:
cache:
base_dir: './cache_data'
lock_dir: './cache_data/locks'
# # request x*y tiles in one step
# meta_size: [4, 4]
# # add a buffer on all sides (in pixel) when requesting
# # new images
# meta_buffer: 80
# image/transformation options
image:
resampling_method: nearest
Thanks for your help!
Mayeulk
More information about the MapProxy
mailing list