-
Notifications
You must be signed in to change notification settings - Fork 994
Closed
Description
I am getting following error while finding the difference betweeen a polygon and a multipolygon.
/Users/AmishaSingla/Documents/osm-adiff-compare/node_modules/@mapbox/osm-compare/node_modules/@turf/difference/node_modules/jsts/dist/jsts.min.js:14
ln.checkValid(this.edgeList.getEdges()),this.graph.addEdges(this.edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new Sn(this.geomFact);n.add(this.graph),this.resultPolyList=n.getPolygons();var i=new wn(this,this.geomFact,this.ptLocator);this.resultLineList=i.build(t);var r=new Ln(this,this.geomFact,this.ptLocator);this.resultPointList=r.build(t),this.resultGeom=this.computeGeometry(this.resultPointList,this.resultLineList,this.resultPolyList,t)},labelIncompleteNode:function(t,e){var n=this.ptLocator.locate(t.getCoordinate(),this.arg[e].getGeometry());t.getLabel().setLocation(e,n)},copyPoints:function(t){for(var e=this.arg[t].getNodeIterator();e.hasNext();){var n=e.next(),i=this.graph.addNode(n.getCoordinate());i.setLabel(t,n.getLabel().getLocation(t))}},findResultAreaEd
The polygon and multipolygon are following:
- http://bl.ocks.org/d/44385641e432c52cdfd548218454fd42
- http://bl.ocks.org/d/28768027d930ce93f0798fa6f6463fad
Source Code:
https://jsfiddle.net/tboq1cv5/
Not sure if the input to difference method is right or not.
Reactions are currently unavailable