line-interpolate-points
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "line-interpolate-points", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Exposes a function to interpolate any number of points along a multi-segment line (LineString).", | ||
@@ -19,3 +19,5 @@ "main": "index.js", | ||
], | ||
"author": "mapzen", | ||
"author": { | ||
"name": "mapzen" | ||
}, | ||
"license": "MIT", | ||
@@ -29,3 +31,9 @@ "bugs": { | ||
"tap-spec": "^0.2.0" | ||
} | ||
}, | ||
"readme": "[![NPM](https://nodei.co/npm/line-interpolate-points.png?downloads=true&stars=true)](https://nodei.co/npm/line-interpolate-points/)\n\n# line interpolate points\nA Node module that interpolates the coordinates of any number of equidistant points along a line composed of one *or\nmore* line segments, at an optional offset. It's particularly useful for GIS applications, and is analogous to the\nPostGIS `ST_LineInterpolatePoint()` and Python Shapely's `shapely.geometry.LineString.interpolate()`. Here's an example\nof points interpolated over different multi-segment lines (the second group has been offset):\n\n![A range of points interpolated along a multi-segment line.](https://raw.githubusercontent.com/pelias/line-interpolate-points/master/line_points_interpolation.png)\n\n## the api\nThe module exports a single function, `interpolateLineRange( ctrlPoints, number, offsetDist )`.\n - `ctrlPoints` is an array of 2D point arrays, like `[ [ 5, 10 ], [ 7, 10 ], [ 14, 13 ] ]`\n - `number` is the number of points to interpolate (the endpoints included)\n - `offsetDist` is an optional distance to move each interpolated point from its container line segment.\n\n```javascript\n> var interpolateLineRange = require( 'line-interpolate-points' )\n> interpolateLineRange( [ [ 3, 10 ], [ 4, 10 ] ], 2 )\n[ [ 3, 10 ], [ 4, 10 ] ]\n> interpolateLineRange( [ [ 3, 10 ], [ 4, 10 ] ], 4 )\n[ [ 3, 10 ],\n [ 3.3333333333333335, 10 ],\n [ 3.666666666666667, 10 ],\n [ 4, 10 ] ]\n> interpolateLineRange( [ [ 4, 4 ], [ 4, 10 ], [ 7, 17 ] ], 6, 1 )\n[ [ 3, 4 ],\n [ 3, 6.723154621172782 ],\n [ 3, 9.446309242345563 ],\n [ 3.9354486533919397, 12.387971226535829 ],\n [ 5.008151811686941, 14.890945262557498 ],\n [ 6.080854969981942, 17.393919298579167 ] ]\n```\n\n## Install Dev Dependencies\n\n```bash\n$ npm install\n```\n\n## Contributing\n\nPlease fork and pull request against upstream master on a feature branch. Please provide unit tests and script fixtures\nin the `test` directory.\n\n### Running Unit Tests\n\n```bash\n$ npm test\n```\n\n### Continuous Integration\n\nTravis tests every release against node version `0.10`\n\n[![Build Status](https://travis-ci.org/pelias/line-interpolate-points.svg)](https://travis-ci.org/pelias/line-interpolate-points)\n", | ||
"readmeFilename": "README.md", | ||
"gitHead": "a69340c4eb905e663deb98db0aa188317e04aaef", | ||
"_id": "line-interpolate-points@1.0.1", | ||
"_shasum": "5c5c3005f936a7bb5ba790ca06f0d9bed9e51bf1", | ||
"_from": "line-interpolate-points@" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40362
11