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
I'm getting this error on trying to intersect these two polygons: (viewer link)
It isn't really clear why this wouldn't be working.
"polygon-clipping": "^0.15.3",
Error: Unable to complete output ring starting at [175.4412230000001, -37.929121]. Last matching segment found ends at [175.441261917386, -37.92871399662434].
at Function.factory (node_modules/polygon-clipping/dist/polygon-clipping.cjs.js:1252:21)
at Operation.run (node_modules/polygon-clipping/dist/polygon-clipping.cjs.js:1776:30)
at Object.intersection (node_modules/polygon-clipping/dist/polygon-clipping.cjs.js:1800:20)
at Object.intersect (node_modules/@turf/intersect/dist/js/index.js:49:51)
script to validate:
this will throw at turf.intersect
constturf=require('@turf/turf');constpiece1={"type": "Polygon","coordinates": [[[175.440248,-37.927138],[175.441083,-37.927271],[175.441362,-37.928504],[175.44139,-37.928511],[175.441542,-37.929194],[175.441503,-37.929209],[175.441476,-37.929182],[175.441449,-37.929181],[175.441223,-37.929121],[175.441179,-37.928787],[175.44065,-37.928795],[175.440248,-37.927138]]]}constpiece2={"type": "Polygon","coordinates": [[[175.4412230000001,-37.92912100000001],[175.44144900000003,-37.929181000000035],[175.441503,-37.929209],[175.44154200000003,-37.92919400000002],[175.44143567050224,-37.92871621679616],[175.441261917386,-37.92871399662434],[175.44117900000003,-37.928787000000014],[175.4412230000001,-37.92912100000001]]]}constpiecesCollection=turf.featureCollection([turf.feature(piece1),turf.feature(piece2)])// log link to view collectionconsole.log(`http://geojson.io/#data=data:application/json,${encodeURIComponent(JSON.stringify(piecesCollection))}`)constintersection=turf.intersect(piece1,piece2).geometry// log link to view intersectionconsole.log(`http://geojson.io/#data=data:application/json,${encodeURIComponent(JSON.stringify(intersection))}`)
The text was updated successfully, but these errors were encountered:
I'm getting this error on trying to intersect these two polygons: (viewer link)
It isn't really clear why this wouldn't be working.
script to validate:
this will throw at
turf.intersect
The text was updated successfully, but these errors were encountered: