Socket
Socket
Sign inDemoInstall

turf

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf - npm Package Compare versions

Comparing version 0.0.91 to 0.0.92

lib/concave.js

2

CONTRIBUTING.md

@@ -8,3 +8,3 @@ ## Want to Contribute?

- The focus of the project is on building a core geospatial engine. Vendor specific stuff belongs in a seperate module.
- Geojson is the primary format. Topojson can be used as intermediate format.
- Geojson is the primary format. Topojson can be used as an intermediate format.
- No pull requests will be accepted that provide only style changes.

@@ -11,0 +11,0 @@ - Never add an external dependency unless you absolutely have to. Even then, please ask first, because there may be a work around.

module.exports = {
within: require('./lib/within'),
concave: require('./lib/concave'),
count: require('./lib/count'),

@@ -3,0 +5,0 @@ erase: require('./lib/erase'),

@@ -71,2 +71,3 @@ //https://github.com/jasondavies/conrec.js

var contourList = c.contourList()
fs.writeFileSync(__dirname+'/../test/testOut/contourList.json', JSON.stringify(contourList))

@@ -73,0 +74,0 @@

{
"name": "turf",
"version": "0.0.91",
"version": "0.0.92",
"description": "a node.js library for performing geospatial operations with geojson",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -43,2 +43,3 @@ turf

- [inside](#inside)
- [within](#within)
- [tag](#tag)

@@ -417,2 +418,23 @@

###within
Returns a feature collection of points representing all points that fall withing a collection of polygons.
```javascript
var t = require('turf')
var poly = t.polygon([[[10,0],[20,10],[20,20], [20,0]]])
var polyFC = t.featurecollection([poly])
var pt1 = t.point(1,1, {population: 500})
var pt2 = t.point(1,3, {population: 400})
var pt3 = t.point(14,2, {population: 600})
var pt4 = t.point(13,1, {population: 500})
var pt5 = t.point(19,7, {population: 200})
var ptFC = t.featurecollection([pt1, pt2, pt3, pt4, pt5])
t.within(ptFC, polyFC, function(err, ptsWithin){
console.log(ptsWithin) // feature collection with 3 pts
})
```
###buffer

@@ -419,0 +441,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc