point-in-polygon Determine if a point is inside of a polygon. This module casts a semi-infinite ray from the inquiry point and counts intersections, based on this algorithm. If you need a numerically robust solution and are willing to trade some performance for it, use robust-point-in-polygon. example var pointInPolygon = require('point-in-polygon'); var polygon = [ [ 1, 1 ], [ 1, 2 ], [ 2, 2 ], [