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

I'm new to GIS so this may be trivial: I'm using MapFish Print to create some PNG. I have issues to place the viewport. When I use a random GPS coordinate: -20.904522,55.475106 which seem to point roughly (<20m accuracy) to the same place in google and in, my viewport in MapFish Print is way up north (more than 100km).

What did I miss ?

Here's my config (I've commented some lines that I did try):

  layout: 'A5 landscape',
  title: '',
  units: 'dd',
  #srs: 'EPSG:900913',
  srs: 'EPSG:4326',
  #srs: 'EPSG:3857',
  #geodetic: true,
  #geodetic: false,
  outputFilename: 'mapfish-print',
  outputFormat: 'pdf',
  layers: [
        type: 'OSM',
        format: 'image/png',
        baseURL: '',
        ## This one seems incorrect and sets the 0,0 several
        ## thousand kilometer in the north
        #maxExtent: [-180,-90, 180, 90],
        maxExtent: [-180,-180, 180, 180],
        #srs: 'EPSG:900913',
        #geodetic: false,
        tileSize: [256, 256],
        resolutions : [
          1.40625, 0.703125, 0.3515625, 0.17578125, 0.087890625, 
          0.0439453125, 0.02197265625, 0.010986328125, 0.0054931640625, 
          0.00274658203125, 0.001373291015625, 0.0006866455078125, 
          0.00034332275390625, 0.000171661376953125, 0.0000858306884765625, 
        extension: 'png',
  pages: [
        center: [55.475106, -20.904522],
        #center: [0, 0],
        #srs: 'EPSG:4326',
        srs: 'EPSG:900913',
        #srs: 'EPSG:3857',
        geodetic: false,
        #geodetic: true,
        scale: 500000,
        dpi: 190,
        mapTitle: "",
        comment: "",
share|improve this question
I'm not familiar with MapFish, so this could be irrelevant, but what's the deal with maxExtent: [-180,-180, 180, 180]? I would assume this means your north and south bounds are much further away than they should be, which could be skewing distances – tomfumb Aug 17 '12 at 17:36
@tomfumb: if I set maxExtent: [-180, -90, 180, 90], the localisation error spans on several thousand kilometer to the north (several order of magnitude worse than the current error). I have no idea why. – vaab Aug 20 '12 at 6:29

Your Answer


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

Browse other questions tagged or ask your own question.