6.5.0 • Published 17 days ago

@turf/boolean-point-in-polygon v6.5.0

Weekly downloads
218,448
License
MIT
Repository
github
Last release
17 days ago

@turf/boolean-point-in-polygon

booleanPointInPolygon

Takes a Point and a Polygon or MultiPolygon and determines if the point resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.

Parameters

  • point Coord input point
  • polygon Feature<(Polygon | MultiPolygon)> input polygon or multipolygon
  • options Object Optional parameters (optional, default {})
    • options.ignoreBoundary boolean True if polygon boundary should be ignored when determining if the point is inside the polygon otherwise false. (optional, default false)

Examples

var pt = turf.point([-77, 44]);
var poly = turf.polygon([[
  [-81, 41],
  [-81, 47],
  [-72, 47],
  [-72, 41],
  [-81, 41]
]]);

turf.booleanPointInPolygon(pt, poly);
//= true

Returns boolean true if the Point is inside the Polygon; false if the Point is not inside the Polygon


This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.

Installation

Install this module individually:

$ npm install @turf/boolean-point-in-polygon

Or install the Turf module that includes it as a function:

$ npm install @turf/turf
@the-data-center/geojson-data-linkairsiders-mapping-toolindustry-commonjstest-map-componentgisviewer-vue-ftest1zipcar_fleet_endpoint@infinitebrahmanuniverse/nolb-_turlvc-map-components@everything-registry/sub-chunk-941@langge-data/mapbox-gl-drawliangweidong_main_projectic-map-uilatlon2countryincursionincursion-serviceirregular-voronoijmap-infortu-jsminimongominimongo-syncmvt-apiluke.glmain_projectmap-core-funcmmi-isochronemicro-layerjsolinesinsomnia-plugin-premisesnebula.glnearest-point-on-geometrymap-tiles-generatormdh-web-map@varlab-ucf/nebula.gl@varlab-ucf/nebulagl-edit-modes@varlab-ucf/nebulagl-layers@vitessce/gl@q25a25q/gis@ragone/edit-modes@plasmastrapi/geometry@siposdani87/expo-maps-polygon-editor@turf/collect@turf/isobands@turf/shortest-path@turf/tag@turf/turf@turf/unkink-polygon@turf/point-on-feature@turf/points-within-polygon@turf/polygonize@turf/boolean-contains@turf/boolean-crosses@turf/boolean-disjoint@turf/boolean-touches@turf/boolean-valid@turf/boolean-within@terascope/utils@wayz/react-gl@tubular/geo-tzagentmapsaeroscore@zalastax/nolb-_tur@allmaps/render@abcnews/reverse-geocoder@autofleet/locomotion-sdkbertinbrowser-geo-tz@bmap-turf/turf@ban-team/gazetteer@carchain/cities@gisatcz/ptr-maps@geolonia/detic@globalfishingwatch/ocean-areas@globalfishingwatch/deck-layersoffline-country-or-place-locatorrandom-position-in-polygonproximiio-js-libraryquery-remote-tilesopen-data-jp-prefectures-geojsonopenseadragon-annotations-cellmarkerosm-search-data-exportosm-edit-bundlepolygonizereact-simple-maps-canvassearchsmartly-uizonalxlucene-evaluatorvit-swithin-canadawhich-boundaryyymap-turfyt-dts-libyjy-commonjszhaofei_main_projectturf-polygon-slicethree-conic-polygon-geometrythermodbts-aerodata-francestac-layerroundware-web-frameworkrk-maprk-web-map
7.0.0-alpha.114

17 days ago

7.0.0-alpha.113

2 months ago

7.0.0-alpha.111

2 months ago

7.0.0-alpha.110

3 months ago

7.0.0-alpha.1

6 months ago

7.0.0-alpha.2

6 months ago

7.0.0-alpha.0

1 year ago

6.5.0

3 years ago

6.4.0

3 years ago

6.3.0

3 years ago

6.2.0

3 years ago

6.2.0-alpha.3

3 years ago

6.2.0-alpha.2

4 years ago

6.2.0-alpha.1

4 years ago

6.2.0-alpha.0

4 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.1.5

6 years ago

5.1.0

6 years ago

5.0.4

6 years ago

5.0.0

6 years ago