Socket
Socket
Sign inDemoInstall

turf-inside

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    turf-inside

turf inside module


Version published
Weekly downloads
13K
decreased by-6.46%
Maintainers
1
Install size
5.26 kB
Created
Weekly downloads
 

Readme

Source

turf-inside

Build Status

Checks to see if a point is inside of a polygon. The polygon can be convex or concave.

###Install

npm install turf-inside

###Parameters

namedescription
pointA FeatureCollection of Point Features
polygonDetermines if the point is inside the polygon or not

###Usage

inside(pt, poly)

###Example

var inside = require('turf-inside')
var point = require('turf-point')
var polygon = require('turf-polygon')

var poly = polygon([[[0,0], [50, 50], [0,100], [100,100], [100,0]]])
var pt = point(75, 75)

var isInside = inside(pt, poly)

console.log(isInside) // true

Keywords

FAQs

Last updated on 15 Jul 2014

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc