From a3d83e78910d29a73dd889b4ed116ebafe414348 Mon Sep 17 00:00:00 2001 From: Seth Fitzsimmons Date: Tue, 30 Oct 2018 14:32:48 -0700 Subject: [PATCH] Scale by 0.1 Suggestion from https://github.com/w8r/martinez/issues/85#issuecomment-409913794 --- src/metrics/countries.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/metrics/countries.js b/src/metrics/countries.js index 5d127c0..0871731 100644 --- a/src/metrics/countries.js +++ b/src/metrics/countries.js @@ -44,9 +44,10 @@ module.exports = feature => { return COUNTRY_INDEX.search(feature) .features.filter(x => { try { + const i = martinez.intersection( - x.geometry.coordinates, - feature.geometry.coordinates + [x.geometry.coordinates[0].map(([x, y]) => [x * 0.1, y * 0.1])], + [feature.geometry.coordinates[0].map(([x, y]) => [x * 0.1, y * 0.1])] ); return i != null && i.length > 0;