Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a WMS service, is there a ready-made script that, for a given extent, creates a tile-pyramid that is compliant with:

That is urls on the form:


EDIT: I think what I want is MapProxy. I can configure a TMS layer that caches my WMS service, and copy the files that it generates.

share|improve this question
You might want to upvote emacgillavry. Or accept it if it solves your problem. – R.K. Feb 25 '12 at 15:36

MapProxy is certainly a good option. If it is just a script you require, TileCache is another option. It's not as configurable as MapProxy, but it is a nice, light-weight solution. If you are already serving your WMS using GeoServer, then I'd recommend GeoWebCache.

share|improve this answer

with openlayers you can get your wms xyz result as below code. i think with some changes this code will work for you.


function getURL (bounds) {
   var res =;
   var x = Math.round ((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
   var y = Math.round (( - / (res * this.tileSize.h));
   var z =;

   var path = z + "/" + x + "/" + y + "." + this.type;
   var url = this.url;
    if (url instanceof Array) {
       url = this.selectUrl(path, url);
   return url + path;
share|improve this answer
I was looking for a script that generates the tiles. Not quite sure what the idea with the javascript you posted is? – Pimin Konstantin Kefaloukos Feb 24 '12 at 23:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.