Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
matrix-to-grid
Advanced tools
Takes a matrix array of numbers and returns a grid of GeoJSON points with correspondent property value
Takes a matrix of the values and returns a Point grid mapping the values of the matrix as property
Parameters
origin
[Array<number> | Feature<Point>] position of the first bottom-left (South-West) point of the grid
cellSize
[number] the distance across each cell
options
[Object] optional parameters:
Returns
Returns a [FeatureCollection<Point>] grid of points having each the correspondend pproperty
value of the matrix
npm
$ npm install matrix-to-grid
browser (ES5)
<script src="https://unpkg.com/matrix-to-grid/matrix-to-grid.min.js"></script>
var matrixToGrid = require('matrix-to-grid');
var matrix = [
[ 1, 13, 20, 9, 10, 13, 18],
[34, 8, 0, 4, 5, 8, 13],
[10, 5, 2, 1, 2, 5, 24],
[ 0, 4, 56, 19, 0, 4, 9],
[10, 5, 2, 12, 2, 5, 10],
[57, 8, 5, 4, 5, 0, 57],
[ 3, 13, 0, 9, 5, 13, 35],
[18, 13, 10, 9, 78, 13, 18]
];
var origin = [-70.823364, -33.553984];
matrixToGrid(matrix, origin, 10);
// = pointGrid
FAQs
Takes a matrix array of numbers and returns a grid of GeoJSON points with correspondent property value
The npm package matrix-to-grid receives a total of 30 weekly downloads. As such, matrix-to-grid popularity was classified as not popular.
We found that matrix-to-grid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.