Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

booleanContains, booleanPointInPolygon, booleanWithin issues with given features #2744

Open
gsegnato opened this issue Nov 5, 2024 · 0 comments

Comments

@gsegnato
Copy link

gsegnato commented Nov 5, 2024

issue reproduced on "@turf/turf": "^7.1.0" (also on "@turf/turf": "^6.5.0")

This is my code snippet:

const point = turf.point(
  [-14.06247, 4.80398]
);

const poly = turf.polygon([
[
	[ -5.390110511873577, 36.144463011136985],
	[ -5.3757775118735776, 36.09918001113698],
	[ -5.3757775118735776, 36.09918001113698],
	[ -5.375419048732154, 36.09596364984491],
	[ -5.375419048732154, 36.09596364984491],
	[ -5.3798690487321545, 36.04346364984492],
	[ -5.375419048732154, 36.09596364984491],
	[ -5.3798690487321545, 36.04346364984492],
	[ -5.3798690487321545, 36.04346364984492],
	[ -5.381901507346546, 36.03868117294351],
	[ -5.381901507346546, 36.03868117294351],
	[ -5.412867507346546, 36.00331417294351],
	[ -5.381901507346546, 36.03868117294351],
	[ -5.412867507346546, 36.00331417294351],
	[ -5.412867507346546, 36.00331417294351],
	[ -5.416776267653263, 36.000812728292466],
	[ -5.416776267653263, 36.000812728292466],
	[ -5.588754267653262, 35.950068728292464],
	[ -5.416776267653263, 36.000812728292466],
	[ -5.588754267653262, 35.950068728292464],
	[ -5.588754267653262, 35.950068728292464],
	[ -5.591117033230241, 35.949728295617376],
	[ -5.591117033230241, 35.949728295617376],
	[ -6.249523033230242, 35.95020529561738],
	[ -5.591117033230241, 35.949728295617376],
	[ -6.246344431693858, 35.95020299279369],
	[ -6.246344431693858, 35.95020299279369],
	[ -9.708888686970601, 32.860719201667564],
	[ -6.246344431693858, 35.95020299279369],
	[ -9.708369265970763, 32.8611826593569],
	[ -9.708369265970763, 32.8611826593569],
	[ -13.661100998191134, 27.9277429209558],
	[ -9.708369265970763, 32.8611826593569],
	[ -13.661100998191134, 27.9277429209558],
	[ -13.661100998191134, 27.9277429209558],
	[ -13.661441595839953, 27.927344221295332],
	[ -13.661441595839953, 27.927344221295332],
	[ -16.572741595839954, 24.72904422129533],
	[ -13.661441595839953, 27.927344221295332],
	[ -16.571588854367125, 24.73031060162458],
	[ -16.571588854367125, 24.73031060162458],
	[ -17.94842933954469, 20.747596080912377],
	[ -16.571588854367125, 24.73031060162458],
	[ -17.947973503864862, 20.748914652962405],
	[ -17.947973503864862, 20.748914652962405],
	[ -17.956522296550084, 10.870159793442964],
	[ -17.947973503864862, 20.748914652962405],
	[ -17.95652018225154, 10.872603019962474],
	[ -17.95652018225154, 10.872603019962474],
	[ -10.992271398428924, 0.0047601214197582654],
	[ -17.95652018225154, 10.872603019962474],
	[ -10.992561844847494, 0.005213368589041423],
	[ -10.992561844847494, 0.005213368589041423],
	[ 18.006307771797708, -34.49379155048439],
	[ -10.992561844847494, 0.005213368589041423],
	[ 18.005205079686796, -34.49247971381415],
	[ 18.005205079686796, -34.49247971381415],
	[ 18.501074007187473, -34.74180986815255],
	[ 18.005205079686796, -34.49247971381415],
	[ 18.500423229888856, -34.74148264780196],
	[ 18.500423229888856, -34.74148264780196],
	[ 19.83559252650969, -35.14195637705638],
	[ 18.500423229888856, -34.74148264780196],
	[ 19.832969534620137, -35.14116963087635],
	[ 19.832969534620137, -35.14116963087635],
	[ 20.99802452069682, -34.72381015684546],
	[ 19.832969534620137, -35.14116963087635],
	[ 20.99802452069682, -34.72381015684546],
	[ 20.99802452069682, -34.72381015684546],
	[ 20.999462860671084, -34.72343577971421],
	[ 20.999462860671084, -34.72343577971421],
	[ 21.782929860671086, -34.5927527797142],
	[ 20.999462860671084, -34.72343577971421],
	[ 21.782929860671086, -34.5927527797142],
	[ 21.782929860671086, -34.5927527797142],
	[ 21.783825470994202, -34.59265282421963],
	[ 21.783825470994202, -34.59265282421963],
	[ 24.2399754709942, -34.45246882421963],
	[ 21.783825470994202, -34.59265282421963],
	[ 24.2399754709942, -34.45246882421963],
	[ 24.2399754709942, -34.45246882421963],
	[ 24.24059086514557, -34.452456484900935],
	[ 24.24059086514557, -34.452456484900935],
	[ 24.67705786514557, -34.45984048490094],
	[ 24.24059086514557, -34.452456484900935],
	[ 24.676079810703865, -34.45982393850912],
	[ 24.676079810703865, -34.45982393850912],
	[ 25.837374544039655, -34.203867485117485],
	[ 24.676079810703865, -34.45982393850912],
	[ 25.837200340304943, -34.2039058806848],
	[ 25.837200340304943, -34.2039058806848],
	[ 27.548543940523118, -33.749068700723846],
	[ 25.837200340304943, -34.2039058806848],
	[ 27.548208454350583, -33.74915786550911],
	[ 27.548208454350583, -33.74915786550911],
	[ 45.99753155262892, -27.158690641342602],
	[ 27.548208454350583, -33.74915786550911],
	[ 45.99701517162805, -27.158875102964487],
	[ 45.99701517162805, -27.158875102964487],
	[ 58.16154443584796, -20.90925968077042],
	[ 45.99701517162805, -27.158875102964487],
	[ 58.16098530213395, -20.90954693978441],
	[ 58.16098530213395, -20.90954693978441],
	[ 73.26549262520781, -10.00556487684728],
	[ 58.16098530213395, -20.90954693978441],
	[ 73.26544399167125, -10.005599985520414],
	[ 73.26544399167125, -10.005599985520414],
	[ 77.9825288689091, -6.495868791100314],
	[ 73.26544399167125, -10.005599985520414],
	[ 77.98251817780228, -6.495876745782516],
	[ 77.98251817780228, -6.495876745782516],
	[ 86.66504051221104, 0.007598265363153994],
	[ 77.98251817780228, -6.495876745782516],
	[ 86.66504051221104, 0.007598265363153994],
	[ 86.66504051221104, 0.007598265363153994],
	[ 86.66510283308, 0.00764449393392509],
	[ 86.66510283308, 0.00764449393392509],
	[ 94.68005283308, 5.895311493933925],
	[ 86.66510283308, 0.00764449393392509],
	[ 94.68005283308, 5.895311493933925],
	[ 94.68005283308, 5.895311493933925],
	[ 94.6835555673705, 5.896804458103521],
	[ 94.6835555673705, 5.896804458103521],
	[ 95.3233725673705, 6.0081214581035205],
	[ 94.6835555673705, 5.896804458103521],
	[ 95.3233725673705, 6.0081214581035205],
	[ 95.3233725673705, 6.0081214581035205],
	[ 95.3265986005911, 6.008048158133863],
	[ 95.3265986005911, 6.008048158133863],
	[ 97.5857316005911, 5.508331158133863],
	[ 95.3265986005911, 6.008048158133863],
	[ 97.5857316005911, 5.508331158133863],
	[ 97.5857316005911, 5.508331158133863],
	[ 97.58854071086037, 5.507136836260961],
	[ 97.58854071086037, 5.507136836260961],
	[ 97.95899071086038, 5.261069836260961],
	[ 97.58854071086037, 5.507136836260961],
	[ 97.95899071086038, 5.261069836260961],
	[ 97.95899071086038, 5.261069836260961],
	[ 97.9594987256945, 5.26070415266166],
	[ 97.9594987256945, 5.26070415266166],
	[ 100.06059872569449, 3.624971152661659],
	[ 97.9594987256945, 5.26070415266166],
	[ 100.06059872569449, 3.624971152661659],
	[ 100.06059872569449, 3.624971152661659],
	[ 100.06089502368658, 3.624729351965244],
	[ 100.06089502368658, 3.624729351965244],
	[ 100.78541202368659, 3.0052183519652442],
	[ 100.06089502368658, 3.624729351965244],
	[ 100.7852684676678, 3.005341102063251],
	[ 100.7852684676678, 3.005341102063251],
	[ 100.8509864939452, 2.954118217294616],
	[ 100.7852684676678, 3.005341102063251],
	[ 100.8509864939452, 2.954118217294616],
	[ 100.8509864939452, 2.954118217294616],
	[ 100.85168606876957, 2.953507275832058],
	[ 100.85168606876957, 2.953507275832058],
	[ 100.98888606876957, 2.819490275832058],
	[ 100.85168606876957, 2.953507275832058],
	[ 100.98811214049158, 2.8202462491996316],
	[ 100.98811214049158, 2.8202462491996316],
	[ 101.16410374080645, 2.7205793789631545],
	[ 100.98811214049158, 2.8202462491996316],
	[ 101.16410374080645, 2.7205793789631545],
	[ 101.16410374080645, 2.7205793789631545],
	[ 101.16413899724186, 2.7205592990884724],
	[ 101.16413899724186, 2.7205592990884724],
	[ 101.22330599724187, 2.6866702990884725],
	[ 101.16413899724186, 2.7205592990884724],
	[ 101.22326154075795, 2.686695762366709],
	[ 101.22326154075795, 2.686695762366709],
	[ 101.41058277434877, 2.582443676742049],
	[ 101.22326154075795, 2.686695762366709],
	[ 101.41058277434877, 2.582443676742049],
	[ 101.41058277434877, 2.582443676742049],
	[ 101.41166836466988, 2.581722816226184],
	[ 101.41166836466988, 2.581722816226184],
	[ 101.67258536466989, 2.377338816226184],
	[ 101.41166836466988, 2.581722816226184],
	[ 101.67258536466989, 2.377338816226184],
	[ 101.67258536466989, 2.377338816226184],
	[ 101.67260575558849, 2.3773227921217654],
	[ 101.67260575558849, 2.3773227921217654],
	[ 101.97352275558849, 2.1400897921217656],
	[ 101.67260575558849, 2.3773227921217654],
	[ 101.97352275558849, 2.1400897921217656],
	[ 101.97352275558849, 2.1400897921217656],
	[ 101.97401929818238, 2.139665735601029],
	[ 101.97401929818238, 2.139665735601029],
	[ 102.21441929818238, 1.917482735601029],
	[ 101.97401929818238, 2.139665735601029],
	[ 102.21348622062278, 1.9183451065304093],
	[ 102.21348622062278, 1.9183451065304093],
	[ 102.79778843670843, 1.640956000499928],
	[ 102.21348622062278, 1.9183451065304093],
	[ 102.79778843670843, 1.640956000499928],
	[ 102.79778843670843, 1.640956000499928],
	[ 102.79866720013314, 1.6404719214698826],
	[ 102.79866720013314, 1.6404719214698826],
	[ 103.20471720013313, 1.3837559214698827],
	[ 102.79866720013314, 1.6404719214698826],
	[ 103.20471720013313, 1.3837559214698827],
	[ 103.20471720013313, 1.3837559214698827],
	[ 103.2056724317351, 1.3830519825920349],
	[ 103.2056724317351, 1.3830519825920349],
	[ 103.3991054317351, 1.218001982592035],
	[ 103.2056724317351, 1.3830519825920349],
	[ 103.39869507022867, 1.2183521305328475],
	[ 103.39869507022867, 1.2183521305328475],
	[ 103.45920996458807, 1.1789624103931298],
	[ 103.39869507022867, 1.2183521305328475],
	[ 103.45668188803236, 1.1806079594612546],
	[ 103.45668188803236, 1.1806079594612546],
	[ 103.50836941715951, 1.1867367735142587],
	[ 103.45668188803236, 1.1806079594612546],
	[ 103.5068092997151, 1.186551783636059],
	[ 103.5068092997151, 1.186551783636059],
	[ 103.57959081392183, 1.225461096919549],
	[ 103.5068092997151, 1.186551783636059],
	[ 103.57959081392183, 1.225461096919549],
	[ 103.57959081392183, 1.225461096919549],
	[ 103.58553896089991, 1.2261955129079187],
	[ 103.58553896089991, 1.2261955129079187],
	[ 103.6028549608999, 1.221861512907919],
	[ 103.59881103910008, 1.2057044870920812],
	[ 103.5846107362926, 1.209258663135489],
	[ 103.5846107362926, 1.209258663135489],
	[ 103.51327618607817, 1.1711229030804509],
	[ 103.58744318607818, 1.2107729030804508],
	[ 103.51327618607817, 1.1711229030804509],
	[ 103.51327618607817, 1.1711229030804509],
	[ 103.51033058284048, 1.1701972264857412],
	[ 103.51033058284048, 1.1701972264857412],
	[ 103.45564758284048, 1.1637132264857413],
	[ 103.51033058284048, 1.1701972264857412],
	[ 103.45564758284048, 1.1637132264857413],
	[ 103.45564758284048, 1.1637132264857413],
	[ 103.45012403541193, 1.1650035896068702],
	[ 103.45012403541193, 1.1650035896068702],
	[ 103.38915703541193, 1.2046875896068703],
	[ 103.45012403541193, 1.1650035896068702],
	[ 103.38915703541193, 1.2046875896068703],
	[ 103.38915703541193, 1.2046875896068703],
	[ 103.3882945682649, 1.2053320174079651],
	[ 103.3882945682649, 1.2053320174079651],
	[ 103.19531404463541, 1.3699959342424632],
	[ 103.3882945682649, 1.2053320174079651],
	[ 103.19531404463541, 1.3699959342424632],
	[ 103.19531404463541, 1.3699959342424632],
	[ 102.79019157530176, 1.6261255237941377],
	[ 103.19581679986686, 1.3696780785301172],
	[ 102.79019157530176, 1.6261255237941377],
	[ 102.79019157530176, 1.6261255237941377],
	[ 102.20519556329157, 1.903843999500072],
	[ 102.79064556329158, 1.6259099995000719],
	[ 102.20519556329157, 1.903843999500072],
	[ 102.20519556329157, 1.903843999500072],
	[ 102.20311470181761, 1.905251264398971],
	[ 102.20311470181761, 1.905251264398971],
	[ 101.96295465413606, 2.127212495156183],
	[ 102.20311470181761, 1.905251264398971],
	[ 101.96295465413606, 2.127212495156183],
	[ 101.96295465413606, 2.127212495156183],
	[ 101.66230442739582, 2.364235179950539],
	[ 101.96321124441151, 2.1270102078782345],
	[ 101.66230442739582, 2.364235179950539],
	[ 101.66230442739582, 2.364235179950539],
	[ 101.40191214350003, 2.5682081543131057],
	[ 101.66231463533012, 2.364227183773816],
	[ 101.40191214350003, 2.5682081543131057],
	[ 101.40191214350003, 2.5682081543131057],
	[ 101.21511722565123, 2.672167323257951],
	[ 101.40248322565122, 2.567890323257951],
	[ 101.21511722565123, 2.672167323257951],
	[ 101.21511722565123, 2.672167323257951],
	[ 101.21502800275813, 2.6722177009115278],
	[ 101.21502800275813, 2.6722177009115278],
	[ 101.15587860651772, 2.706096618030718],
	[ 101.21502800275813, 2.6722177009115278],
	[ 101.15587860651772, 2.706096618030718],
	[ 101.15587860651772, 2.706096618030718],
	[ 100.97896325919355, 2.8062866210368456],
	[ 101.15589625919354, 2.7060866210368455],
	[ 100.97896325919355, 2.8062866210368456],
	[ 100.97896325919355, 2.8062866210368456],
	[ 100.97724793123044, 2.807575724167942],
	[ 100.97724793123044, 2.807575724167942],
	[ 100.84038065746739, 2.9412677170826664],
	[ 100.97724793123044, 2.807575724167942],
	[ 100.84038065746739, 2.9412677170826664],
	[ 100.84038065746739, 2.9412677170826664],
	[ 100.7748805060548, 2.9923207827053844],
	[ 100.8407475060548, 2.9409817827053844],
	[ 100.7748805060548, 2.9923207827053844],
	[ 100.7748805060548, 2.9923207827053844],
	[ 100.77458797631341, 2.992559648034756],
	[ 100.77458797631341, 2.992559648034756],
	[ 100.05021634847773, 3.6119463450095717],
	[ 100.77458797631341, 2.992559648034756],
	[ 100.05021634847773, 3.6119463450095717],
	[ 100.05021634847773, 3.6119463450095717],
	[ 97.94951440532172, 5.247369452707655],
	[ 100.0503672743055, 3.611828847338341],
	[ 97.94951440532172, 5.247369452707655],
	[ 97.94951440532172, 5.247369452707655],
	[ 97.58061851619205, 5.492404153073347],
	[ 97.94977528913964, 5.24719616373904],
	[ 97.58061851619205, 5.492404153073347],
	[ 97.58061851619205, 5.492404153073347],
	[ 95.32460717821029, 5.991430645883741],
	[ 97.5821343994089, 5.492068841866137],
	[ 95.32460717821029, 5.991430645883741],
	[ 95.32460717821029, 5.991430645883741],
	[ 94.68833709722739, 5.880730747936711],
	[ 95.3262274326295, 5.991712541896479],
	[ 94.68833709722739, 5.880730747936711],
	[ 94.68833709722739, 5.880730747936711],
	[ 86.67499443504153, -0.00575552482155306],
	[ 94.68991316692001, 5.881888506066075],
	[ 86.67499443504153, -0.00575552482155306],
	[ 86.67499443504153, -0.00575552482155306],
	[ 77.99249248778897, -6.509215265363154],
	[ 86.67502548778897, -0.005732265363153994],
	[ 77.99249248778897, -6.509215265363154],
	[ 77.99249248778897, -6.509215265363154],
	[ 77.9924711310909, -6.509231208899687],
	[ 77.9924711310909, -6.509231208899687],
	[ 73.27533813109089, -10.018998208899687],
	[ 77.9924711310909, -6.509231208899687],
	[ 73.27533813109089, -10.018998208899687],
	[ 73.27533813109089, -10.018998208899687],
	[ 73.27524137479217, -10.019069123152718],
	[ 73.27524137479217, -10.019069123152718],
	[ 58.170224374792184, -20.92341912315272],
	[ 73.27524137479217, -10.019069123152718],
	[ 58.170224374792184, -20.92341912315272],
	[ 58.170224374792184, -20.92341912315272],
	[ 58.169155564152035, -20.924074319229582],
	[ 58.169155564152035, -20.924074319229582],
	[ 46.004138564152036, -27.173940319229583],
	[ 58.169155564152035, -20.924074319229582],
	[ 46.004138564152036, -27.173940319229583],
	[ 46.004138564152036, -27.173940319229583],
	[ 46.003134447371075, -27.1743753586574],
	[ 46.003134447371075, -27.1743753586574],
	[ 27.553484447371073, -33.7649593586574],
	[ 46.003134447371075, -27.1743753586574],
	[ 27.553484447371073, -33.7649593586574],
	[ 27.553484447371073, -33.7649593586574],
	[ 27.55282205947688, -33.765165299276156],
	[ 27.55282205947688, -33.765165299276156],
	[ 25.84130605947688, -34.22004829927616],
	[ 27.55282205947688, -33.765165299276156],
	[ 25.84130605947688, -34.22004829927616],
	[ 25.84130605947688, -34.22004829927616],
	[ 25.840959455960345, -34.22013251488252],
	[ 25.840959455960345, -34.22013251488252],
	[ 24.678709455960345, -34.47629951488252],
	[ 25.840959455960345, -34.22013251488252],
	[ 24.678709455960345, -34.47629951488252],
	[ 24.678709455960345, -34.47629951488252],
	[ 24.67677613485443, -34.476493515099065],
	[ 24.67677613485443, -34.476493515099065],
	[ 24.2406170600921, -34.46911472447332],
	[ 24.67677613485443, -34.476493515099065],
	[ 24.2406170600921, -34.46911472447332],
	[ 24.2406170600921, -34.46911472447332],
	[ 21.78522504226957, -34.60925546287547],
	[ 24.2409245290058, -34.46909717578037],
	[ 21.78522504226957, -34.60925546287547],
	[ 21.78522504226957, -34.60925546287547],
	[ 21.002939080197628, -34.73974146468723],
	[ 21.785670139328918, -34.60918122028579],
	[ 21.002939080197628, -34.73974146468723],
	[ 21.002939080197628, -34.73974146468723],
	[ 19.83600847930318, -35.15777284315454],
	[ 21.00364147930318, -34.739489843154544],
	[ 19.83600847930318, -35.15777284315454],
	[ 19.83600847930318, -35.15777284315454],
	[ 19.830807473490314, -35.15790962294361],
	[ 19.830807473490314, -35.15790962294361],
	[ 18.494940473490313, -34.75722662294362],
	[ 19.830807473490314, -35.15790962294361],
	[ 18.494940473490313, -34.75722662294362],
	[ 18.494940473490313, -34.75722662294362],
	[ 18.49359199281253, -34.756690131847456],
	[ 18.49359199281253, -34.756690131847456],
	[ 17.996191992812527, -34.50659013184745],
	[ 18.49359199281253, -34.756690131847456],
	[ 17.996191992812527, -34.50659013184745],
	[ 17.996191992812527, -34.50659013184745],
	[ 17.99355822820229, -34.50450844951561],
	[ 17.99355822820229, -34.50450844951561],
	[ -11.00565777179771, -0.005091449515609489],
	[ 17.99355822820229, -34.50450844951561],
	[ -11.00565777179771, -0.005091449515609489],
	[ -11.00565777179771, -0.005091449515609489],
	[ -11.006294601571076, -0.004226121419758266],
	[ -11.006294601571076, -0.004226121419758266],
	[ -17.971861601571074, 10.865673878580242],
	[ -11.006294601571076, -0.004226121419758266],
	[ -17.971861601571074, 10.865673878580242],
	[ -17.971861601571074, 10.865673878580242],
	[ -17.973177703449913, 10.870174206557037],
	[ -17.973177703449913, 10.870174206557037],
	[ -17.964627703449914, 20.750324206557035],
	[ -17.973177703449913, 10.870174206557037],
	[ -17.964627703449914, 20.750324206557035],
	[ -17.964627703449914, 20.750324206557035],
	[ -17.96417066045531, 20.75303791908762],
	[ -17.96417066045531, 20.75303791908762],
	[ -16.58677066045531, 24.73737091908762],
	[ -17.96417066045531, 20.75303791908762],
	[ -16.58677066045531, 24.73737091908762],
	[ -16.58677066045531, 24.73737091908762],
	[ -16.585058404160048, 24.740255778704668],
	[ -16.585058404160048, 24.740255778704668],
	[ -13.67393498236822, 27.93836179317134],
	[ -16.585058404160048, 24.740255778704668],
	[ -13.67393498236822, 27.93836179317134],
	[ -13.67393498236822, 27.93836179317134],
	[ -9.720932001808865, 32.87214007904421],
	[ -13.674099001808866, 27.938157079044203],
	[ -9.720932001808865, 32.87214007904421],
	[ -9.720932001808865, 32.87214007904421],
	[ -9.719977313029398, 32.87314679833244],
	[ -9.719977313029398, 32.87314679833244],
	[ -6.255061313029398, 35.96474679833244],
	[ -9.719977313029398, 32.87314679833244],
	[ -6.255061313029398, 35.96474679833244],
	[ -6.255061313029398, 35.96474679833244],
	[ -6.249510966769758, 35.966860704382626],
	[ -6.249510966769758, 35.966860704382626],
	[ -5.5923110006089445, 35.966384578126394],
	[ -6.249510966769758, 35.966860704382626],
	[ -5.5923110006089445, 35.966384578126394],
	[ -5.5923110006089445, 35.966384578126394],
	[ -5.423806966945567, 36.01610354615843],
	[ -5.593467732346737, 35.966043271707534],
	[ -5.423806966945567, 36.01610354615843],
	[ -5.423806966945567, 36.01610354615843],
	[ -5.396233978711597, 36.04759530727937],
	[ -5.425398492653454, 36.01428582705649],
	[ -5.396233978711597, 36.04759530727937],
	[ -5.396233978711597, 36.04759530727937],
	[ -5.392154273001935, 36.09572666677537],
	[ -5.396464951267846, 36.04487035015509],
	[ -5.392154273001935, 36.09572666677537],
	[ -5.392154273001935, 36.09572666677537],
	[ -5.405989488126422, 36.13943698886302],
	[ -5.390110511873577, 36.144463011136985]
]
]);

console.log("Some different methods to check if point is in polygon:")
console.log("1- booleanContains (poly contains point): ", turf.booleanContains(poly, point))
console.log("2- booleanWithin (point is within poly): ", turf.booleanWithin(point, poly))
console.log("3- booleanPointInPolygon (point is inside poly): ", turf.booleanPointInPolygon(point, poly))
console.log("SADLY this doesn't seem to be what it's shown on the map")

Here a zoomed-in map with point marker fully inside the polygon:
immagine

@smallsaucepan smallsaucepan changed the title booleanContains, booleanPointInPoligon, booleanWithin issues with given features booleanContains, booleanPointInPolygon, booleanWithin issues with given features Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants