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
strata.layer('heightmap')
.route('tile.png')
.use(disk.cache({dir: './tilestrataCache/heightmap'}))
.use(mapnik({
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">
<Rule>
<RasterSymbolizer/>
</Rule>
</Style>
<Layer name="heightmap" status="on" srs="+init=epsg:4326">
<StyleName>heightmap</StyleName>
<Datasource>
<Parameter name="file">E:\GIS_DATA\SRTM\srtm_30m\srtmvrt.vrt</Parameter>
<Parameter name="type">gdal</Parameter>
</Datasource>
</Layer>
</Map>
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!).
EDIT:
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.