Non square pixel size issue with mapnik 2.0 #921

krysst opened this Issue Oct 19, 2011 · 0 comments


None yet

1 participant

krysst commented Oct 19, 2011


Posted first on Mapnik-devel.


First, the normal rendering under mapnik 0.7.1 :

Then, the abnormal rendering under mapnik 2 :

The "explanation" :

What you see on these pictures :

  • soil ocupation (the green) is vector data from OpenStreetMap : all correct
  • relief shadowing comes from Geotiffs : correct at the top of the picture, more and more fucked up as you go down... till there is nothing left to rasterize (the no shadow band), and then starts again with a correct line and so on.


The raster dataset producing the relief shadowing is composed of four 2Gbytes GeoTiff, combined under a gdal VRT.

I use a french specific projection (Lambert 93 - EPSG:2154) :
srs="+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"

My vector & raster datas already are in EPSG:2154, so is there no re-projection at all during the rendering process.

I compiled mapnik 2 binaries with these libraries (debian SID) :

  • proj4,
  • gdal 1.7.3-6 (then 1.8.1),
  • geos 3.2.2-3.
  • libboost 1.46.1-7
  • python 2.6


  • mapnik 2 binaries : from the debian SID repository and compiled by myself (from 2.0.0 release src)
  • compile mapnik 2 with GDAL 1.7.3-6 then GDAL 1.8.1
  • mapnik driver : raster and gdal
  • format : tiff + tfw, geotiff, png, gdal vrt...
  • tiled and not tiled geotiff
  • band and pixel interleave
  • generate the rasters with OL+tilecache and with nik2img
  • bicubic, lanczos scaling method
  • cut the Geotiffs in smaller files (5000x5000 in place of 25000x25000)


Changing the pixel size of my raster dataset to a square one : original dataset had a pixel size of 21.000208352291551m x 23.158451421093591m, if I resample it to 21m x 21m, it seems to work perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment