code: function isPointInsidePoly(point, polygon) {
      let i,
          nvert = polygon.length,
          j = nvert - 1,
          c = false;
      for (i = 0; i < nvert; j = i++) {
          if (((polygon[i].lon > point.lon) !== (polygon[j].lon > point.lon)) &&
              (point.lat < (polygon[j].lat - polygon[i].lat) * (point.lon - polygon[i].lon) /
              (polygon[j].lon - polygon[i].lon) + polygon[i].lat)) {
              c = !c;
              //console.log(i, j, polygon[i].lon, '>', point.lon, c);
          }
      }
      return c;
  }
docs: /*
  Inspired by:
  https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html