Booleans

boolean-point-in-polygon

turf.boolean_point_in_polygon(point: Union[Sequence, Dict, turf.helpers._features.Feature], polygon: Union[Dict, turf.helpers._features.Feature], options: Dict = None)[source]

Takes a {@link 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.

reference:

http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule modified from: https://github.com/substack/point-in-polygon/blob/master/index.js which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html

Parameters
  • point – input Point Feature

  • polygon – input Polygon or MultiPolygon Feature

  • options

    optional parameters [options[“ignoreBoundary”]] True if polygon boundary should be ignored when determining if

    the point is inside the polygon otherwise False.

Returns

True if the Point is inside the Polygon; False otherwise