JSPM

raster-marching-squares

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 272
  • Score
    100M100P100Q102887F
  • License AGPL-3.0

Create isobands and isolines directly from a Raster with the marching-squares algorithm

Package Exports

  • raster-marching-squares

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (raster-marching-squares) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status

Marching squares isobands and isolines ready for using along with d3 maps.

The marching squares algorithm code is taken from the MarchingSquares.js project by Ronny Lorenz, adapted to work with nodejs.

INSTALL

Using nodejs:

npm install raster-marching-squares

From the browser:

Download https://github.com/rveciana/raster-marching-squares/blob/master/build/d3-marching-squares.min.js

USAGE

var intervals = [0, 5, 10, 15, 20, 25, 30, 35, 40];
var bands = rastertools.isobands(rasterData, geoTransform, intervals);
var lines = rastertools.isolines(rasterData, geoTransform, intervals);
  • rasterData is a 2D array with the values
  • geoTransform is an array following the conventions of the GDAL data model

EXAMPLES