Skip to content

Converts 32 bit RGB-encoded height map PNGs to 16 bit PNGs depicting slope

License

Notifications You must be signed in to change notification settings

colkassad/terrain-rgb-slope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.");
});

About

Converts 32 bit RGB-encoded height map PNGs to 16 bit PNGs depicting slope

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published