Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/boolean-point-in-polygon

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/boolean-point-in-polygon

turf boolean-point-in-polygon module

  • 7.1.0-alpha.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
590K
decreased by-49.29%
Maintainers
0
Weekly downloads
 
Created

What is @turf/boolean-point-in-polygon?

@turf/boolean-point-in-polygon is a module from the Turf.js library that allows you to determine if a given point is inside a polygon. This is useful for geospatial analysis, such as determining if a location falls within a specific area or boundary.

What are @turf/boolean-point-in-polygon's main functionalities?

Check if a point is inside a polygon

This feature allows you to check if a given point is inside a specified polygon. The code sample demonstrates creating a point and a polygon, and then using the booleanPointInPolygon function to determine if the point is inside the polygon.

const turf = require('@turf/turf');

const point = turf.point([2, 2]);
const polygon = turf.polygon([[
  [0, 0],
  [0, 5],
  [5, 5],
  [5, 0],
  [0, 0]
]]);

const isInside = turf.booleanPointInPolygon(point, polygon);
console.log(isInside); // true

Other packages similar to @turf/boolean-point-in-polygon

Keywords

FAQs

Package last updated on 25 Jun 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc