move point-in-polygon functions into own file