node-mapnik
node-mapnik copied to clipboard
More friendly test warnings if plugins are not available
If the gdal.input or ogr.input are not available then various tests fail: https://gist.github.com/springmeyer/4cbaaf6218d0b76d8da1d705cf7115ff.
We should modify the tests to print a BIG CLEAR warning that gdal.input is missing rather than let these tests fail.
This will happen when building node-mapnik against the default homebrew mapnik package brew install mapnik
because by default homebrew does not build mapnik against GDAL. That would require brew install mapnik --with-gdal
.
How can I check the list of available plugins (and recognized? There is no API.
How can I check the list of available plugins (and recognized)?
var mapnik = require('mapnik');
mapnik.register_default_input_plugins();
console.log(mapnik.datasources());
Output on my system:
[ 'csv',
'gdal',
'geojson',
'ogr',
'pgraster',
'postgis',
'raster',
'shape',
'sqlite',
'topojson' ]
@Arsakes I'll work on getting the plugins documented on mapnik.org later today. Apologies!
Semi-related: mapnik docs have been updated to include a section about plugins right at the top. The available methods have been added to the main mapnik constructor http://mapnik.org/documentation/node-mapnik/3.5/#mapnik.registerDatasource