{"_id":"grid-to-matrix","_rev":"7-b4f358b25524c067431af4042848b5bf","name":"grid-to-matrix","description":"Takes a GeoJSON pointGrid and returns a correspondent matrix array of 'property' values of the points","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"grid-to-matrix","version":"1.0.0","description":"Takes a GeoJSON pointGrid and returns a correspondent matrix array of 'property' values of the points","main":"index.js","types":"index.d.ts","files":["index.js","index.d.ts"],"scripts":{"prepublish":"npm run test && npm run build","pretest":"npm run lint","test":"node test.js","bench":"node bench.js","lint":"eslint index.js","build":"npm run rollup && npm run uglify","rollup":"rollup -c rollup.config.js","uglify":"uglifyjs dist/grid-to-matrix.js -c -m > dist/grid-to-matrix.min.js"},"repository":{"type":"git","url":"git+https://github.com/stebogit/grid-to-matrix.git"},"keywords":["geojson","grid","points","array","matrix"],"author":{"name":"Stefano Borghi","email":"stefano.borghi@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/stebogit/grid-to-matrix/issues"},"devDependencies":{"@turf/truncate":"^4.1.0","benchmark":"^2.1.3","eslint":"^2.0.0","eslint-config-mourner":"^2.0.0","load-json-file":"^2.0.0","rollup":"^0.41.5","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-json":"^2.1.0","rollup-plugin-node-builtins":"^2.1.0","rollup-plugin-node-globals":"^1.1.0","rollup-plugin-node-resolve":"^2.0.0","tape":"^3.5.0","typescript":"^2.2.1","uglifyjs":"^2.4.10","write-json-file":"^2.0.0"},"dependencies":{"@turf/meta":"^4.1.0","@turf/invariant":"^4.1.0","@turf/helpers":"^4.1.0"},"gitHead":"f999136c98ca1cb9be8be89d37c6227ef6c9e14d","homepage":"https://github.com/stebogit/grid-to-matrix#readme","_id":"grid-to-matrix@1.0.0","_shasum":"04a806b6bf70ffa09710f3e0f5b85b10999e68cf","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"stebogit","email":"stefano.borghi@gmail.com"},"dist":{"shasum":"04a806b6bf70ffa09710f3e0f5b85b10999e68cf","tarball":"https://registry.npmjs.org/grid-to-matrix/-/grid-to-matrix-1.0.0.tgz","integrity":"sha512-Ir7BpF9scUezIiqy39GaAjKQPlfLZbTKnbwwl/cMRj7vkzq9Snp4Y09DLyh9o+JpdySlRuoJ8t+NQhHXTdZu+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZR1DiXKtOFE9Pv7/+YXhHQ83rKXRjhr5FXhTnyMjxwAiAWXODBTuNfSLQEkbTHY+ZTRKTRIpp82fmrqzFcGJBe2A=="}]},"maintainers":[{"name":"stebogit","email":"stefano.borghi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/grid-to-matrix-1.0.0.tgz_1492240610320_0.38020200352184474"}},"1.1.0":{"name":"grid-to-matrix","version":"1.1.0","description":"Takes a GeoJSON pointGrid and returns a correspondent matrix array of 'property' values of the points","main":"index.js","types":"index.d.ts","files":["index.js","index.d.ts","dist"],"scripts":{"prepublish":"npm run test && npm run build","pretest":"npm run lint","test":"node test.js","bench":"node bench.js","lint":"eslint index.js","build":"npm run rollup && npm run uglify","rollup":"rollup -c rollup.config.js","uglify":"uglifyjs dist/grid-to-matrix.js -c -m > dist/grid-to-matrix.min.js"},"repository":{"type":"git","url":"git+https://github.com/stebogit/grid-to-matrix.git"},"keywords":["geojson","grid","points","array","matrix"],"author":{"name":"Stefano Borghi","email":"stefano.borghi@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/stebogit/grid-to-matrix/issues"},"devDependencies":{"@turf/truncate":"^4.1.0","benchmark":"^2.1.3","eslint":"^2.0.0","eslint-config-mourner":"^2.0.0","load-json-file":"^2.0.0","rollup":"^0.41.5","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-json":"^2.1.0","rollup-plugin-node-builtins":"^2.1.0","rollup-plugin-node-globals":"^1.1.0","rollup-plugin-node-resolve":"^2.0.0","tape":"^3.5.0","typescript":"^2.2.1","uglifyjs":"^2.4.10","write-json-file":"^2.0.0"},"dependencies":{"@turf/meta":"^4.1.0","@turf/invariant":"^4.1.0","@turf/helpers":"^4.1.0"},"gitHead":"bf5c1f82141e8567e0eab243ff23732ba3a5b44c","homepage":"https://github.com/stebogit/grid-to-matrix#readme","_id":"grid-to-matrix@1.1.0","_shasum":"8876d9a4be2608a271be1108a09b94f7448774b1","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"stebogit","email":"stefano.borghi@gmail.com"},"dist":{"shasum":"8876d9a4be2608a271be1108a09b94f7448774b1","tarball":"https://registry.npmjs.org/grid-to-matrix/-/grid-to-matrix-1.1.0.tgz","integrity":"sha512-xgOVsdfbBgRV4qknV+nJ9hmkRC1LVbHAULgDDsbw5hJMioquvz5c4c0d12mGyQWlfCAI6SN210DwxBn7HVtCbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9qcuIMSwQIXSeC0AA1pQxZ7ZyvmJzWA4RWt9E5k5mzAIhAOSCjFeLI9Munt4QfiR+rt0VqYOiqvFCDDkX+c6VcucO"}]},"maintainers":[{"name":"stebogit","email":"stefano.borghi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/grid-to-matrix-1.1.0.tgz_1492412680662_0.6402546430472285"}},"1.2.0":{"name":"grid-to-matrix","version":"1.2.0","description":"Takes a GeoJSON pointGrid and returns a correspondent matrix array of 'property' values of the points","main":"index.js","types":"index.d.ts","files":["index.js","index.d.ts","dist"],"scripts":{"prepublish":"npm run test && npm run build","pretest":"npm run lint","test":"node test.js","bench":"node bench.js","lint":"eslint index.js","build":"npm run rollup && npm run uglify","rollup":"rollup -c rollup.config.js","uglify":"uglifyjs dist/grid-to-matrix.js -c -m > dist/grid-to-matrix.min.js"},"repository":{"type":"git","url":"git+https://github.com/stebogit/grid-to-matrix.git"},"keywords":["geojson","grid","points","array","matrix"],"author":{"name":"Stefano Borghi","email":"stefano.borghi@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/stebogit/grid-to-matrix/issues"},"devDependencies":{"@turf/truncate":"^4.1.0","benchmark":"^2.1.3","eslint":"^2.0.0","eslint-config-mourner":"^2.0.0","load-json-file":"^2.0.0","rollup":"^0.41.5","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-json":"^2.1.0","rollup-plugin-node-builtins":"^2.1.0","rollup-plugin-node-globals":"^1.1.0","rollup-plugin-node-resolve":"^2.0.0","tape":"^3.5.0","typescript":"^2.2.1","uglifyjs":"^2.4.10","write-json-file":"^2.0.0"},"dependencies":{"@turf/meta":"^4.1.0","@turf/invariant":"^4.1.0","@turf/helpers":"^4.1.0"},"gitHead":"a7008ac873805651f3d9bf17309e65d0983f256a","homepage":"https://github.com/stebogit/grid-to-matrix#readme","_id":"grid-to-matrix@1.2.0","_shasum":"b016df4d76f996e6b74663eab9ceb913546657e9","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"stebogit","email":"stefano.borghi@gmail.com"},"dist":{"shasum":"b016df4d76f996e6b74663eab9ceb913546657e9","tarball":"https://registry.npmjs.org/grid-to-matrix/-/grid-to-matrix-1.2.0.tgz","integrity":"sha512-kk7Z61HfvexDS8KxVnxU7XFiwgvRRoSKLYosUhe9Nl8eGkPgMHke7daavhNqonNgQsxpCRx9klbnlNSmGE3MPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgPfYH3Ti2MCkPXzjonbSDq9dhbXte1VFugSbud1XyeAiAUxmj4DcEgMd16TvZ1IPQYYJeLM8Xle51rrIHsv0w7lA=="}]},"maintainers":[{"name":"stebogit","email":"stefano.borghi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/grid-to-matrix-1.2.0.tgz_1494209601245_0.9746004631742835"}},"1.3.0":{"name":"grid-to-matrix","version":"1.3.0","description":"Takes a GeoJSON pointGrid and returns a correspondent matrix array of 'property' values of the points","main":"index.js","types":"index.d.ts","files":["index.js","index.d.ts","dist"],"scripts":{"prepublish":"npm run test && npm run build","pretest":"npm run lint","test":"node test.js","bench":"node bench.js","lint":"eslint index.js","build":"npm run rollup && npm run uglify","rollup":"rollup -c rollup.config.js","uglify":"uglifyjs dist/grid-to-matrix.js -c -m > dist/grid-to-matrix.min.js"},"repository":{"type":"git","url":"git+https://github.com/stebogit/grid-to-matrix.git"},"keywords":["geojson","grid","points","array","matrix"],"author":{"name":"Stefano Borghi","email":"stefano.borghi@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/stebogit/grid-to-matrix/issues"},"devDependencies":{"benchmark":"^2.1.3","eslint":"^2.0.0","eslint-config-mourner":"2.0.3","load-json-file":"^2.0.0","rollup":"^0.41.5","rollup-plugin-commonjs":"8.2.1","rollup-plugin-json":"2.3.0","rollup-plugin-node-builtins":"2.1.2","rollup-plugin-node-globals":"^1.1.0","rollup-plugin-node-resolve":"^2.0.0","tape":"^3.5.0","typescript":"2.5.2","uglify-js":"3.1.1","write-json-file":"2.2.0"},"dependencies":{"@turf/helpers":"4.7.3","@turf/invariant":"4.7.3","@turf/meta":"4.7.3"},"gitHead":"8f419f37c1dafc46308454c65e74eae3c4d8b856","homepage":"https://github.com/stebogit/grid-to-matrix#readme","_id":"grid-to-matrix@1.3.0","_npmVersion":"5.3.0","_nodeVersion":"7.8.0","_npmUser":{"name":"stebogit","email":"stefano.borghi@gmail.com"},"dist":{"integrity":"sha512-Ezjz52gVyf++/76E5NdtxJp4WjsqbjjlNtCTDqsUKWce/aq8bpZx9LcFSdzNPsKPlLoQiqAS1e1gVy2Hqhgo4Q==","shasum":"d740f6e0af03aada8e3e7318d8a89f564534a591","tarball":"https://registry.npmjs.org/grid-to-matrix/-/grid-to-matrix-1.3.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIdGtNt3arihUosQ4peBvtHob6S+hJShO7ht5fVAdZtgIhAPj3TISYH3xF8PE5EZMIyKzM9rHvfJ1geq3iXh3kn6M4"}]},"maintainers":[{"name":"stebogit","email":"stefano.borghi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/grid-to-matrix-1.3.0.tgz_1505894970376_0.5295162207912654"}},"1.4.0":{"name":"grid-to-matrix","version":"1.4.0","description":"Takes a GeoJSON pointGrid and returns a correspondent matrix array of 'property' values of the points","main":"grid-to-matrix.js","module":"index","jsnext:main":"index","types":"index.d.ts","files":["index.js","index.d.ts","grid-to-matrix.js","grid-to-matrix.min.js"],"scripts":{"pretest":"rollup -c rollup.config.js","test":"node test.js","bench":"node bench.js","lint":"eslint index.js"},"repository":{"type":"git","url":"git+https://github.com/stebogit/grid-to-matrix.git"},"keywords":["geojson","grid","points","array","matrix"],"author":{"name":"Stefano Borghi","email":"stefano.borghi@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/stebogit/grid-to-matrix/issues"},"devDependencies":{"@turf/point-grid":"*","@types/geojson":"*","benchmark":"*","eslint":"*","eslint-config-mourner":"*","load-json-file":"*","rollup":"*","rollup-plugin-node-resolve":"*","rollup-plugin-uglify":"*","tape":"*","typescript":"*","write-json-file":"*"},"dependencies":{"@turf/helpers":"5.x","@turf/invariant":"5.x","@turf/meta":"5.x"},"gitHead":"9174398cd7c239a72d7e716a0c0977fc3ce1f449","homepage":"https://github.com/stebogit/grid-to-matrix#readme","_id":"grid-to-matrix@1.4.0","_npmVersion":"5.4.2","_nodeVersion":"7.8.0","_npmUser":{"name":"stebogit","email":"stefano.borghi@gmail.com"},"dist":{"integrity":"sha512-EJwb1ZM7Sgt1II/C1pP4PSVyhCs2zsSNNlvJ5Dadc9n8zMBb/OmQY68zNIByWhGe97dE5/CL3/hKLrgj/lYIiA==","shasum":"0315867cf830dcf1bb875fab0710bab228141c78","tarball":"https://registry.npmjs.org/grid-to-matrix/-/grid-to-matrix-1.4.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHfsWI8Hp6zhBD21Wo/BYaJ97HCZnLrjG1Aw9Re+Iu0mAiEA0MPBC/aEPe/l8Nud/0d92lESzcU5PXcx7Ngx8SHFSPM="}]},"maintainers":[{"name":"stebogit","email":"stefano.borghi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/grid-to-matrix-1.4.0.tgz_1507357837517_0.8599514451343566"}}},"readme":"# grid-to-matrix\n\n[![Build Status](https://travis-ci.org/stebogit/grid-to-matrix.svg?branch=master)](https://travis-ci.org/stebogit/grid-to-matrix)\n[![npm version](https://badge.fury.io/js/grid-to-matrix.svg)](https://badge.fury.io/js/grid-to-matrix)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/stebogit/grid-to-matrix/blob/master/LICENSE)\n\nTakes a [Point](http://geojson.org/geojson-spec.html#point) grid and returns a correspondent matrix of the `property` values\n\n**Parameters**\n\n- `grid` \\[**[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)&lt;[Point](http://geojson.org/geojson-spec.html#point)>**] grid of points\n- `options.zProperty` \\[**[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**] the property name in `grid` from which the matrix values will be pulled (optional, default `elevation`)\n- `options.flip` \\[**[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**] returns the matrix upside-down (optional, default `false`)\n- `options.flags` \\[**[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**] , adding a `matrixPosition` array field ([`row`, `column`]) to its properties, the grid points with coordinates on the matrix (optional, default `false`)\n\n**Returns**\n\nMatrix \\[**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<Array<<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>>**] of the `grid` points `property` values\n\n### Installation\n\n**npm**\n\n```sh\n$ npm install grid-to-matrix\n```\n\n**browser (ES5)**\n\n```html\n<script src=\"https://unpkg.com/grid-to-matrix/grid-to-matrix.min.js\"></script>\n```\n\n### Quickstart\n\n```javascript\n  var pointGrid = require('@turf/point-grid');\n  var gridToMatrix = require('grid-to-matrix');\n\n  var extent = [-70.823364, -33.553984, -70.473175, -33.302986];\n  var cellSize = 3;\n  var grid = pointGrid(extent, cellSize);\n  // add a random elevation property to each point between 0 and 60\n  for (var i = 0; i < grid.features.length; i++) {\n    grid.features[i].properties.elevation = (Math.random() * 60);\n  }\n\n  gridToMatrix(grid);\n  // =[\n  //    [ 1, 13, 20,  9, 10, 13, 18],\n  //    [34,  8,  0,  4,  5,  8, 13],\n  //    [10,  5,  2,  1,  2,  5, 24],\n  //    [ 0,  4, 56, 19,  0,  4,  9],\n  //    [10,  5,  2, 12,  2,  5, 10],\n  //    [57,  8,  5,  4,  5,  0, 57],\n  //    [ 3, 13,  0,  9,  5, 13, 35],\n  //    [18, 13, 10,  9, 78, 13, 18]\n  //  ]\n```\n","maintainers":[{"name":"stebogit","email":"stefano.borghi@gmail.com"}],"time":{"modified":"2022-06-18T14:10:54.395Z","created":"2017-04-15T07:16:52.608Z","1.0.0":"2017-04-15T07:16:52.608Z","1.1.0":"2017-04-17T07:04:42.685Z","1.2.0":"2017-05-08T02:13:21.475Z","1.3.0":"2017-09-20T08:09:30.502Z","1.4.0":"2017-10-07T06:30:37.587Z"},"homepage":"https://github.com/stebogit/grid-to-matrix#readme","keywords":["geojson","grid","points","array","matrix"],"repository":{"type":"git","url":"git+https://github.com/stebogit/grid-to-matrix.git"},"author":{"name":"Stefano Borghi","email":"stefano.borghi@gmail.com"},"bugs":{"url":"https://github.com/stebogit/grid-to-matrix/issues"},"license":"MIT","readmeFilename":"README.md"}