You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After diving deeper into the issue, it seems to come from a library used internally that is returning a wrong value (false instead of 0). The library in question is point-in-polygon-hao and I just recently made a ticket herehttps://github.com/rowanwins/point-in-polygon-hao/issues/23.
You have listed in your package.json to set that library to "^1.1.0". I verified that that version does in fact work, however a fresh install will give you 1.2.3 which breaks.
This is due to how semver works with the ^ symbol, "^1.1.0" will give you anything between anything >= 1.1 AND < 2. If you adjust your install to use ~, it will give you >= 1.1 AND < 1.2, or just locking it down completely to an exact version. Its unfortunate that package installs usually default to ^
I can lucky fix this by setting up resolutions in my personal package.json (for others to see, im using yarn)
However I still recommend to lock down the 1.1.0 or use ~ instead of the ^ as that is far to loose and you rely a bit to much on others not breaking code in minor semver updates. This exact issue has bitten me a few times over the past few months for other libraries
The text was updated successfully, but these errors were encountered:
This should be fixed with the latest release of point-in-polygon-hao.
I had a similar problem with a point in the middle of a polygon that was wrongly determined to be outside of the polygon.
It might be a good idea to lock the dependencies, however for this particular problem neither the tests of Turf.js nor those of point-in-polygon-hao caught this regression.
Edit: My bad, Turf would have caught that in its tests.
Downloading from scratch
@turf/boolean-point-in-polygon
currently is not able to check for edge points. Below is a code example to replicate the issuepackage.json
code
After diving deeper into the issue, it seems to come from a library used internally that is returning a wrong value (false instead of 0). The library in question is
point-in-polygon-hao
and I just recently made a ticket herehttps://github.com/rowanwins/point-in-polygon-hao/issues/23
.You have listed in your package.json to set that library to
"^1.1.0"
. I verified that that version does in fact work, however a fresh install will give you1.2.3
which breaks.This is due to how semver works with the
^
symbol,"^1.1.0"
will give you anything between anything>= 1.1 AND < 2
. If you adjust your install to use~
, it will give you>= 1.1 AND < 1.2
, or just locking it down completely to an exact version. Its unfortunate that package installs usually default to^
I can lucky fix this by setting up resolutions in my personal package.json (for others to see, im using yarn)
However I still recommend to lock down the
1.1.0
or use~
instead of the^
as that is far to loose and you rely a bit to much on others not breaking code in minor semver updates. This exact issue has bitten me a few times over the past few months for other librariesThe text was updated successfully, but these errors were encountered: