terrain-rgb-slope
v0.0.3
Published
Converts 32 bit RGB-encoded height map PNGs to 16 bit PNGs depicting slope
Downloads
22
Readme
terrain-rgb-slope
Converts Mapbox's Terrain-RGB PNG tiles to 16 bit greyscale PNGs depicting integer slope percentage. See here for an online demo.
Installation
npm install terrain-rgb-slope
Examples
var converter = require('terrain-rgb-slope');
var options = {
inputFilePath: '/path/to/my/terrain-rgb-tile.png',
outputFilePath: '/path/to/output/16bit-slope.png'
};
converter.convertToSlope(options, function() {
console.log("Finished.");
});