I am experimenting with TileStrata and am new to it. I have a simple tile server set up just to test as follows:

var tilestrata = require('tilestrata');
var disk = require('tilestrata-disk');
var mapnik = require('tilestrata-mapnik');
var strata = tilestrata();

// define layers
        .use(disk.cache({dir: './tilestrataCache/heightmap'}))
            pathname: './bin/heightmap.xml',
            tileSize: 256,
            scale: 1

module.exports = strata;

My mapnik xml is as follows:

<Map srs="+init=epsg:3857">
    <Style name="heightmap">

    <Layer name="heightmap" status="on" srs="+init=epsg:4326">
            <Parameter name="file">E:\GIS_DATA\SRTM\srtm_30m\srtmvrt.vrt</Parameter>
            <Parameter name="type">gdal</Parameter>


This all works and a tile is produced without error, however it is always an empty four band (rgba) file, regardless of where I try in the data set. I have tried 'raw' SRS parameters such as "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over" but I get the same result. I am hoping to get a grayscale single band 16-bit raster out of this, which should be possible with the mapnik imageType setting (though as yet I don't know where/how to set that as I've fallen at the first hurdle!).

Any suggestions as to what I am missing or doing wrong to get a tile displaying properly (grayscale 16 bit or otherwise!).

I have just tried the Mapnik Hello World example (updating the XML to suit Mapnik v3.x and adding a new layer in the relevant node file) through my Tilestrata stack and get the same result.

1 Answer 1


I have a partial solution which answers my primary question. The current version of Mapnik does not support the 'paths-from-xml' parameter. However, relative paths did not seem necessary as TileStrata can detect a correct or broken path to a datasource and will report an error. So, my above example returns no errors as TileStrata finds the path. However, further down the stack that path is not valid. By making my paths relative, I get a basic TileStrata stack working.

Now I just need to coerce Mapnik to output the tiles in the format I want and not its default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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