bug :intersect returns null although two polygones crosses each other
See original GitHub issuevar points1 = [[[103.06965947998805, 25.166360955441036],
[103.06936423825272, 25.16592004745796],
[103.06997932523149, 25.165407879620716],
[103.06965947998805, 25.166360955441036]]];
var points2 = [[[103.06882256663783, 25.166667027669433],
[103.06866395130692, 25.165835431757955],
[103.06968681685834, 25.165884659624638],
[103.06972748746756, 25.165870594527007],
[103.06882256663783, 25.166667027669433]]];
var polygon1 = turf.polygon(points1);
var polygon2 = turf.polygon(points2);
var intersection = turf.intersect(polygon1, polygon2);
turf.intersect returns null
but two polygons crosses each other
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
turfjs intersect line and polygon - GIS Stack Exchange
The docs say that the intersect function works only with two polygons, so the error is documented.
Read more >python - Polygon intersection error in Shapely: "shapely.geos ...
Since it prints the areas of the two polygons, I assume that the polygons are formed correctly. I also (somehow) printed the first...
Read more >Spatial Process Results | Alteryx Help
A polygon if the two objects cover different areas. Null if the two objects are the same. Null, Any Object, The non-null object....
Read more >Geodatabase topology rules and topology error fixes
Lines can share endpoints. This rule is used when there are lines from two layers that should never cross each other or in...
Read more >23. Validity — Introduction to PostGIS
What's going on here? The algorithm that calculates area assumes that rings do not self-intersect. A well-behaved ring will always have the area...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is a chance to get more precision? I use this on maps and need precision of 2-3 meters
The version 6.2.0-alpha.2 seems to solve the problem. At least for me it works now.