Skip to content

Commit

Permalink
Merge pull request #1401 from PizzaBrandon/issue-1400
Browse files Browse the repository at this point in the history
1400: Fix @turf/intersect, @turf/difference, and @turf/union import of martinez-polygon-clipping

Thanks for this @PizzaBrandon - much appreciated.
  • Loading branch information
rowanwins committed Jun 24, 2018
2 parents 085f562 + dbbda22 commit 332063c
Show file tree
Hide file tree
Showing 7 changed files with 411 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/turf-difference/index.mjs
@@ -1,4 +1,4 @@
import martinez from 'martinez-polygon-clipping';
import * as martinez from 'martinez-polygon-clipping';
import area from '@turf/area';
import { feature, multiPolygon, polygon } from '@turf/helpers';
import { getGeom } from '@turf/invariant';
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-difference/package.json
Expand Up @@ -43,6 +43,6 @@
"@turf/helpers": "6.x",
"@turf/invariant": "6.x",
"@turf/meta": "6.x",
"martinez-polygon-clipping": "*"
"martinez-polygon-clipping": "^0.4.3"
}
}
2 changes: 1 addition & 1 deletion packages/turf-intersect/package.json
Expand Up @@ -43,6 +43,6 @@
"dependencies": {
"@turf/helpers": "6.x",
"@turf/invariant": "6.x",
"martinez-polygon-clipping": "*"
"martinez-polygon-clipping": "^0.4.3"
}
}
82 changes: 82 additions & 0 deletions packages/turf-intersect/test/in/issue-1394.geojson
@@ -0,0 +1,82 @@
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-85.42358091, 41.76872876],
[-85.42358054, 41.76871738],
[-85.42343269, 41.76871941],
[-85.42342892, 41.7687873],
[-85.42343247, 41.76882923],
[-85.42343403, 41.76885906],
[-85.42343247, 41.76893021],
[-85.4234327, 41.76893113],
[-85.42343245, 41.768932],
[-85.42343245, 41.76896821],
[-85.42357911, 41.76896572],
[-85.42357911, 41.76895253],
[-85.42357911, 41.768932],
[-85.42358073, 41.76885781],
[-85.42357713, 41.76878899],
[-85.42358091, 41.76872876]
]
]
}
}, {
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-85.42775567, 41.76834521],
[-85.42261052, 41.76843269],
[-85.42260803, 41.76844995],
[-85.4226073, 41.76845496],
[-85.42260484, 41.76848048],
[-85.42260083, 41.76852204],
[-85.42260191, 41.76856362],
[-85.42260586, 41.7685989],
[-85.42263068, 41.76862319],
[-85.42334654, 41.76860736],
[-85.42335464, 41.76862399],
[-85.4233818, 41.76867993],
[-85.42338342, 41.76869724],
[-85.42338701, 41.76872004],
[-85.42339693, 41.76871991],
[-85.42343269, 41.76871941],
[-85.42358054, 41.76871738],
[-85.42358091, 41.76872876],
[-85.42357713, 41.768789],
[-85.42358073, 41.76885781],
[-85.42357911, 41.768932],
[-85.42357911, 41.76895253],
[-85.42357911, 41.76896572],
[-85.42595679, 41.76892533],
[-85.42595476, 41.76888531],
[-85.42599703, 41.7688939],
[-85.42599798, 41.76892451],
[-85.426518, 41.76891567],
[-85.42776659, 41.76889445],
[-85.42781994, 41.76889354],
[-85.42781971, 41.76888565],
[-85.42781923, 41.76886922],
[-85.42780934, 41.76879664],
[-85.42782049, 41.76870985],
[-85.42782211, 41.76864827],
[-85.42782265, 41.76858656],
[-85.42782337, 41.76852915],
[-85.42782301, 41.76847763],
[-85.42782337, 41.7684563],
[-85.42775364, 41.76845772],
[-85.42775456, 41.76840654],
[-85.42775499, 41.76838269],
[-85.42775536, 41.76836222],
[-85.42775567, 41.76834521]
]
]
}
}]
}

0 comments on commit 332063c

Please sign in to comment.