From 4057c4cff278a4fd45b12fdcc4df653370724b1d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 19 Jul 2021 21:30:03 +0000 Subject: [PATCH 01/12] [Security] Bump urijs from 1.19.6 to 1.19.7 Bumps [urijs](https://github.com/medialize/URI.js) from 1.19.6 to 1.19.7. **This update includes a security fix.** - [Release notes](https://github.com/medialize/URI.js/releases) - [Changelog](https://github.com/medialize/URI.js/blob/gh-pages/CHANGELOG.md) - [Commits](https://github.com/medialize/URI.js/compare/v1.19.6...v1.19.7) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index e22c8b4..5b79dfe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7012,9 +7012,9 @@ uri-js@^4.2.2: punycode "^2.1.0" urijs@^1.19.2: - version "1.19.6" - resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.6.tgz#51f8cb17ca16faefb20b9a31ac60f84aa2b7c870" - integrity sha512-eSXsXZ2jLvGWeLYlQA3Gh36BcjF+0amo92+wHPyN1mdR8Nxf75fuEuYTd9c0a+m/vhCjRK0ESlE9YNLW+E1VEw== + version "1.19.7" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.7.tgz#4f594e59113928fea63c00ce688fb395b1168ab9" + integrity sha512-Id+IKjdU0Hx+7Zx717jwLPsPeUqz7rAtuVBRLLs+qn+J2nf9NGITWVCxcijgYxBqe83C7sqsQPs6H1pyz3x9gA== urix@^0.1.0: version "0.1.0" From c08dd29962919fb93d3d741c0406eea1c398c72a Mon Sep 17 00:00:00 2001 From: Alicia Date: Mon, 13 Dec 2021 10:57:59 +0100 Subject: [PATCH 02/12] added initial fix and test --- app/src/services/geoStoreService.js | 40 ++++++++++++++++++++++++++-- app/test/e2e/v1/geostore-get.spec.js | 26 ++++++++++++++++++ 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/app/src/services/geoStoreService.js b/app/src/services/geoStoreService.js index efe81a6..e402f6b 100644 --- a/app/src/services/geoStoreService.js +++ b/app/src/services/geoStoreService.js @@ -151,10 +151,45 @@ class GeoStoreService { } } + /** + * @description: checks if a bbox crosses the antimeridian + * @param {Array} bbox + * @returns {Boolean} + * + */ + static async antimeridian(bbox) { + logger.debug('Checking antimeridian'); + const west = bbox[0]; + const east = bbox[2]; + if (west > east) { + logger.debug('Antimeridian detected'); + return true; + } + return false; + } + /** + * @description: This function translates a bbox that crosses the antimeridian + * @param {Array} bbox + * @returns {Array} bbox with the antimeridian corrected + */ + static async translateBBox(bbox) { + logger.debug('Converting bbox from [-180,180] to [0,360]'); + return [bbox[0], bbox[1], 360 - bbox[2], bbox[3]] + + } + /** + * @description: Calculates a bbox. + * If a bbox that crosses the antimeridian will be transformed its + * latitudes from [-180, 180] to [0, 360] + * @param {geoStore} geoStore + * @returns {geoStore} + * + **/ static async calculateBBox(geoStore) { logger.debug('Calculating bbox'); - geoStore.bbox = turf.bbox(geoStore.geojson); + const bbox = turf.bbox(geoStore.geojson); + geoStore.bbox = this.antimeridian(bbox) ? this.translateBBox(bbox) : bbox; await geoStore.save(); return geoStore; } @@ -214,7 +249,8 @@ class GeoStoreService { hash: geoStore.hash }); if (!geoStore.bbox) { - geoStore.bbox = turf.bbox(geoStore.geojson); + const bbox = turf.bbox(geoStore.geojson); + geoStore.bbox = this.antimeridian(bbox) ? this.translateBBox(bbox) : bbox; } return GeoStore.findOneAndUpdate({ hash: geoStore.hash }, geoStore, { diff --git a/app/test/e2e/v1/geostore-get.spec.js b/app/test/e2e/v1/geostore-get.spec.js index 8c5c4df..a029c5b 100644 --- a/app/test/e2e/v1/geostore-get.spec.js +++ b/app/test/e2e/v1/geostore-get.spec.js @@ -61,6 +61,32 @@ describe('Geostore v1 tests - Get geostores', () => { hash.should.equal(createdGeostore.hash); }); + it('Getting a geostore that crosses the antimeridian should give a bbox [position 0 and 2] from [-180, 180] to [0, 360] (happy case)', async () => { + const createdGeostore = await createGeostore(); + const response = await geostore.get(createdGeostore.hash); + + response.status.should.equal(200); + response.body.should.instanceOf(Object).and.have.property('data'); + + const { data } = response.body; + data.id.should.equal(createdGeostore.hash); + data.type.should.equal('geoStore'); + data.should.have.property('attributes').and.should.instanceOf(Object); + data.attributes.should.instanceOf(Object); + + const { geojson, bbox, hash } = data.attributes; + + const expectedGeojson = { + ...DEFAULT_GEOJSON, + crs: {}, + }; + delete expectedGeojson.features[0].properties; + + geojson.should.deep.equal(expectedGeojson); + bbox.should.instanceOf(Array); + hash.should.equal(createdGeostore.hash); + }); + it('Getting geostore with format esri should return the result with esrijson (happy case)', async () => { const createdGeostore = await createGeostore(); const response = await geostore.get(createdGeostore.hash).query({ format: 'esri' }); From af7cb7cac3fa2d572440dada540e55c7b92102e9 Mon Sep 17 00:00:00 2001 From: Alicia Date: Tue, 14 Dec 2021 11:05:55 +0100 Subject: [PATCH 03/12] updated geostore bbox calculation with antimeridian and e2e tests --- Dockerfile | 11 +++---- app/src/services/geoStoreService.js | 49 ++++++++++++++++++++-------- app/test/e2e/utils/test.constants.js | 37 ++++++++++++++++++++- app/test/e2e/v1/geostore-get.spec.js | 12 +++++-- 4 files changed, 86 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5311f34..38b5ef6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,14 @@ -FROM node:12-alpine +FROM node:12-bullseye MAINTAINER info@vizzuality.com ENV NAME gfw-geostore-api ENV USER microservice -RUN apk update && apk upgrade && \ - apk add --no-cache --update bash git openssh python alpine-sdk +RUN apt-get update -y && apt-get upgrade -y && \ + apt-get install -y bash git ssh python3 make -RUN addgroup $USER && adduser -s /bin/bash -D -G $USER $USER - -RUN yarn global add grunt-cli bunyan +RUN addgroup $USER && useradd -ms /bin/bash $USER -g $USER +RUN yarn global add bunyan grunt RUN mkdir -p /opt/$NAME COPY package.json /opt/$NAME/package.json diff --git a/app/src/services/geoStoreService.js b/app/src/services/geoStoreService.js index e402f6b..fda8d48 100644 --- a/app/src/services/geoStoreService.js +++ b/app/src/services/geoStoreService.js @@ -151,11 +151,12 @@ class GeoStoreService { } } + /** * @description: checks if a bbox crosses the antimeridian * @param {Array} bbox * @returns {Boolean} - * + * */ static async antimeridian(bbox) { logger.debug('Checking antimeridian'); @@ -170,26 +171,43 @@ class GeoStoreService { /** * @description: This function translates a bbox that crosses the antimeridian - * @param {Array} bbox + * @param {Array} bbox * @returns {Array} bbox with the antimeridian corrected */ - static async translateBBox(bbox) { + static translateBBox(bbox) { logger.debug('Converting bbox from [-180,180] to [0,360]'); - return [bbox[0], bbox[1], 360 - bbox[2], bbox[3]] - + const newBBox = [bbox[0], bbox[1], 360 + bbox[2], bbox[3]]; + return newBBox; + } + /** * @description: Calculates a bbox. - * If a bbox that crosses the antimeridian will be transformed its + * If a bbox that crosses the antimeridian will be transformed its + * latitudes from [-180, 180] to [0, 360] + * @param {geoStore} geoStore + * @returns {bbox} + * + * */ + static async swapBBox(geoStore) { + const bbox = await turf.bbox(geoStore.geojson); + const antimeridian = await GeoStoreService.antimeridian(bbox); + logger.info(bbox); + return antimeridian ? GeoStoreService.translateBBox(bbox) : bbox; + + } + + /** + * @description: Calculates a bbox. + * If a bbox that crosses the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] * @param {geoStore} geoStore * @returns {geoStore} - * - **/ + * + * */ static async calculateBBox(geoStore) { logger.debug('Calculating bbox'); - const bbox = turf.bbox(geoStore.geojson); - geoStore.bbox = this.antimeridian(bbox) ? this.translateBBox(bbox) : bbox; + geoStore.bbox = await GeoStoreService.swapBBox(geoStore); await geoStore.save(); return geoStore; } @@ -238,19 +256,24 @@ class GeoStoreService { logger.debug('Repaired geometry', JSON.stringify(geoStore.geojson)); logger.debug('Make Feature Collection'); + geoStore.geojson = GeoJSONConverter.makeFeatureCollection(geoStore.geojson, props); + logger.debug('Result', JSON.stringify(geoStore.geojson)); logger.debug('Creating hash from geojson md5'); + geoStore.hash = md5(JSON.stringify(geoStore.geojson)); + if (geoStore.areaHa === undefined) { geoStore.areaHa = turf.area(geoStore.geojson) / 10000; // convert to ha2 } await GeoStore.findOne({ hash: geoStore.hash }); + logger.debug('bbox geostore'); + logger.debug('geojson', JSON.stringify(geoStore.bbox)); if (!geoStore.bbox) { - const bbox = turf.bbox(geoStore.geojson); - geoStore.bbox = this.antimeridian(bbox) ? this.translateBBox(bbox) : bbox; + geoStore.bbox = await GeoStoreService.swapBBox(geoStore); } return GeoStore.findOneAndUpdate({ hash: geoStore.hash }, geoStore, { @@ -281,7 +304,7 @@ class GeoStoreService { geoStore.geojson = GeoJSONConverter.makeFeatureCollection(geoStore.geojson); logger.debug('Result', JSON.stringify(geoStore.geojson)); geoStore.areaHa = turf.area(geoStore.geojson) / 10000; // convert to ha2 - geoStore.bbox = turf.bbox(geoStore.geojson); + geoStore.bbox = await GeoStoreService.swapBBox(geoStore); // calculate bbox return geoStore; diff --git a/app/test/e2e/utils/test.constants.js b/app/test/e2e/utils/test.constants.js index 3df2dfa..0891ace 100644 --- a/app/test/e2e/utils/test.constants.js +++ b/app/test/e2e/utils/test.constants.js @@ -23,10 +23,45 @@ const DEFAULT_GEOJSON = { }], }; +const ANTIMERIDIAN_GEOJSON = { + type: 'FeatureCollection', + features: [{ + type: 'Feature', + properties: {}, + geometry: { + type: 'Polygon', + coordinates: [ + [ + [ + 176.55029296875, + -20.11783963049162 + ], + [ + 183.09814453125, + -20.11783963049162 + ], + [ + 183.09814453125, + -14.827991347352068 + ], + [ + 176.55029296875, + -14.827991347352068 + ], + [ + 176.55029296875, + -20.11783963049162 + ] + ] + ] + } + }], +}; + const MOCK_RESULT_CARTODB = [{ geojson: '{"type":"MultiPolygon","coordinates":[[[[7.4134,43.7346],[7.4396,43.7492],[7.4179,43.7226],[7.4095,43.7299],[7.4134,43.7346]]]]}', area_ha: 235.490994944, name: 'Monaco' }]; -module.exports = { DEFAULT_GEOJSON, MOCK_RESULT_CARTODB }; +module.exports = { DEFAULT_GEOJSON, ANTIMERIDIAN_GEOJSON, MOCK_RESULT_CARTODB }; diff --git a/app/test/e2e/v1/geostore-get.spec.js b/app/test/e2e/v1/geostore-get.spec.js index a029c5b..221b77d 100644 --- a/app/test/e2e/v1/geostore-get.spec.js +++ b/app/test/e2e/v1/geostore-get.spec.js @@ -4,7 +4,7 @@ const config = require('config'); const GeoStore = require('models/geoStore'); const { createRequest } = require('../utils/test-server'); -const { DEFAULT_GEOJSON } = require('../utils/test.constants'); +const { DEFAULT_GEOJSON, ANTIMERIDIAN_GEOJSON } = require('../utils/test.constants'); const { getUUID, ensureCorrectError, createGeostore } = require('../utils/utils'); chai.should(); @@ -62,7 +62,7 @@ describe('Geostore v1 tests - Get geostores', () => { }); it('Getting a geostore that crosses the antimeridian should give a bbox [position 0 and 2] from [-180, 180] to [0, 360] (happy case)', async () => { - const createdGeostore = await createGeostore(); + const createdGeostore = await createGeostore({}, ANTIMERIDIAN_GEOJSON); const response = await geostore.get(createdGeostore.hash); response.status.should.equal(200); @@ -77,13 +77,19 @@ describe('Geostore v1 tests - Get geostores', () => { const { geojson, bbox, hash } = data.attributes; const expectedGeojson = { - ...DEFAULT_GEOJSON, + ...ANTIMERIDIAN_GEOJSON, crs: {}, }; delete expectedGeojson.features[0].properties; geojson.should.deep.equal(expectedGeojson); bbox.should.instanceOf(Array); + bbox.should.deep.equal([ + -69.074821, + -19.780273, + -39.587517, + -4.488809 + ]); hash.should.equal(createdGeostore.hash); }); From ccc087a114a78486f34af236ac2faa9ce3d66421 Mon Sep 17 00:00:00 2001 From: Alicia Date: Tue, 14 Dec 2021 11:07:23 +0100 Subject: [PATCH 04/12] updated e2e tests correct bbox --- app/test/e2e/v1/geostore-get.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test/e2e/v1/geostore-get.spec.js b/app/test/e2e/v1/geostore-get.spec.js index 221b77d..3879c77 100644 --- a/app/test/e2e/v1/geostore-get.spec.js +++ b/app/test/e2e/v1/geostore-get.spec.js @@ -85,10 +85,10 @@ describe('Geostore v1 tests - Get geostores', () => { geojson.should.deep.equal(expectedGeojson); bbox.should.instanceOf(Array); bbox.should.deep.equal([ - -69.074821, - -19.780273, - -39.587517, - -4.488809 + 176.550292969, + -20.11783963, + 183.098144531, + -14.827991347 ]); hash.should.equal(createdGeostore.hash); }); From 830b6b213a0986fc39e075e9f2f62b8ef397b866 Mon Sep 17 00:00:00 2001 From: Alicia Date: Tue, 14 Dec 2021 11:14:19 +0100 Subject: [PATCH 05/12] updated e2e tests correct bbox for geometry --- app/test/e2e/v1/geostore-get.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test/e2e/v1/geostore-get.spec.js b/app/test/e2e/v1/geostore-get.spec.js index 3879c77..06aa3b8 100644 --- a/app/test/e2e/v1/geostore-get.spec.js +++ b/app/test/e2e/v1/geostore-get.spec.js @@ -85,10 +85,10 @@ describe('Geostore v1 tests - Get geostores', () => { geojson.should.deep.equal(expectedGeojson); bbox.should.instanceOf(Array); bbox.should.deep.equal([ - 176.550292969, - -20.11783963, - 183.098144531, - -14.827991347 + 176.55029296875, + -20.11783963049162, + 183.09814453125, + -14.827991347352068 ]); hash.should.equal(createdGeostore.hash); }); From 999265725a5082e932ff404d1caa95a057325450 Mon Sep 17 00:00:00 2001 From: Alicia Date: Tue, 14 Dec 2021 15:00:29 +0100 Subject: [PATCH 06/12] transverse location to -180,180 --- app/test/e2e/utils/test.constants.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/e2e/utils/test.constants.js b/app/test/e2e/utils/test.constants.js index 0891ace..d1ca300 100644 --- a/app/test/e2e/utils/test.constants.js +++ b/app/test/e2e/utils/test.constants.js @@ -37,11 +37,11 @@ const ANTIMERIDIAN_GEOJSON = { -20.11783963049162 ], [ - 183.09814453125, + -177.09814453125, -20.11783963049162 ], [ - 183.09814453125, + -177.09814453125, -14.827991347352068 ], [ From 1b1faa659f3bbc3015a1517e88447d569d011303 Mon Sep 17 00:00:00 2001 From: Alicia Date: Fri, 17 Dec 2021 21:19:37 +0100 Subject: [PATCH 07/12] proper bbox handeling based on rfc7946 spec --- app/src/services/geoStoreService.js | 74 +- app/src/services/geoStoreServiceV2.js | 4 +- app/src/validators/geoJSONValidator.js | 2 +- app/test/e2e/utils/test.constants.js | 22 +- app/test/e2e/v2/geostore-get.spec.js | 34 +- package.json | 8 +- yarn.lock | 2019 +++++++++++++++++------- 7 files changed, 1535 insertions(+), 628 deletions(-) diff --git a/app/src/services/geoStoreService.js b/app/src/services/geoStoreService.js index fda8d48..c3998c2 100644 --- a/app/src/services/geoStoreService.js +++ b/app/src/services/geoStoreService.js @@ -4,7 +4,7 @@ const GeoJSONConverter = require('converters/geoJSONConverter'); const md5 = require('md5'); const CartoDB = require('cartodb'); const IdConnection = require('models/idConnection'); -const turf = require('turf'); +const turf = require('@turf/turf'); const ProviderNotFound = require('errors/providerNotFound'); const GeoJSONNotFound = require('errors/geoJSONNotFound'); const UnknownGeometry = require('errors/unknownGeometry'); @@ -48,7 +48,19 @@ class GeoStoreService { logger.debug('Repair geoJSON geometry'); logger.debug('Generating query'); - const sql = `SELECT ST_AsGeoJson(ST_CollectionExtract(st_MakeValid(ST_GeomFromGeoJSON('${JSON.stringify(geojson)}')),${geometryType})) as geojson`; + /** + * Geometry repair tries to follow this steps: + * st_MakeValid: create a valid representation of a given invalid geometry + * https://postgis.net/docs/manual-dev/ST_MakeValid.html + * + * ST_CollectionExtract: ensure that the geometry is not a collection of different types + * + * In order to ensure a valid geojson representation based on rfc7946, we need to: + * ST_ForcePolygonCCW: ensure that the exterior ring is counterclockwise as per spec + * @todo: The geometry needs to enforce the antimeridian split rule over [-180,180] epsg:4326 + * geometries. + */ + const sql = `SELECT ST_AsGeoJson(ST_ForcePolygonCCW(ST_CollectionExtract(st_MakeValid(ST_GeomFromGeoJSON('${JSON.stringify(geojson)}')),${geometryType}))) as geojson`; if (process.env.NODE_ENV !== 'test' || sql.length < 2000) { logger.debug('SQL to repair geojson: %s', sql); @@ -152,21 +164,43 @@ class GeoStoreService { } } + /** + * @description check if the geometry overflows the [-180, -90, 180, 90] box + * @param {*} bbox + * @returns boolean + */ + static async overFlooded(bbox) { + return bbox[0] > 180 || bbox[2] > 180; + } + /** * @description: checks if a bbox crosses the antimeridian - * @param {Array} bbox + * this is a mirror of https://github.com/mapbox/carmen/blob/03fac2d7397ecdfcb4f0828fcfd9d8a54c845f21/lib/util/bbox.js#L59 + * @param {Array} bbox A bounding box array in the format [minX, minY, maxX, maxY] * @returns {Boolean} * */ - static async antimeridian(bbox) { + static async crossAntimeridian(feature, bbox) { logger.debug('Checking antimeridian'); - const west = bbox[0]; - const east = bbox[2]; - if (west > east) { - logger.debug('Antimeridian detected'); - return true; - } - return false; + + const westHemiBBox = [-180, -90, 0, 90]; + const eastHemiBBox = [0, -90, 180, 90]; + const bboxTotal = bbox || turf.bbox(feature); + + const clippedEastGeom = turf.bboxClip(feature, eastHemiBBox); + const clippedWestGeom = turf.bboxClip(feature, westHemiBBox); + + const bboxEast = turf.bbox(clippedEastGeom); + const bboxWest = turf.bbox(clippedWestGeom); + + const amBBox = [bboxEast[0], bboxTotal[1], bboxWest[2], bboxTotal[3]]; + const pmBBox = [bboxWest[0], bboxTotal[1], bboxEast[2], bboxTotal[3]]; + + const pmBBoxWidth = (bboxEast[2]) + Math.abs(bboxWest[0]); + const amBBoxWidth = (180 - bboxEast[0]) + (180 - Math.abs(bboxWest[2])); + const newBbox = (pmBBoxWidth > amBBoxWidth) ? amBBox : pmBBox; + + return newBbox; } /** @@ -175,25 +209,27 @@ class GeoStoreService { * @returns {Array} bbox with the antimeridian corrected */ static translateBBox(bbox) { - logger.debug('Converting bbox from [-180,180] to [0,360]'); - const newBBox = [bbox[0], bbox[1], 360 + bbox[2], bbox[3]]; + logger.debug('Converting bbox from [-180,180] to [0,360] for representation'); + const newBBox = [bbox[0], bbox[1], 360 - Math.abs(bbox[2]), bbox[3]]; return newBBox; } /** - * @description: Calculates a bbox. - * If a bbox that crosses the antimeridian will be transformed its + * @description: swap a bbox. If a bbox that crosses + * the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] * @param {geoStore} geoStore * @returns {bbox} * * */ static async swapBBox(geoStore) { - const bbox = await turf.bbox(geoStore.geojson); - const antimeridian = await GeoStoreService.antimeridian(bbox); - logger.info(bbox); - return antimeridian ? GeoStoreService.translateBBox(bbox) : bbox; + + const orgBbox = turf.bbox(geoStore.geojson); + const bbox = await turf.featureReduce(geoStore.geojson, + (previousValue, currentFeature) => GeoStoreService.crossAntimeridian(currentFeature, previousValue), + orgBbox); + return bbox[0] > bbox[2] ? GeoStoreService.translateBBox(bbox) : bbox; } diff --git a/app/src/services/geoStoreServiceV2.js b/app/src/services/geoStoreServiceV2.js index f0f2007..83325df 100644 --- a/app/src/services/geoStoreServiceV2.js +++ b/app/src/services/geoStoreServiceV2.js @@ -4,7 +4,7 @@ const GeoJSONConverter = require('converters/geoJSONConverter'); const md5 = require('md5'); const CartoDB = require('cartodb'); const IdConnection = require('models/idConnection'); -const turf = require('turf'); +const turf = require('@turf/turf'); const ProviderNotFound = require('errors/providerNotFound'); const GeoJSONNotFound = require('errors/geoJSONNotFound'); const UnknownGeometry = require('errors/unknownGeometry'); @@ -125,7 +125,7 @@ class GeoStoreServiceV2 { static async getNationalList() { logger.debug('[GeoStoreServiceV2 - getGeostoreByInfoProps] Obtaining national list from database'); const query = { - 'info.iso': { $gt: "" }, + 'info.iso': { $gt: '' }, 'info.id1': null }; const select = 'hash info.iso'; diff --git a/app/src/validators/geoJSONValidator.js b/app/src/validators/geoJSONValidator.js index 5a66fa6..7756bb5 100644 --- a/app/src/validators/geoJSONValidator.js +++ b/app/src/validators/geoJSONValidator.js @@ -1,5 +1,5 @@ /* eslint-disable func-names */ -const geojsonhint = require('geojsonhint'); +const geojsonhint = require('@mapbox/geojsonhint'); const koaValidate = require('koa-validate'); (function () { diff --git a/app/test/e2e/utils/test.constants.js b/app/test/e2e/utils/test.constants.js index d1ca300..730e670 100644 --- a/app/test/e2e/utils/test.constants.js +++ b/app/test/e2e/utils/test.constants.js @@ -33,24 +33,24 @@ const ANTIMERIDIAN_GEOJSON = { coordinates: [ [ [ - 176.55029296875, - -20.11783963049162 + 177.066650390625, + -20.663626054152797 ], [ - -177.09814453125, - -20.11783963049162 + -173.759765625, + -20.663626054152797 ], [ - -177.09814453125, - -14.827991347352068 + -173.759765625, + -13.218555949175457 ], [ - 176.55029296875, - -14.827991347352068 + 177.066650390625, + -13.218555949175457 ], [ - 176.55029296875, - -20.11783963049162 + 177.066650390625, + -20.663626054152797 ] ] ] @@ -59,7 +59,7 @@ const ANTIMERIDIAN_GEOJSON = { }; const MOCK_RESULT_CARTODB = [{ - geojson: '{"type":"MultiPolygon","coordinates":[[[[7.4134,43.7346],[7.4396,43.7492],[7.4179,43.7226],[7.4095,43.7299],[7.4134,43.7346]]]]}', + geojson: '{"type":"MultiPolygon","coordinates":[[[[7.4134,43.7346],[7.4095,43.7299],[7.4179,43.7226],[7.4396,43.7492],[7.4134,43.7346]]]]}', area_ha: 235.490994944, name: 'Monaco' }]; diff --git a/app/test/e2e/v2/geostore-get.spec.js b/app/test/e2e/v2/geostore-get.spec.js index a3d4663..7844ce7 100644 --- a/app/test/e2e/v2/geostore-get.spec.js +++ b/app/test/e2e/v2/geostore-get.spec.js @@ -4,7 +4,7 @@ const config = require('config'); const { createRequest } = require('../utils/test-server'); const { getUUID, createGeostore, ensureCorrectError } = require('../utils/utils'); -const { DEFAULT_GEOJSON } = require('../utils/test.constants'); +const { DEFAULT_GEOJSON, ANTIMERIDIAN_GEOJSON } = require('../utils/test.constants'); chai.should(); @@ -60,6 +60,38 @@ describe('Geostore v2 tests - Get geostores', () => { hash.should.equal(createdGeostore.hash); }); + it('Getting a geostore that crosses the antimeridian should give a bbox [position 0 and 2] from [-180, 180] to [0, 360] (happy case)', async () => { + const createdGeostore = await createGeostore({}, ANTIMERIDIAN_GEOJSON); + const response = await geostore.get(createdGeostore.hash); + + response.status.should.equal(200); + response.body.should.instanceOf(Object).and.have.property('data'); + + const { data } = response.body; + data.id.should.equal(createdGeostore.hash); + data.type.should.equal('geoStore'); + data.should.have.property('attributes').and.should.instanceOf(Object); + data.attributes.should.instanceOf(Object); + + const { geojson, bbox, hash } = data.attributes; + + const expectedGeojson = { + ...ANTIMERIDIAN_GEOJSON, + crs: {}, + }; + delete expectedGeojson.features[0].properties; + + geojson.should.deep.equal(expectedGeojson); + bbox.should.instanceOf(Array); + bbox.should.deep.equal([ + 176.55029296875, + -20.11783963049162, + 183.09814453125, + -14.827991347352068 + ]); + hash.should.equal(createdGeostore.hash); + }); + it('Getting geostore with format esri should return the result with esrijson (happy case)', async () => { const createdGeostore = await createGeostore(); const response = await geostore.get(createdGeostore.hash).query({ format: 'esri' }); diff --git a/package.json b/package.json index bba94d8..46cfdc3 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,9 @@ }, "homepage": "https://github.com/gfw-api/gfw-geostore-api#readme", "dependencies": { + "@mapbox/geojsonhint": "^3.0.1", "@octokit/rest": "^16.28.7", + "@turf/turf": "^6.5.0", "arcgis-to-geojson-utils": "^1.0.1", "bunyan": "1.7.1", "cartodb": "0.4.0", @@ -43,8 +45,6 @@ "co-sleep": "0.0.1", "config": "1.19.0", "country-data": "0.0.24", - "rw-api-microservice-node": "^3.4.1", - "geojsonhint": "1.2.0", "jsonapi-serializer": "^3.6.5", "koa": "^2.11.0", "koa-bodyparser": "^4.3.0", @@ -57,8 +57,8 @@ "md5": "2.1.0", "mongoose": "^5.9.14", "mustache": "^2.3.2", - "sleep": "^6.1.0", - "turf": "^3.0.11" + "rw-api-microservice-node": "^3.4.1", + "sleep": "^6.1.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index 5b79dfe..f84b0c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -163,6 +163,17 @@ dependencies: vary "^1.1.2" +"@mapbox/geojsonhint@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@mapbox/geojsonhint/-/geojsonhint-3.0.1.tgz#46eb0afbfb45915efb73650b90ac64dd8b2274ef" + integrity sha512-8BhaDcFnTGP9Z8gLWQfeOMMO4xWmJWN45ZITfjiatI5aP9rmRXTaF2ugvCAJQH+llWTuC+/V+c783ApVoSbnsQ== + dependencies: + concat-stream "^1.6.1" + jsonlint-lines "1.7.1" + minimist "^1.2.5" + vfile "^4.0.0" + vfile-reporter "^5.1.1" + "@octokit/auth-token@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" @@ -258,6 +269,1143 @@ dependencies: any-observable "^0.3.0" +"@turf/along@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/along/-/along-6.5.0.tgz#ab12eec58a14de60fe243a62d31a474f415c8fef" + integrity sha512-LLyWQ0AARqJCmMcIEAXF4GEu8usmd4Kbz3qk1Oy5HoRNpZX47+i5exQtmIWKdqJ1MMhW26fCTXgpsEs5zgJ5gw== + dependencies: + "@turf/bearing" "^6.5.0" + "@turf/destination" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/angle@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/angle/-/angle-6.5.0.tgz#985934171284e109d41e19ed48ad91cf9709a928" + integrity sha512-4pXMbWhFofJJAOvTMCns6N4C8CMd5Ih4O2jSAG9b3dDHakj3O4yN1+Zbm+NUei+eVEZ9gFeVp9svE3aMDenIkw== + dependencies: + "@turf/bearing" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/rhumb-bearing" "^6.5.0" + +"@turf/area@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/area/-/area-6.5.0.tgz#1d0d7aee01d8a4a3d4c91663ed35cc615f36ad56" + integrity sha512-xCZdiuojokLbQ+29qR6qoMD89hv+JAgWjLrwSEWL+3JV8IXKeNFl6XkEJz9HGkVpnXvQKJoRz4/liT+8ZZ5Jyg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/bbox-clip@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/bbox-clip/-/bbox-clip-6.5.0.tgz#8e07d51ef8c875f9490d5c8699a2e51918587c94" + integrity sha512-F6PaIRF8WMp8EmgU/Ke5B1Y6/pia14UAYB5TiBC668w5rVVjy5L8rTm/m2lEkkDMHlzoP9vNY4pxpNthE7rLcQ== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/bbox-polygon@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/bbox-polygon/-/bbox-polygon-6.5.0.tgz#f18128b012eedfa860a521d8f2b3779cc0801032" + integrity sha512-+/r0NyL1lOG3zKZmmf6L8ommU07HliP4dgYToMoTxqzsWzyLjaj/OzgQ8rBmv703WJX+aS6yCmLuIhYqyufyuw== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/bbox@*", "@turf/bbox@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/bbox/-/bbox-6.5.0.tgz#bec30a744019eae420dac9ea46fb75caa44d8dc5" + integrity sha512-RBbLaao5hXTYyyg577iuMtDB8ehxMlUqHEJiMs8jT1GHkFhr6sYre3lmLsPeYEi/ZKj5TP5tt7fkzNdJ4GIVyw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/bearing@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/bearing/-/bearing-6.5.0.tgz#462a053c6c644434bdb636b39f8f43fb0cd857b0" + integrity sha512-dxINYhIEMzgDOztyMZc20I7ssYVNEpSv04VbMo5YPQsqa80KO3TFvbuCahMsCAW5z8Tncc8dwBlEFrmRjJG33A== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/bezier-spline@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/bezier-spline/-/bezier-spline-6.5.0.tgz#d1b1764948b0fa3d9aa6e4895aebeba24048b11f" + integrity sha512-vokPaurTd4PF96rRgGVm6zYYC5r1u98ZsG+wZEv9y3kJTuJRX/O3xIY2QnTGTdbVmAJN1ouOsD0RoZYaVoXORQ== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/boolean-clockwise@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-clockwise/-/boolean-clockwise-6.5.0.tgz#34573ecc18f900080f00e4ff364631a8b1135794" + integrity sha512-45+C7LC5RMbRWrxh3Z0Eihsc8db1VGBO5d9BLTOAwU4jR6SgsunTfRWR16X7JUwIDYlCVEmnjcXJNi/kIU3VIw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/boolean-contains@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-contains/-/boolean-contains-6.5.0.tgz#f802e7432fb53109242d5bf57393ef2f53849bbf" + integrity sha512-4m8cJpbw+YQcKVGi8y0cHhBUnYT+QRfx6wzM4GI1IdtYH3p4oh/DOBJKrepQyiDzFDaNIjxuWXBh0ai1zVwOQQ== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/boolean-point-on-line" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/boolean-crosses@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-crosses/-/boolean-crosses-6.5.0.tgz#4a1981475b9d6e23b25721f9fb8ef20696ff1648" + integrity sha512-gvshbTPhAHporTlQwBJqyfW+2yV8q/mOTxG6PzRVl6ARsqNoqYQWkd4MLug7OmAqVyBzLK3201uAeBjxbGw0Ng== + dependencies: + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/line-intersect" "^6.5.0" + "@turf/polygon-to-line" "^6.5.0" + +"@turf/boolean-disjoint@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-disjoint/-/boolean-disjoint-6.5.0.tgz#e291d8f8f8cce7f7bb3c11e23059156a49afc5e4" + integrity sha512-rZ2ozlrRLIAGo2bjQ/ZUu4oZ/+ZjGvLkN5CKXSKBcu6xFO6k2bgqeM8a1836tAW+Pqp/ZFsTA5fZHsJZvP2D5g== + dependencies: + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/line-intersect" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/polygon-to-line" "^6.5.0" + +"@turf/boolean-equal@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-equal/-/boolean-equal-6.5.0.tgz#b1c0ce14e9d9fb7778cddcf22558c9f523fe9141" + integrity sha512-cY0M3yoLC26mhAnjv1gyYNQjn7wxIXmL2hBmI/qs8g5uKuC2hRWi13ydufE3k4x0aNRjFGlg41fjoYLwaVF+9Q== + dependencies: + "@turf/clean-coords" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + geojson-equality "0.1.6" + +"@turf/boolean-intersects@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-intersects/-/boolean-intersects-6.5.0.tgz#df2b831ea31a4574af6b2fefe391f097a926b9d6" + integrity sha512-nIxkizjRdjKCYFQMnml6cjPsDOBCThrt+nkqtSEcxkKMhAQj5OO7o2CecioNTaX8EayqwMGVKcsz27oP4mKPTw== + dependencies: + "@turf/boolean-disjoint" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/boolean-overlap@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-overlap/-/boolean-overlap-6.5.0.tgz#f27c85888c3665d42d613a91a83adf1657cd1385" + integrity sha512-8btMIdnbXVWUa1M7D4shyaSGxLRw6NjMcqKBcsTXcZdnaixl22k7ar7BvIzkaRYN3SFECk9VGXfLncNS3ckQUw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/line-intersect" "^6.5.0" + "@turf/line-overlap" "^6.5.0" + "@turf/meta" "^6.5.0" + geojson-equality "0.1.6" + +"@turf/boolean-parallel@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-parallel/-/boolean-parallel-6.5.0.tgz#4e8a9dafdccaf18aca95f1265a5eade3f330173f" + integrity sha512-aSHJsr1nq9e5TthZGZ9CZYeXklJyRgR5kCLm5X4urz7+MotMOp/LsGOsvKvK9NeUl9+8OUmfMn8EFTT8LkcvIQ== + dependencies: + "@turf/clean-coords" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/line-segment" "^6.5.0" + "@turf/rhumb-bearing" "^6.5.0" + +"@turf/boolean-point-in-polygon@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-6.5.0.tgz#6d2e9c89de4cd2e4365004c1e51490b7795a63cf" + integrity sha512-DtSuVFB26SI+hj0SjrvXowGTUCHlgevPAIsukssW6BG5MlNSBQAo70wpICBNJL6RjukXg8d2eXaAWuD/CqL00A== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/boolean-point-on-line@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-point-on-line/-/boolean-point-on-line-6.5.0.tgz#a8efa7bad88760676f395afb9980746bc5b376e9" + integrity sha512-A1BbuQ0LceLHvq7F/P7w3QvfpmZqbmViIUPHdNLvZimFNLo4e6IQunmzbe+8aSStH9QRZm3VOflyvNeXvvpZEQ== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/boolean-within@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/boolean-within/-/boolean-within-6.5.0.tgz#31a749d3be51065da8c470a1e5613f4d2efdee06" + integrity sha512-YQB3oU18Inx35C/LU930D36RAVe7LDXk1kWsQ8mLmuqYn9YdPsDQTMTkLJMhoQ8EbN7QTdy333xRQ4MYgToteQ== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/boolean-point-on-line" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/buffer@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/buffer/-/buffer-6.5.0.tgz#22bd0d05b4e1e73eaebc69b8f574a410ff704842" + integrity sha512-qeX4N6+PPWbKqp1AVkBVWFerGjMYMUyencwfnkCesoznU6qvfugFHNAngNqIBVnJjZ5n8IFyOf+akcxnrt9sNg== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/center" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/projection" "^6.5.0" + d3-geo "1.7.1" + turf-jsts "*" + +"@turf/center-mean@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/center-mean/-/center-mean-6.5.0.tgz#2dc329c003f8012ba9ae7812a61b5647e1ae86a2" + integrity sha512-AAX6f4bVn12pTVrMUiB9KrnV94BgeBKpyg3YpfnEbBpkN/znfVhL8dG8IxMAxAoSZ61Zt9WLY34HfENveuOZ7Q== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/center-median@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/center-median/-/center-median-6.5.0.tgz#1b68e3f288af47f76c247d6bf671f30d8c25c974" + integrity sha512-dT8Ndu5CiZkPrj15PBvslpuf01ky41DEYEPxS01LOxp5HOUHXp1oJxsPxvc+i/wK4BwccPNzU1vzJ0S4emd1KQ== + dependencies: + "@turf/center-mean" "^6.5.0" + "@turf/centroid" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/center-of-mass@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/center-of-mass/-/center-of-mass-6.5.0.tgz#f9e6988bc296b7f763a0137ad6095f54843cf06a" + integrity sha512-EWrriU6LraOfPN7m1jZi+1NLTKNkuIsGLZc2+Y8zbGruvUW+QV7K0nhf7iZWutlxHXTBqEXHbKue/o79IumAsQ== + dependencies: + "@turf/centroid" "^6.5.0" + "@turf/convex" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/center@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/center/-/center-6.5.0.tgz#3bcb6bffcb8ba147430cfea84aabaed5dbdd4f07" + integrity sha512-T8KtMTfSATWcAX088rEDKjyvQCBkUsLnK/Txb6/8WUXIeOZyHu42G7MkdkHRoHtwieLdduDdmPLFyTdG5/e7ZQ== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/centroid@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/centroid/-/centroid-6.5.0.tgz#ecaa365412e5a4d595bb448e7dcdacfb49eb0009" + integrity sha512-MwE1oq5E3isewPprEClbfU5pXljIK/GUOMbn22UM3IFPDJX0KeoyLNwghszkdmFp/qMGL/M13MMWvU+GNLXP/A== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/circle@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/circle/-/circle-6.5.0.tgz#dc017d8c0131d1d212b7c06f76510c22bbeb093c" + integrity sha512-oU1+Kq9DgRnoSbWFHKnnUdTmtcRUMmHoV9DjTXu9vOLNV5OWtAAh1VZ+mzsioGGzoDNT/V5igbFOkMfBQc0B6A== + dependencies: + "@turf/destination" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/clean-coords@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/clean-coords/-/clean-coords-6.5.0.tgz#6690adf764ec4b649710a8a20dab7005efbea53f" + integrity sha512-EMX7gyZz0WTH/ET7xV8MyrExywfm9qUi0/MY89yNffzGIEHuFfqwhcCqZ8O00rZIPZHUTxpmsxQSTfzJJA1CPw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/clone@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/clone/-/clone-6.5.0.tgz#895860573881ae10a02dfff95f274388b1cda51a" + integrity sha512-mzVtTFj/QycXOn6ig+annKrM6ZlimreKYz6f/GSERytOpgzodbQyOgkfwru100O1KQhhjSudKK4DsQ0oyi9cTw== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/clusters-dbscan@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/clusters-dbscan/-/clusters-dbscan-6.5.0.tgz#e01f854d24fac4899009fc6811854424ea8f0985" + integrity sha512-SxZEE4kADU9DqLRiT53QZBBhu8EP9skviSyl+FGj08Y01xfICM/RR9ACUdM0aEQimhpu+ZpRVcUK+2jtiCGrYQ== + dependencies: + "@turf/clone" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + density-clustering "1.3.0" + +"@turf/clusters-kmeans@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/clusters-kmeans/-/clusters-kmeans-6.5.0.tgz#aca6f66858af6476b7352a2bbbb392f9ddb7f5b4" + integrity sha512-DwacD5+YO8kwDPKaXwT9DV46tMBVNsbi1IzdajZu1JDSWoN7yc7N9Qt88oi+p30583O0UPVkAK+A10WAQv4mUw== + dependencies: + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + skmeans "0.9.7" + +"@turf/clusters@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/clusters/-/clusters-6.5.0.tgz#a5ee7b62cdf345db2f1eafe2eb382adc186163e1" + integrity sha512-Y6gfnTJzQ1hdLfCsyd5zApNbfLIxYEpmDibHUqR5z03Lpe02pa78JtgrgUNt1seeO/aJ4TG1NLN8V5gOrHk04g== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/collect@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/collect/-/collect-6.5.0.tgz#3749ca7d4b91fbcbe1b9b8858ed70df8b6290910" + integrity sha512-4dN/T6LNnRg099m97BJeOcTA5fSI8cu87Ydgfibewd2KQwBexO69AnjEFqfPX3Wj+Zvisj1uAVIZbPmSSrZkjg== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/helpers" "^6.5.0" + rbush "2.x" + +"@turf/combine@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/combine/-/combine-6.5.0.tgz#e0f3468ac9c09c24fa7184ebbd8a79d2e595ef81" + integrity sha512-Q8EIC4OtAcHiJB3C4R+FpB4LANiT90t17uOd851qkM2/o6m39bfN5Mv0PWqMZIHWrrosZqRqoY9dJnzz/rJxYQ== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/concave@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/concave/-/concave-6.5.0.tgz#19ab1a3f04087c478cebc5e631293f3eeb2e7ce4" + integrity sha512-I/sUmUC8TC5h/E2vPwxVht+nRt+TnXIPRoztDFvS8/Y0+cBDple9inLSo9nnPXMXidrBlGXZ9vQx/BjZUJgsRQ== + dependencies: + "@turf/clone" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/tin" "^6.5.0" + topojson-client "3.x" + topojson-server "3.x" + +"@turf/convex@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/convex/-/convex-6.5.0.tgz#a7613e0d3795e2f5b9ce79a39271e86f54a3d354" + integrity sha512-x7ZwC5z7PJB0SBwNh7JCeCNx7Iu+QSrH7fYgK0RhhNop13TqUlvHMirMLRgf2db1DqUetrAO2qHJeIuasquUWg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + concaveman "*" + +"@turf/destination@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/destination/-/destination-6.5.0.tgz#30a84702f9677d076130e0440d3223ae503fdae1" + integrity sha512-4cnWQlNC8d1tItOz9B4pmJdWpXqS0vEvv65bI/Pj/genJnsL7evI0/Xw42RvEGROS481MPiU80xzvwxEvhQiMQ== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/difference@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/difference/-/difference-6.5.0.tgz#677b0d5641a93bba2e82f2c683f0d880105b3197" + integrity sha512-l8iR5uJqvI+5Fs6leNbhPY5t/a3vipUF/3AeVLpwPQcgmedNXyheYuy07PcMGH5Jdpi5gItOiTqwiU/bUH4b3A== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + polygon-clipping "^0.15.3" + +"@turf/dissolve@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/dissolve/-/dissolve-6.5.0.tgz#65debed7ef185087d842b450ebd01e81cc2e80f6" + integrity sha512-WBVbpm9zLTp0Bl9CE35NomTaOL1c4TQCtEoO43YaAhNEWJOOIhZMFJyr8mbvYruKl817KinT3x7aYjjCMjTAsQ== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + polygon-clipping "^0.15.3" + +"@turf/distance-weight@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/distance-weight/-/distance-weight-6.5.0.tgz#fe1fb45b5ae5ca4e09a898cb0a15c6c79ed0849e" + integrity sha512-a8qBKkgVNvPKBfZfEJZnC3DV7dfIsC3UIdpRci/iap/wZLH41EmS90nM+BokAJflUHYy8PqE44wySGWHN1FXrQ== + dependencies: + "@turf/centroid" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/distance@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/distance/-/distance-6.5.0.tgz#21f04d5f86e864d54e2abde16f35c15b4f36149a" + integrity sha512-xzykSLfoURec5qvQJcfifw/1mJa+5UwByZZ5TZ8iaqjGYN0vomhV9aiSLeYdUGtYRESZ+DYC/OzY+4RclZYgMg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/ellipse@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/ellipse/-/ellipse-6.5.0.tgz#1e20cc9eb968f35ab891572892a0bffcef5e552a" + integrity sha512-kuXtwFviw/JqnyJXF1mrR/cb496zDTSbGKtSiolWMNImYzGGkbsAsFTjwJYgD7+4FixHjp0uQPzo70KDf3AIBw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/rhumb-destination" "^6.5.0" + "@turf/transform-rotate" "^6.5.0" + +"@turf/envelope@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/envelope/-/envelope-6.5.0.tgz#73e81b9b7ed519bd8a614d36322d6f9fbeeb0579" + integrity sha512-9Z+FnBWvOGOU4X+fMZxYFs1HjFlkKqsddLuMknRaqcJd6t+NIv5DWvPtDL8ATD2GEExYDiFLwMdckfr1yqJgHA== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/bbox-polygon" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/explode@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/explode/-/explode-6.5.0.tgz#02c292cc143dd629643da5b70bb5b19b9f0f1c6b" + integrity sha512-6cSvMrnHm2qAsace6pw9cDmK2buAlw8+tjeJVXMfMyY+w7ZUi1rprWMsY92J7s2Dar63Bv09n56/1V7+tcj52Q== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/flatten@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/flatten/-/flatten-6.5.0.tgz#0bd26161f4f1759bbad6ba9485e8ee65f3fa72a7" + integrity sha512-IBZVwoNLVNT6U/bcUUllubgElzpMsNoCw8tLqBw6dfYg9ObGmpEjf9BIYLr7a2Yn5ZR4l7YIj2T7kD5uJjZADQ== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/flip@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/flip/-/flip-6.5.0.tgz#04b38eae8a78f2cf9240140b25401b16b37d20e2" + integrity sha512-oyikJFNjt2LmIXQqgOGLvt70RgE2lyzPMloYWM7OR5oIFGRiBvqVD2hA6MNw6JewIm30fWZ8DQJw1NHXJTJPbg== + dependencies: + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/great-circle@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/great-circle/-/great-circle-6.5.0.tgz#2daccbdd1c609a13b00d566ea0ad95457cfc87c2" + integrity sha512-7ovyi3HaKOXdFyN7yy1yOMa8IyOvV46RC1QOQTT+RYUN8ke10eyqExwBpL9RFUPvlpoTzoYbM/+lWPogQlFncg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/helpers@6.x", "@turf/helpers@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/helpers/-/helpers-6.5.0.tgz#f79af094bd6b8ce7ed2bd3e089a8493ee6cae82e" + integrity sha512-VbI1dV5bLFzohYYdgqwikdMVpe7pJ9X3E+dlr425wa2/sMJqYDhTO++ec38/pcPvPE6oD9WEEeU3Xu3gza+VPw== + +"@turf/hex-grid@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/hex-grid/-/hex-grid-6.5.0.tgz#aa5ee46e291839d4405db74b7516c6da89ee56f7" + integrity sha512-Ln3tc2tgZT8etDOldgc6e741Smg1CsMKAz1/Mlel+MEL5Ynv2mhx3m0q4J9IB1F3a4MNjDeVvm8drAaf9SF33g== + dependencies: + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/intersect" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/interpolate@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/interpolate/-/interpolate-6.5.0.tgz#9120def5d4498dd7b7d5e92a263aac3e1fd92886" + integrity sha512-LSH5fMeiGyuDZ4WrDJNgh81d2DnNDUVJtuFryJFup8PV8jbs46lQGfI3r1DJ2p1IlEJIz3pmAZYeTfMMoeeohw== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/centroid" "^6.5.0" + "@turf/clone" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/hex-grid" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/point-grid" "^6.5.0" + "@turf/square-grid" "^6.5.0" + "@turf/triangle-grid" "^6.5.0" + +"@turf/intersect@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/intersect/-/intersect-6.5.0.tgz#a14e161ddd0264d0f07ac4e325553c70c421f9e6" + integrity sha512-2legGJeKrfFkzntcd4GouPugoqPUjexPZnOvfez+3SfIMrHvulw8qV8u7pfVyn2Yqs53yoVCEjS5sEpvQ5YRQg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + polygon-clipping "^0.15.3" + +"@turf/invariant@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/invariant/-/invariant-6.5.0.tgz#970afc988023e39c7ccab2341bd06979ddc7463f" + integrity sha512-Wv8PRNCtPD31UVbdJE/KVAWKe7l6US+lJItRR/HOEW3eh+U/JwRCSUl/KZ7bmjM/C+zLNoreM2TU6OoLACs4eg== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/isobands@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/isobands/-/isobands-6.5.0.tgz#5e0929d9d8d53147074a5cfe4533768782e2a2ce" + integrity sha512-4h6sjBPhRwMVuFaVBv70YB7eGz+iw0bhPRnp+8JBdX1UPJSXhoi/ZF2rACemRUr0HkdVB/a1r9gC32vn5IAEkw== + dependencies: + "@turf/area" "^6.5.0" + "@turf/bbox" "^6.5.0" + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/explode" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + object-assign "*" + +"@turf/isolines@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/isolines/-/isolines-6.5.0.tgz#3435c7cb5a79411207a5657aa4095357cfd35831" + integrity sha512-6ElhiLCopxWlv4tPoxiCzASWt/jMRvmp6mRYrpzOm3EUl75OhHKa/Pu6Y9nWtCMmVC/RcWtiiweUocbPLZLm0A== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + object-assign "*" + +"@turf/kinks@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/kinks/-/kinks-6.5.0.tgz#80e7456367535365012f658cf1a988b39a2c920b" + integrity sha512-ViCngdPt1eEL7hYUHR2eHR662GvCgTc35ZJFaNR6kRtr6D8plLaDju0FILeFFWSc+o8e3fwxZEJKmFj9IzPiIQ== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/length@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/length/-/length-6.5.0.tgz#ff4e9072d5f997e1c32a1311d214d184463f83fa" + integrity sha512-5pL5/pnw52fck3oRsHDcSGrj9HibvtlrZ0QNy2OcW8qBFDNgZ4jtl6U7eATVoyWPKBHszW3dWETW+iLV7UARig== + dependencies: + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/line-arc@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-arc/-/line-arc-6.5.0.tgz#5ca35516ccf1f3a01149889d9facb39a77b07431" + integrity sha512-I6c+V6mIyEwbtg9P9zSFF89T7QPe1DPTG3MJJ6Cm1MrAY0MdejwQKOpsvNl8LDU2ekHOlz2kHpPVR7VJsoMllA== + dependencies: + "@turf/circle" "^6.5.0" + "@turf/destination" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/line-chunk@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-chunk/-/line-chunk-6.5.0.tgz#02cefa74564b9cf533a3ac8a5109c97cb7170d10" + integrity sha512-i1FGE6YJaaYa+IJesTfyRRQZP31QouS+wh/pa6O3CC0q4T7LtHigyBSYjrbjSLfn2EVPYGlPCMFEqNWCOkC6zg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/length" "^6.5.0" + "@turf/line-slice-along" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/line-intersect@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-intersect/-/line-intersect-6.5.0.tgz#dea48348b30c093715d2195d2dd7524aee4cf020" + integrity sha512-CS6R1tZvVQD390G9Ea4pmpM6mJGPWoL82jD46y0q1KSor9s6HupMIo1kY4Ny+AEYQl9jd21V3Scz20eldpbTVA== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/line-segment" "^6.5.0" + "@turf/meta" "^6.5.0" + geojson-rbush "3.x" + +"@turf/line-offset@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-offset/-/line-offset-6.5.0.tgz#2bbd8fcf9ff82009b72890863da444b190e53689" + integrity sha512-CEXZbKgyz8r72qRvPchK0dxqsq8IQBdH275FE6o4MrBkzMcoZsfSjghtXzKaz9vvro+HfIXal0sTk2mqV1lQTw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/line-overlap@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-overlap/-/line-overlap-6.5.0.tgz#10ebb805c2d047463379fc1f997785fa8f3f4cc1" + integrity sha512-xHOaWLd0hkaC/1OLcStCpfq55lPHpPNadZySDXYiYjEz5HXr1oKmtMYpn0wGizsLwrOixRdEp+j7bL8dPt4ojQ== + dependencies: + "@turf/boolean-point-on-line" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/line-segment" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/nearest-point-on-line" "^6.5.0" + deep-equal "1.x" + geojson-rbush "3.x" + +"@turf/line-segment@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-segment/-/line-segment-6.5.0.tgz#ee73f3ffcb7c956203b64ed966d96af380a4dd65" + integrity sha512-jI625Ho4jSuJESNq66Mmi290ZJ5pPZiQZruPVpmHkUw257Pew0alMmb6YrqYNnLUuiVVONxAAKXUVeeUGtycfw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/line-slice-along@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-slice-along/-/line-slice-along-6.5.0.tgz#6e7a861d72c6f80caba2c4418b69a776f0292953" + integrity sha512-KHJRU6KpHrAj+BTgTNqby6VCTnDzG6a1sJx/I3hNvqMBLvWVA2IrkR9L9DtsQsVY63IBwVdQDqiwCuZLDQh4Ng== + dependencies: + "@turf/bearing" "^6.5.0" + "@turf/destination" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/line-slice@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-slice/-/line-slice-6.5.0.tgz#7b6e0c8e8e93fdb4e65c3b9a123a2ec93a21bdb0" + integrity sha512-vDqJxve9tBHhOaVVFXqVjF5qDzGtKWviyjbyi2QnSnxyFAmLlLnBfMX8TLQCAf2GxHibB95RO5FBE6I2KVPRuw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/nearest-point-on-line" "^6.5.0" + +"@turf/line-split@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-split/-/line-split-6.5.0.tgz#116d7fbf714457878225187f5820ef98db7b02c2" + integrity sha512-/rwUMVr9OI2ccJjw7/6eTN53URtGThNSD5I0GgxyFXMtxWiloRJ9MTff8jBbtPWrRka/Sh2GkwucVRAEakx9Sw== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/line-intersect" "^6.5.0" + "@turf/line-segment" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/nearest-point-on-line" "^6.5.0" + "@turf/square" "^6.5.0" + "@turf/truncate" "^6.5.0" + geojson-rbush "3.x" + +"@turf/line-to-polygon@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/line-to-polygon/-/line-to-polygon-6.5.0.tgz#c919a03064a1cd5cef4c4e4d98dc786e12ffbc89" + integrity sha512-qYBuRCJJL8Gx27OwCD1TMijM/9XjRgXH/m/TyuND4OXedBpIWlK5VbTIO2gJ8OCfznBBddpjiObLBrkuxTpN4Q== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/mask@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/mask/-/mask-6.5.0.tgz#a97f355ee071ac60d8d3782ae39e5bb4b4e26857" + integrity sha512-RQha4aU8LpBrmrkH8CPaaoAfk0Egj5OuXtv6HuCQnHeGNOQt3TQVibTA3Sh4iduq4EPxnZfDjgsOeKtrCA19lg== + dependencies: + "@turf/helpers" "^6.5.0" + polygon-clipping "^0.15.3" + +"@turf/meta@6.x", "@turf/meta@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/meta/-/meta-6.5.0.tgz#b725c3653c9f432133eaa04d3421f7e51e0418ca" + integrity sha512-RrArvtsV0vdsCBegoBtOalgdSOfkBrTJ07VkpiCnq/491W67hnMWmDu7e6Ztw0C3WldRYTXkg3SumfdzZxLBHA== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/midpoint@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/midpoint/-/midpoint-6.5.0.tgz#5f9428959309feccaf3f55873a8de70d4121bdce" + integrity sha512-MyTzV44IwmVI6ec9fB2OgZ53JGNlgOpaYl9ArKoF49rXpL84F9rNATndbe0+MQIhdkw8IlzA6xVP4lZzfMNVCw== + dependencies: + "@turf/bearing" "^6.5.0" + "@turf/destination" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/moran-index@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/moran-index/-/moran-index-6.5.0.tgz#456264bfb014a7b5f527807c9dcf25df3c6b2efd" + integrity sha512-ItsnhrU2XYtTtTudrM8so4afBCYWNaB0Mfy28NZwLjB5jWuAsvyV+YW+J88+neK/ougKMTawkmjQqodNJaBeLQ== + dependencies: + "@turf/distance-weight" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/nearest-point-on-line@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/nearest-point-on-line/-/nearest-point-on-line-6.5.0.tgz#8e1cd2cdc0b5acaf4c8d8b3b33bb008d3cb99e7b" + integrity sha512-WthrvddddvmymnC+Vf7BrkHGbDOUu6Z3/6bFYUGv1kxw8tiZ6n83/VG6kHz4poHOfS0RaNflzXSkmCi64fLBlg== + dependencies: + "@turf/bearing" "^6.5.0" + "@turf/destination" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/line-intersect" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/nearest-point-to-line@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/nearest-point-to-line/-/nearest-point-to-line-6.5.0.tgz#5549b48690d523f9af4765fe64a3cbebfbc6bb75" + integrity sha512-PXV7cN0BVzUZdjj6oeb/ESnzXSfWmEMrsfZSDRgqyZ9ytdiIj/eRsnOXLR13LkTdXVOJYDBuf7xt1mLhM4p6+Q== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/point-to-line-distance" "^6.5.0" + object-assign "*" + +"@turf/nearest-point@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/nearest-point/-/nearest-point-6.5.0.tgz#2f1781c26ff3f054005d4ff352042973318b92f1" + integrity sha512-fguV09QxilZv/p94s8SMsXILIAMiaXI5PATq9d7YWijLxWUj6Q/r43kxyoi78Zmwwh1Zfqz9w+bCYUAxZ5+euA== + dependencies: + "@turf/clone" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/planepoint@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/planepoint/-/planepoint-6.5.0.tgz#5cb788670c31a6b064ae464180d51b4d550d87de" + integrity sha512-R3AahA6DUvtFbka1kcJHqZ7DMHmPXDEQpbU5WaglNn7NaCQg9HB0XM0ZfqWcd5u92YXV+Gg8QhC8x5XojfcM4Q== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/point-grid@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/point-grid/-/point-grid-6.5.0.tgz#f628d30afe29d60dcbf54b195e46eab48a4fbfaa" + integrity sha512-Iq38lFokNNtQJnOj/RBKmyt6dlof0yhaHEDELaWHuECm1lIZLY3ZbVMwbs+nXkwTAHjKfS/OtMheUBkw+ee49w== + dependencies: + "@turf/boolean-within" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/point-on-feature@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/point-on-feature/-/point-on-feature-6.5.0.tgz#37d07afeb31896e53c0833aa404993ba7d500f0c" + integrity sha512-bDpuIlvugJhfcF/0awAQ+QI6Om1Y1FFYE8Y/YdxGRongivix850dTeXCo0mDylFdWFPGDo7Mmh9Vo4VxNwW/TA== + dependencies: + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/center" "^6.5.0" + "@turf/explode" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/nearest-point" "^6.5.0" + +"@turf/point-to-line-distance@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/point-to-line-distance/-/point-to-line-distance-6.5.0.tgz#bc46fe09ea630aaf73f13c40b38a7df79050fff8" + integrity sha512-opHVQ4vjUhNBly1bob6RWy+F+hsZDH9SA0UW36pIRzfpu27qipU18xup0XXEePfY6+wvhF6yL/WgCO2IbrLqEA== + dependencies: + "@turf/bearing" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/projection" "^6.5.0" + "@turf/rhumb-bearing" "^6.5.0" + "@turf/rhumb-distance" "^6.5.0" + +"@turf/points-within-polygon@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/points-within-polygon/-/points-within-polygon-6.5.0.tgz#d49f4d7cf19b7a440bf1e06f771ff4e1df13107f" + integrity sha512-YyuheKqjliDsBDt3Ho73QVZk1VXX1+zIA2gwWvuz8bR1HXOkcuwk/1J76HuFMOQI3WK78wyAi+xbkx268PkQzQ== + dependencies: + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/polygon-smooth@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/polygon-smooth/-/polygon-smooth-6.5.0.tgz#00ca366871cb6ea3bee44ff3ea870aaf75711733" + integrity sha512-LO/X/5hfh/Rk4EfkDBpLlVwt3i6IXdtQccDT9rMjXEP32tRgy0VMFmdkNaXoGlSSKf/1mGqLl4y4wHd86DqKbg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/polygon-tangents@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/polygon-tangents/-/polygon-tangents-6.5.0.tgz#dc025202727ba2f3347baa95dbca4e0ffdb2ddf5" + integrity sha512-sB4/IUqJMYRQH9jVBwqS/XDitkEfbyqRy+EH/cMRJURTg78eHunvJ708x5r6umXsbiUyQU4eqgPzEylWEQiunw== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/boolean-within" "^6.5.0" + "@turf/explode" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/nearest-point" "^6.5.0" + +"@turf/polygon-to-line@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/polygon-to-line/-/polygon-to-line-6.5.0.tgz#4dc86db66168b32bb83ce448cf966208a447d952" + integrity sha512-5p4n/ij97EIttAq+ewSnKt0ruvuM+LIDzuczSzuHTpq4oS7Oq8yqg5TQ4nzMVuK41r/tALCk7nAoBuw3Su4Gcw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/polygonize@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/polygonize/-/polygonize-6.5.0.tgz#8aa0f1e386e96c533a320c426aaf387020320fa3" + integrity sha512-a/3GzHRaCyzg7tVYHo43QUChCspa99oK4yPqooVIwTC61npFzdrmnywMv0S+WZjHZwK37BrFJGFrZGf6ocmY5w== + dependencies: + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/envelope" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/projection@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/projection/-/projection-6.5.0.tgz#d2aad862370bf03f2270701115464a8406c144b2" + integrity sha512-/Pgh9mDvQWWu8HRxqpM+tKz8OzgauV+DiOcr3FCjD6ubDnrrmMJlsf6fFJmggw93mtVPrZRL6yyi9aYCQBOIvg== + dependencies: + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/random@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/random/-/random-6.5.0.tgz#b19672cf4549557660034d4a303911656df7747e" + integrity sha512-8Q25gQ/XbA7HJAe+eXp4UhcXM9aOOJFaxZ02+XSNwMvY8gtWSCBLVqRcW4OhqilgZ8PeuQDWgBxeo+BIqqFWFQ== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/rectangle-grid@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/rectangle-grid/-/rectangle-grid-6.5.0.tgz#c3ef38e8cfdb763012beb1f22e2b77288a37a5cf" + integrity sha512-yQZ/1vbW68O2KsSB3OZYK+72aWz/Adnf7m2CMKcC+aq6TwjxZjAvlbCOsNUnMAuldRUVN1ph6RXMG4e9KEvKvg== + dependencies: + "@turf/boolean-intersects" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/rewind@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/rewind/-/rewind-6.5.0.tgz#bc0088f8ec56f00c8eacd902bbe51e3786cb73a0" + integrity sha512-IoUAMcHWotBWYwSYuYypw/LlqZmO+wcBpn8ysrBNbazkFNkLf3btSDZMkKJO/bvOzl55imr/Xj4fi3DdsLsbzQ== + dependencies: + "@turf/boolean-clockwise" "^6.5.0" + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/rhumb-bearing@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/rhumb-bearing/-/rhumb-bearing-6.5.0.tgz#8c41ad62b44fb4e57c14fe790488056684eee7b9" + integrity sha512-jMyqiMRK4hzREjQmnLXmkJ+VTNTx1ii8vuqRwJPcTlKbNWfjDz/5JqJlb5NaFDcdMpftWovkW5GevfnuzHnOYA== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/rhumb-destination@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/rhumb-destination/-/rhumb-destination-6.5.0.tgz#12da8c85e674b182e8b0ec8ea9c5fe2186716dae" + integrity sha512-RHNP1Oy+7xTTdRrTt375jOZeHceFbjwohPHlr9Hf68VdHHPMAWgAKqiX2YgSWDcvECVmiGaBKWus1Df+N7eE4Q== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/rhumb-distance@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/rhumb-distance/-/rhumb-distance-6.5.0.tgz#ed068004b1469512b857070fbf5cb7b7eabbe592" + integrity sha512-oKp8KFE8E4huC2Z1a1KNcFwjVOqa99isxNOwfo4g3SUABQ6NezjKDDrnvC4yI5YZ3/huDjULLBvhed45xdCrzg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/sample@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/sample/-/sample-6.5.0.tgz#00cca024514989448e57fb1bf34e9a33ed3f0755" + integrity sha512-kSdCwY7el15xQjnXYW520heKUrHwRvnzx8ka4eYxX9NFeOxaFITLW2G7UtXb6LJK8mmPXI8Aexv23F2ERqzGFg== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/sector@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/sector/-/sector-6.5.0.tgz#599a87ebbe6ee613b4e04c5928e0ef1fc78fc16c" + integrity sha512-cYUOkgCTWqa23SOJBqxoFAc/yGCUsPRdn/ovbRTn1zNTm/Spmk6hVB84LCKOgHqvSF25i0d2kWqpZDzLDdAPbw== + dependencies: + "@turf/circle" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/line-arc" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/shortest-path@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/shortest-path/-/shortest-path-6.5.0.tgz#e1fdf9b4758bd20caf845fdc03d0dc2eede2ff0e" + integrity sha512-4de5+G7+P4hgSoPwn+SO9QSi9HY5NEV/xRJ+cmoFVRwv2CDsuOPDheHKeuIAhKyeKDvPvPt04XYWbac4insJMg== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/bbox-polygon" "^6.5.0" + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/clean-coords" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/transform-scale" "^6.5.0" + +"@turf/simplify@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/simplify/-/simplify-6.5.0.tgz#ec435460bde0985b781618b05d97146c32c8bc16" + integrity sha512-USas3QqffPHUY184dwQdP8qsvcVH/PWBYdXY5am7YTBACaQOMAlf6AKJs9FT8jiO6fQpxfgxuEtwmox+pBtlOg== + dependencies: + "@turf/clean-coords" "^6.5.0" + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/square-grid@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/square-grid/-/square-grid-6.5.0.tgz#3a517301b42ed98aa62d727786dc5290998ddbae" + integrity sha512-mlR0ayUdA+L4c9h7p4k3pX6gPWHNGuZkt2c5II1TJRmhLkW2557d6b/Vjfd1z9OVaajb1HinIs1FMSAPXuuUrA== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/rectangle-grid" "^6.5.0" + +"@turf/square@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/square/-/square-6.5.0.tgz#ab43eef99d39c36157ab5b80416bbeba1f6b2122" + integrity sha512-BM2UyWDmiuHCadVhHXKIx5CQQbNCpOxB6S/aCNOCLbhCeypKX5Q0Aosc5YcmCJgkwO5BERCC6Ee7NMbNB2vHmQ== + dependencies: + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/standard-deviational-ellipse@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-6.5.0.tgz#775c7b9a2be6546bf64ea8ac08cdcd80563f2935" + integrity sha512-02CAlz8POvGPFK2BKK8uHGUk/LXb0MK459JVjKxLC2yJYieOBTqEbjP0qaWhiBhGzIxSMaqe8WxZ0KvqdnstHA== + dependencies: + "@turf/center-mean" "^6.5.0" + "@turf/ellipse" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/points-within-polygon" "^6.5.0" + +"@turf/tag@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/tag/-/tag-6.5.0.tgz#13eae85f36f9fd8c4e076714a894cb5b7716d381" + integrity sha512-XwlBvrOV38CQsrNfrxvBaAPBQgXMljeU0DV8ExOyGM7/hvuGHJw3y8kKnQ4lmEQcmcrycjDQhP7JqoRv8vFssg== + dependencies: + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/tesselate@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/tesselate/-/tesselate-6.5.0.tgz#de45b778f8e6a45535d8eb2aacea06f86c6b73fb" + integrity sha512-M1HXuyZFCfEIIKkglh/r5L9H3c5QTEsnMBoZOFQiRnGPGmJWcaBissGb7mTFX2+DKE7FNWXh4TDnZlaLABB0dQ== + dependencies: + "@turf/helpers" "^6.5.0" + earcut "^2.0.0" + +"@turf/tin@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/tin/-/tin-6.5.0.tgz#b77bebb48237e6613ac6bc0e37a6658be8c17a09" + integrity sha512-YLYikRzKisfwj7+F+Tmyy/LE3d2H7D4kajajIfc9mlik2+esG7IolsX/+oUz1biguDYsG0DUA8kVYXDkobukfg== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/transform-rotate@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/transform-rotate/-/transform-rotate-6.5.0.tgz#e50e96a8779af91d58149eedb00ffd7f6395c804" + integrity sha512-A2Ip1v4246ZmpssxpcL0hhiVBEf4L8lGnSPWTgSv5bWBEoya2fa/0SnFX9xJgP40rMP+ZzRaCN37vLHbv1Guag== + dependencies: + "@turf/centroid" "^6.5.0" + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/rhumb-bearing" "^6.5.0" + "@turf/rhumb-destination" "^6.5.0" + "@turf/rhumb-distance" "^6.5.0" + +"@turf/transform-scale@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/transform-scale/-/transform-scale-6.5.0.tgz#dcccd8b0f139de32e32225a29c107a1279137120" + integrity sha512-VsATGXC9rYM8qTjbQJ/P7BswKWXHdnSJ35JlV4OsZyHBMxJQHftvmZJsFbOqVtQnIQIzf2OAly6rfzVV9QLr7g== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/center" "^6.5.0" + "@turf/centroid" "^6.5.0" + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/rhumb-bearing" "^6.5.0" + "@turf/rhumb-destination" "^6.5.0" + "@turf/rhumb-distance" "^6.5.0" + +"@turf/transform-translate@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/transform-translate/-/transform-translate-6.5.0.tgz#631b13aca6402898029e03fc2d1f4bc1c667fc3e" + integrity sha512-NABLw5VdtJt/9vSstChp93pc6oel4qXEos56RBMsPlYB8hzNTEKYtC146XJvyF4twJeeYS8RVe1u7KhoFwEM5w== + dependencies: + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/rhumb-destination" "^6.5.0" + +"@turf/triangle-grid@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/triangle-grid/-/triangle-grid-6.5.0.tgz#75664e8b9d9c7ca4c845673134a1e0d82b5e6887" + integrity sha512-2jToUSAS1R1htq4TyLQYPTIsoy6wg3e3BQXjm2rANzw4wPQCXGOxrur1Fy9RtzwqwljlC7DF4tg0OnWr8RjmfA== + dependencies: + "@turf/distance" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/intersect" "^6.5.0" + +"@turf/truncate@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/truncate/-/truncate-6.5.0.tgz#c3a16cad959f1be1c5156157d5555c64b19185d8" + integrity sha512-pFxg71pLk+eJj134Z9yUoRhIi8vqnnKvCYwdT4x/DQl/19RVdq1tV3yqOT3gcTQNfniteylL5qV1uTBDV5sgrg== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/turf@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/turf/-/turf-6.5.0.tgz#49cd07b942a757f3ebbdba6cb294bbb864825a83" + integrity sha512-ipMCPnhu59bh92MNt8+pr1VZQhHVuTMHklciQURo54heoxRzt1neNYZOBR6jdL+hNsbDGAECMuIpAutX+a3Y+w== + dependencies: + "@turf/along" "^6.5.0" + "@turf/angle" "^6.5.0" + "@turf/area" "^6.5.0" + "@turf/bbox" "^6.5.0" + "@turf/bbox-clip" "^6.5.0" + "@turf/bbox-polygon" "^6.5.0" + "@turf/bearing" "^6.5.0" + "@turf/bezier-spline" "^6.5.0" + "@turf/boolean-clockwise" "^6.5.0" + "@turf/boolean-contains" "^6.5.0" + "@turf/boolean-crosses" "^6.5.0" + "@turf/boolean-disjoint" "^6.5.0" + "@turf/boolean-equal" "^6.5.0" + "@turf/boolean-intersects" "^6.5.0" + "@turf/boolean-overlap" "^6.5.0" + "@turf/boolean-parallel" "^6.5.0" + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/boolean-point-on-line" "^6.5.0" + "@turf/boolean-within" "^6.5.0" + "@turf/buffer" "^6.5.0" + "@turf/center" "^6.5.0" + "@turf/center-mean" "^6.5.0" + "@turf/center-median" "^6.5.0" + "@turf/center-of-mass" "^6.5.0" + "@turf/centroid" "^6.5.0" + "@turf/circle" "^6.5.0" + "@turf/clean-coords" "^6.5.0" + "@turf/clone" "^6.5.0" + "@turf/clusters" "^6.5.0" + "@turf/clusters-dbscan" "^6.5.0" + "@turf/clusters-kmeans" "^6.5.0" + "@turf/collect" "^6.5.0" + "@turf/combine" "^6.5.0" + "@turf/concave" "^6.5.0" + "@turf/convex" "^6.5.0" + "@turf/destination" "^6.5.0" + "@turf/difference" "^6.5.0" + "@turf/dissolve" "^6.5.0" + "@turf/distance" "^6.5.0" + "@turf/distance-weight" "^6.5.0" + "@turf/ellipse" "^6.5.0" + "@turf/envelope" "^6.5.0" + "@turf/explode" "^6.5.0" + "@turf/flatten" "^6.5.0" + "@turf/flip" "^6.5.0" + "@turf/great-circle" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/hex-grid" "^6.5.0" + "@turf/interpolate" "^6.5.0" + "@turf/intersect" "^6.5.0" + "@turf/invariant" "^6.5.0" + "@turf/isobands" "^6.5.0" + "@turf/isolines" "^6.5.0" + "@turf/kinks" "^6.5.0" + "@turf/length" "^6.5.0" + "@turf/line-arc" "^6.5.0" + "@turf/line-chunk" "^6.5.0" + "@turf/line-intersect" "^6.5.0" + "@turf/line-offset" "^6.5.0" + "@turf/line-overlap" "^6.5.0" + "@turf/line-segment" "^6.5.0" + "@turf/line-slice" "^6.5.0" + "@turf/line-slice-along" "^6.5.0" + "@turf/line-split" "^6.5.0" + "@turf/line-to-polygon" "^6.5.0" + "@turf/mask" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/midpoint" "^6.5.0" + "@turf/moran-index" "^6.5.0" + "@turf/nearest-point" "^6.5.0" + "@turf/nearest-point-on-line" "^6.5.0" + "@turf/nearest-point-to-line" "^6.5.0" + "@turf/planepoint" "^6.5.0" + "@turf/point-grid" "^6.5.0" + "@turf/point-on-feature" "^6.5.0" + "@turf/point-to-line-distance" "^6.5.0" + "@turf/points-within-polygon" "^6.5.0" + "@turf/polygon-smooth" "^6.5.0" + "@turf/polygon-tangents" "^6.5.0" + "@turf/polygon-to-line" "^6.5.0" + "@turf/polygonize" "^6.5.0" + "@turf/projection" "^6.5.0" + "@turf/random" "^6.5.0" + "@turf/rewind" "^6.5.0" + "@turf/rhumb-bearing" "^6.5.0" + "@turf/rhumb-destination" "^6.5.0" + "@turf/rhumb-distance" "^6.5.0" + "@turf/sample" "^6.5.0" + "@turf/sector" "^6.5.0" + "@turf/shortest-path" "^6.5.0" + "@turf/simplify" "^6.5.0" + "@turf/square" "^6.5.0" + "@turf/square-grid" "^6.5.0" + "@turf/standard-deviational-ellipse" "^6.5.0" + "@turf/tag" "^6.5.0" + "@turf/tesselate" "^6.5.0" + "@turf/tin" "^6.5.0" + "@turf/transform-rotate" "^6.5.0" + "@turf/transform-scale" "^6.5.0" + "@turf/transform-translate" "^6.5.0" + "@turf/triangle-grid" "^6.5.0" + "@turf/truncate" "^6.5.0" + "@turf/union" "^6.5.0" + "@turf/unkink-polygon" "^6.5.0" + "@turf/voronoi" "^6.5.0" + +"@turf/union@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/union/-/union-6.5.0.tgz#82d28f55190608f9c7d39559b7f543393b03b82d" + integrity sha512-igYWCwP/f0RFHIlC2c0SKDuM/ObBaqSljI3IdV/x71805QbIvY/BYGcJdyNcgEA6cylIGl/0VSlIbpJHZ9ldhw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + polygon-clipping "^0.15.3" + +"@turf/unkink-polygon@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/unkink-polygon/-/unkink-polygon-6.5.0.tgz#9e54186dcce08d7e62f608c8fa2d3f0342ebe826" + integrity sha512-8QswkzC0UqKmN1DT6HpA9upfa1HdAA5n6bbuzHy8NJOX8oVizVAqfEPY0wqqTgboDjmBR4yyImsdPGUl3gZ8JQ== + dependencies: + "@turf/area" "^6.5.0" + "@turf/boolean-point-in-polygon" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + rbush "^2.0.1" + +"@turf/voronoi@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/voronoi/-/voronoi-6.5.0.tgz#afe6715a5c7eff687434010cde45cd4822489434" + integrity sha512-C/xUsywYX+7h1UyNqnydHXiun4UPjK88VDghtoRypR9cLlb7qozkiLRphQxxsCM0KxyxpVPHBVQXdAL3+Yurow== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + d3-voronoi "1.1.2" + "@types/chai@4": version "4.2.9" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.9.tgz#194332625ed2ae914aef00b8d5ca3b77e7924cc6" @@ -273,6 +1421,11 @@ resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.1.tgz#90b68446364baf9efd8e8349bb36bd3852b75b80" integrity sha512-aRnpPa7ysx3aNW60hTiCtLHlQaIFsXFCgQlpakNgDNVFzbtusSY8PwjAQgRWfSk0ekNoBjO51eQRB6upA9uuyw== +"@types/geojson@7946.0.8": + version "7946.0.8" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.8.tgz#30744afdb385e2945e22f3b033f897f76b1f12ca" + integrity sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -301,6 +1454,11 @@ "@types/cookiejar" "*" "@types/node" "*" +"@types/unist@^2.0.0", "@types/unist@^2.0.2": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" + integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== + "JSV@>= 4.0.x": version "4.0.2" resolved "https://registry.yarnpkg.com/JSV/-/JSV-4.0.2.tgz#d077f6825571f82132f9dffaed587b4029feff57" @@ -329,13 +1487,6 @@ acorn@^7.1.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== -affine-hull@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/affine-hull/-/affine-hull-1.0.0.tgz#763ff1d38d063ceb7e272f17ee4d7bbcaf905c5d" - integrity sha1-dj/x040GPOt+Jy8X7k17vK+QXF0= - dependencies: - robust-orientation "^1.1.3" - aggregate-error@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" @@ -702,11 +1853,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== -bit-twiddle@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bit-twiddle/-/bit-twiddle-1.0.2.tgz#0c6c1fabe2b23d17173d9a61b7b7093eb9e1769e" - integrity sha1-DGwfq+KyPRcXPZpht7cJPrnhdp4= - bl@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.1.tgz#8c11a7b730655c5d56898cdc871224f40fd901d5" @@ -789,6 +1935,11 @@ btoa-lite@^1.0.0: resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + bunyan@1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-1.7.1.tgz#5ff717e9d1a9a8b81e7b084bf6afc1fbaf9bafc4" @@ -852,6 +2003,14 @@ caching-transform@^4.0.0: package-hash "^4.0.0" write-file-atomic "^3.0.0" +call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -911,7 +2070,7 @@ chai@^4.2.0: pathval "^1.1.0" type-detect "^4.0.5" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= @@ -1194,7 +2353,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.20.0: +commander@2, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -1224,14 +2383,25 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@~1.4.4: - version "1.4.11" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.4.11.tgz#1dc9f666f2621da9c618b1e7f8f3b2ff70b5f76f" - integrity sha512-X3JMh8+4je3U1cQpG87+f9lXHDrqcb2MVLg9L7o8b1UZ0DzhRrUpdn65ttzu10PpJPPI3MQNkis+oha6TSA9Mw== +concat-stream@^1.6.1: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: - inherits "~2.0.1" - readable-stream "~1.1.9" - typedarray "~0.0.5" + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +concaveman@*: + version "1.2.1" + resolved "https://registry.yarnpkg.com/concaveman/-/concaveman-1.2.1.tgz#47d20b4521125c15fabf453653c2696d9ee41e0b" + integrity sha512-PwZYKaM/ckQSa8peP5JpVr7IMJ4Nn/MHIaWUjP4be+KoZ7Botgs8seAZGpmaOM+UZXawcdYRao/px9ycrCihHw== + dependencies: + point-in-polygon "^1.1.0" + rbush "^3.0.1" + robust-predicates "^2.0.4" + tinyqueue "^2.0.3" config@1.19.0: version "1.19.0" @@ -1286,15 +2456,6 @@ convert-source-map@^1.6.0, convert-source-map@^1.7.0: dependencies: safe-buffer "~5.1.1" -convex-hull@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/convex-hull/-/convex-hull-1.0.3.tgz#20a3aa6ce87f4adea2ff7d17971c9fc1c67e1fff" - integrity sha1-IKOqbOh/St6i/30XlxyfwcZ+H/8= - dependencies: - affine-hull "^1.0.0" - incremental-convex-hull "^1.0.1" - monotone-convex-hull-2d "^1.0.1" - cookiejar@^2.1.0, cookiejar@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" @@ -1417,6 +2578,23 @@ currency-symbol-map@~2: resolved "https://registry.yarnpkg.com/currency-symbol-map/-/currency-symbol-map-2.2.0.tgz#2b3c1872ff1ac2ce595d8273e58e1fff0272aea2" integrity sha1-KzwYcv8aws5ZXYJz5Y4f/wJyrqI= +d3-array@1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f" + integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw== + +d3-geo@1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.7.1.tgz#44bbc7a218b1fd859f3d8fd7c443ca836569ce99" + integrity sha512-O4AempWAr+P5qbk2bC2FuN/sDW4z+dN2wDf9QV3bxQt4M5HfOEeXLgJ/UKQW0+o1Dj8BE+L5kiDbdWUMjsmQpw== + dependencies: + d3-array "1" + +d3-voronoi@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.2.tgz#1687667e8f13a2d158c80c1480c5a29cb0d8973c" + integrity sha1-Fodmfo8TotFYyAwUgMWinLDYlzw= + damerau-levenshtein@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz#143c1641cb3d85c60c32329e26899adea8701791" @@ -1494,6 +2672,18 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" +deep-equal@1.x, deep-equal@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + deep-equal@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" @@ -1567,6 +2757,11 @@ denque@^1.4.1: resolved "https://registry.yarnpkg.com/denque/-/denque-1.4.1.tgz#6744ff7641c148c3f8a69c307e51235c1f4a37cf" integrity sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ== +density-clustering@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/density-clustering/-/density-clustering-1.3.0.tgz#dc9f59c8f0ab97e1624ac64930fd3194817dcac5" + integrity sha1-3J9ZyPCrl+FiSsZJMP0xlIF9ysU= + depd@^1.1.2, depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -2141,7 +3336,6 @@ fast-safe-stringify@^2.0.4: fastly-promises@tiagojsag/fastly-promises#master: version "0.0.0-semantically-released" - uid "14470364f0d4e62b8ff99c8f7e7dd7cb27039242" resolved "https://codeload.github.com/tiagojsag/fastly-promises/tar.gz/14470364f0d4e62b8ff99c8f7e7dd7cb27039242" dependencies: axios "0.21.1" @@ -2424,33 +3618,23 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== -geojson-area@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/geojson-area/-/geojson-area-0.2.1.tgz#2537b0982db86309f21d2c428a4257c7a6282cc6" - integrity sha1-JTewmC24YwnyHSxCikJXx6YoLMY= +geojson-equality@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/geojson-equality/-/geojson-equality-0.1.6.tgz#a171374ef043e5d4797995840bae4648e0752d72" + integrity sha1-oXE3TvBD5dR5eZWEC65GSOB1LXI= dependencies: - wgs84 "0.0.0" - -geojson-normalize@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/geojson-normalize/-/geojson-normalize-0.0.0.tgz#2dbc3678cd1b31b8179e876bda70cd120dde35c0" - integrity sha1-Lbw2eM0bMbgXnodr2nDNEg3eNcA= + deep-equal "^1.0.0" -geojson-random@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/geojson-random/-/geojson-random-0.2.2.tgz#ab4838f126adc5e16f8f94e655def820f9119dbc" - integrity sha1-q0g48SatxeFvj5TmVd74IPkRnbw= - -geojsonhint@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/geojsonhint/-/geojsonhint-1.2.0.tgz#750ee17419e08c29cbf552e867038c4565c521e5" - integrity sha1-dQ7hdBngjCnL9VLoZwOMRWXFIeU= +geojson-rbush@3.x: + version "3.2.0" + resolved "https://registry.yarnpkg.com/geojson-rbush/-/geojson-rbush-3.2.0.tgz#8b543cf0d56f99b78faf1da52bb66acad6dfc290" + integrity sha512-oVltQTXolxvsz1sZnutlSuLDEcQAKYC/uXt9zDzJJ6bu0W+baTI8LZBaTup5afzibEH4N3jlq2p+a152wlBJ7w== dependencies: - chalk "^1.1.0" - concat-stream "~1.4.4" - jsonlint-lines "1.7.1" - minimist "1.1.1" - text-table "^0.2.0" + "@turf/bbox" "*" + "@turf/helpers" "6.x" + "@turf/meta" "6.x" + "@types/geojson" "7946.0.8" + rbush "^3.0.1" get-caller-file@^2.0.1: version "2.0.5" @@ -2462,6 +3646,15 @@ get-func-name@^2.0.0: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-intrinsic@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -2795,6 +3988,18 @@ has-symbols@^1.0.0, has-symbols@^1.0.1: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -2976,14 +4181,6 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= -incremental-convex-hull@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/incremental-convex-hull/-/incremental-convex-hull-1.0.1.tgz#51428c14cb9d9a6144bfe69b2851fb377334be1e" - integrity sha1-UUKMFMudmmFEv+abKFH7N3M0vh4= - dependencies: - robust-orientation "^1.1.2" - simplicial-complex "^1.0.0" - indent-string@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" @@ -3012,7 +4209,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3082,6 +4279,14 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -3104,6 +4309,11 @@ is-buffer@^1.1.5, is-buffer@~1.1.1: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== +is-buffer@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + is-buffer@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" @@ -3296,6 +4506,14 @@ is-redirect@^1.0.0: resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= +is-regex@^1.0.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-regex@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" @@ -3639,11 +4857,6 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jsts@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/jsts/-/jsts-1.1.2.tgz#d205d2cc8393081d9e484ae36282110695edc230" - integrity sha1-0gXSzIOTCB2eSErjYoIRBpXtwjA= - jsx-ast-utils@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.4.1.tgz#1114a4c1209481db06c690c2b4f488cc665f657e" @@ -4244,16 +5457,16 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.1.tgz#1bc2bc71658cdca5712475684363615b0b4f695b" - integrity sha1-G8K8cWWM3KVxJHVoQ2NhWwtPaVs= - -minimist@^1.1.0, minimist@^1.2.0: +minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -4344,13 +5557,6 @@ mongoose@^5.9.14: sift "7.0.1" sliced "1.0.1" -monotone-convex-hull-2d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/monotone-convex-hull-2d/-/monotone-convex-hull-2d-1.0.1.tgz#47f5daeadf3c4afd37764baa1aa8787a40eee08c" - integrity sha1-R/Xa6t88Sv03dkuqGqh4ekDu4Iw= - dependencies: - robust-orientation "^1.1.3" - mpath@0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.7.0.tgz#20e8102e276b71709d6e07e9f8d4d0f641afbfb8" @@ -4639,7 +5845,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@*, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -4658,6 +5864,14 @@ object-inspect@^1.7.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== +object-is@^1.0.1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" + integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -5131,6 +6345,18 @@ please-upgrade-node@^3.2.0: dependencies: semver-compare "^1.0.0" +point-in-polygon@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/point-in-polygon/-/point-in-polygon-1.1.0.tgz#b0af2616c01bdee341cbf2894df643387ca03357" + integrity sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw== + +polygon-clipping@^0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/polygon-clipping/-/polygon-clipping-0.15.3.tgz#0215840438470ba2e9e6593625e4ea5c1087b4b7" + integrity sha512-ho0Xx5DLkgxRx/+n4O74XyJ67DcyN3Tu9bGYKsnTukGAW6ssnuak6Mwcyb1wHy9MZc9xsUWqIoiazkZB5weECg== + dependencies: + splaytree "^3.1.0" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -5220,6 +6446,16 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +quickselect@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-1.1.1.tgz#852e412ce418f237ad5b660d70cffac647ae94c2" + integrity sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ== + +quickselect@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018" + integrity sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw== + ramda@^0.27.1: version "0.27.1" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" @@ -5243,6 +6479,20 @@ raw-body@~1.1.0: bytes "1" string_decoder "0.10" +rbush@2.x, rbush@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/rbush/-/rbush-2.0.2.tgz#bb6005c2731b7ba1d5a9a035772927d16a614605" + integrity sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA== + dependencies: + quickselect "^1.0.1" + +rbush@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/rbush/-/rbush-3.0.1.tgz#5fafa8a79b3b9afdfe5008403a720cc1de882ecf" + integrity sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w== + dependencies: + quickselect "^2.0.0" + rc@^1.0.1, rc@^1.1.6: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -5292,7 +6542,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -readable-stream@^2.3.5, readable-stream@^2.3.6: +readable-stream@^2.2.2, readable-stream@^2.3.5, readable-stream@^2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -5314,16 +6564,6 @@ readable-stream@^3.1.1: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - readdirp@~3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" @@ -5368,6 +6608,14 @@ regexp-clone@1.0.0, regexp-clone@^1.0.0: resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-1.0.0.tgz#222db967623277056260b992626354a04ce9bf63" integrity sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw== +regexp.prototype.flags@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" + integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + regexp.prototype.flags@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" @@ -5408,7 +6656,7 @@ repeat-element@^1.1.2: resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== -repeat-string@^1.6.1: +repeat-string@^1.5.0, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= @@ -5555,33 +6803,10 @@ rimraf@~2.4.0: dependencies: glob "^6.0.1" -robust-orientation@^1.1.2, robust-orientation@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/robust-orientation/-/robust-orientation-1.1.3.tgz#daff5b00d3be4e60722f0e9c0156ef967f1c2049" - integrity sha1-2v9bANO+TmByLw6cAVbvln8cIEk= - dependencies: - robust-scale "^1.0.2" - robust-subtract "^1.0.0" - robust-sum "^1.0.0" - two-product "^1.0.2" - -robust-scale@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/robust-scale/-/robust-scale-1.0.2.tgz#775132ed09542d028e58b2cc79c06290bcf78c32" - integrity sha1-d1Ey7QlULQKOWLLMecBikLz3jDI= - dependencies: - two-product "^1.0.2" - two-sum "^1.0.0" - -robust-subtract@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/robust-subtract/-/robust-subtract-1.0.0.tgz#e0b164e1ed8ba4e3a5dda45a12038348dbed3e9a" - integrity sha1-4LFk4e2LpOOl3aRaEgODSNvtPpo= - -robust-sum@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/robust-sum/-/robust-sum-1.0.0.tgz#16646e525292b4d25d82757a286955e0bbfa53d9" - integrity sha1-FmRuUlKStNJdgnV6KGlV4Lv6U9k= +robust-predicates@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-2.0.4.tgz#0a2367a93abd99676d075981707f29cfb402248b" + integrity sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg== run-async@^2.2.0: version "2.3.0" @@ -5805,18 +7030,10 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -simplicial-complex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/simplicial-complex/-/simplicial-complex-1.0.0.tgz#6c33a4ed69fcd4d91b7bcadd3b30b63683eae241" - integrity sha1-bDOk7Wn81Nkbe8rdOzC2NoPq4kE= - dependencies: - bit-twiddle "^1.0.0" - union-find "^1.0.0" - -simplify-js@^1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/simplify-js/-/simplify-js-1.2.4.tgz#7aab22d6df547ffd40ef0761ccd82b75287d45c7" - integrity sha512-vITfSlwt7h/oyrU42R83mtzFpwYk3+mkH9bOHqq/Qw6n8rtR7aE3NZQ5fbcyCUVVmuMJR6ynsAhOfK2qoah8Jg== +skmeans@0.9.7: + version "0.9.7" + resolved "https://registry.yarnpkg.com/skmeans/-/skmeans-0.9.7.tgz#72670cebb728508f56e29c0e10d11e623529ce5d" + integrity sha512-hNj1/oZ7ygsfmPZ7ZfN5MUBRoGg1gtpnImuJBgLO0ljQ67DtJuiQaiYdS4lUA6s0KCwnPhGivtC/WRwIZLkHyg== slash@^3.0.0: version "3.0.0" @@ -5962,6 +7179,11 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== +splaytree@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/splaytree/-/splaytree-3.1.0.tgz#17d4a0108a6da3627579690b7b847241e18ddec8" + integrity sha512-gvUGR7xnOy0fLKTCxDeUZYgU/I1Tdf8M/lM1Qrf8L2TIOR5ipZjGk02uYcdv0o2x7WjVRgpm3iS2clLyuVAt0Q== + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -6106,7 +7328,7 @@ string.prototype.trimstart@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" -string_decoder@0.10, string_decoder@~0.10.x: +string_decoder@0.10: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= @@ -6225,7 +7447,7 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.0.0, supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -6319,6 +7541,11 @@ tiny-lr@^1.1.1: object-assign "^4.1.0" qs "^6.4.0" +tinyqueue@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/tinyqueue/-/tinyqueue-2.0.3.tgz#64d8492ebf39e7801d7bd34062e29b45b2035f08" + integrity sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -6368,6 +7595,20 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== +topojson-client@3.x: + version "3.1.0" + resolved "https://registry.yarnpkg.com/topojson-client/-/topojson-client-3.1.0.tgz#22e8b1ed08a2b922feeb4af6f53b6ef09a467b99" + integrity sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw== + dependencies: + commander "2" + +topojson-server@3.x: + version "3.0.1" + resolved "https://registry.yarnpkg.com/topojson-server/-/topojson-server-3.0.1.tgz#d2b3ec095b6732299be76a48406111b3201a34f5" + integrity sha512-/VS9j/ffKr2XAOjlZ9CgyyeLmgJ9dMwq6Y0YEON8O7p/tGGk+dCWnrE03zEdu7i4L7YsFZLEPZPzCvcB7lEEXw== + dependencies: + commander "2" + touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" @@ -6415,455 +7656,16 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -turf-along@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-along/-/turf-along-3.0.12.tgz#e622bde7a4bd138c09647d4b14aa0ea700485de6" - integrity sha1-5iK956S9E4wJZH1LFKoOpwBIXeY= - dependencies: - turf-bearing "^3.0.12" - turf-destination "^3.0.12" - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - -turf-area@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-area/-/turf-area-3.0.12.tgz#9b7e469ef9fb558fd147bb0c214823263bdbf13c" - integrity sha1-m35Gnvn7VY/RR7sMIUgjJjvb8Tw= - dependencies: - geojson-area "^0.2.1" - -turf-bbox-polygon@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-bbox-polygon/-/turf-bbox-polygon-3.0.12.tgz#330dc0bb38322d61545df966ce6c80f685acf4f2" - integrity sha1-Mw3AuzgyLWFUXflmzmyA9oWs9PI= - dependencies: - turf-helpers "^3.0.12" - -turf-bbox@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-bbox/-/turf-bbox-3.0.12.tgz#3fa06117c8443860ec80ac60fd5d2f1320bfb1be" - integrity sha1-P6BhF8hEOGDsgKxg/V0vEyC/sb4= - dependencies: - turf-meta "^3.0.12" - -turf-bearing@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-bearing/-/turf-bearing-3.0.12.tgz#65f609dd850e7364c7771aa6ded87b0e1917fd20" - integrity sha1-ZfYJ3YUOc2THdxqm3th7DhkX/SA= - dependencies: - turf-invariant "^3.0.12" - -turf-bezier@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-bezier/-/turf-bezier-3.0.12.tgz#102efdd4a63b265ee9c8c1727631920b36f4dd02" - integrity sha1-EC791KY7Jl7pyMFydjGSCzb03QI= - dependencies: - turf-helpers "^3.0.12" - -turf-buffer@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-buffer/-/turf-buffer-3.0.12.tgz#20840fe7c6aa67b24be1cab7ffcc5a82fd6bd971" - integrity sha1-IIQP58aqZ7JL4cq3/8xagv1r2XE= - dependencies: - geojson-normalize "0.0.0" - jsts "1.1.2" - turf-combine "^3.0.12" - turf-helpers "^3.0.12" - -turf-center@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-center/-/turf-center-3.0.12.tgz#45dd6c1729bb867291e3e002e9c7506f8c440196" - integrity sha1-Rd1sFym7hnKR4+AC6cdQb4xEAZY= - dependencies: - turf-bbox "^3.0.12" - turf-helpers "^3.0.12" - -turf-centroid@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-centroid/-/turf-centroid-3.0.12.tgz#eaee0d698204b57fc33994bb1bc867b8da293f8f" - integrity sha1-6u4NaYIEtX/DOZS7G8hnuNopP48= - dependencies: - turf-helpers "^3.0.12" - turf-meta "^3.0.12" - -turf-circle@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-circle/-/turf-circle-3.0.12.tgz#140b21cb4950f2d3cbc70d2df012936867f58930" - integrity sha1-FAshy0lQ8tPLxw0t8BKTaGf1iTA= - dependencies: - turf-destination "^3.0.12" - turf-helpers "^3.0.12" - -turf-collect@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-collect/-/turf-collect-3.0.12.tgz#6e986d1a707da319cc83e7238d0bcdf19aa3c7f2" - integrity sha1-bphtGnB9oxnMg+cjjQvN8Zqjx/I= - dependencies: - turf-inside "^3.0.12" - -turf-combine@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-combine/-/turf-combine-3.0.12.tgz#1670746f0fdce0d1ea8aa6a29ffe5438d446cf73" - integrity sha1-FnB0bw/c4NHqiqain/5UONRGz3M= - dependencies: - turf-meta "^3.0.12" - -turf-concave@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-concave/-/turf-concave-3.0.12.tgz#fcab6056965b0a8319f6cd802601095f2fd3a8eb" - integrity sha1-/KtgVpZbCoMZ9s2AJgEJXy/TqOs= - dependencies: - turf-distance "^3.0.12" - turf-meta "^3.0.12" - turf-tin "^3.0.12" - turf-union "^3.0.12" - -turf-convex@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-convex/-/turf-convex-3.0.12.tgz#a88ddc3e22d1cb658796a9c85d3ada3bd3eca357" - integrity sha1-qI3cPiLRy2WHlqnIXTraO9Pso1c= - dependencies: - convex-hull "^1.0.3" - turf-helpers "^3.0.12" - turf-meta "^3.0.12" - -turf-destination@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-destination/-/turf-destination-3.0.12.tgz#7dd6fbf97e86f831a26c83ef2d5a2f8d1d8a6de2" - integrity sha1-fdb7+X6G+DGibIPvLVovjR2KbeI= - dependencies: - turf-helpers "^3.0.12" - turf-invariant "^3.0.12" - -turf-difference@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-difference/-/turf-difference-3.0.12.tgz#9c3d0d7630421005b8b25b7f068ed9efb4bc6ea7" - integrity sha1-nD0NdjBCEAW4slt/Bo7Z77S8bqc= - dependencies: - jsts "1.1.2" - turf-helpers "^3.0.12" - -turf-distance@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-distance/-/turf-distance-3.0.12.tgz#fb97b8705facd993b145e014b41862610eeca449" - integrity sha1-+5e4cF+s2ZOxReAUtBhiYQ7spEk= - dependencies: - turf-helpers "^3.0.12" - turf-invariant "^3.0.12" - -turf-envelope@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-envelope/-/turf-envelope-3.0.12.tgz#96921d278cc8c664692e320e2543b914080d786b" - integrity sha1-lpIdJ4zIxmRpLjIOJUO5FAgNeGs= - dependencies: - turf-bbox "^3.0.12" - turf-bbox-polygon "^3.0.12" - -turf-explode@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-explode/-/turf-explode-3.0.12.tgz#c5ae28c284cd006c56511ec7d408c48a5414ecfe" - integrity sha1-xa4owoTNAGxWUR7H1AjEilQU7P4= - dependencies: - turf-helpers "^3.0.12" - turf-meta "^3.0.12" - -turf-flip@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-flip/-/turf-flip-3.0.12.tgz#deb868177b9ff3bb310c5d41aaac61a9156a3cbb" - integrity sha1-3rhoF3uf87sxDF1BqqxhqRVqPLs= - dependencies: - turf-meta "^3.0.12" - -turf-grid@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/turf-grid/-/turf-grid-1.0.1.tgz#b904abc564b939b627a66ac15eb16e053829b80f" - integrity sha1-uQSrxWS5ObYnpmrBXrFuBTgpuA8= - dependencies: - turf-point "^2.0.0" - -turf-helpers@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-helpers/-/turf-helpers-3.0.12.tgz#dd4272e74b3ad7c96eecb7ae5c57fe8eca544b7b" - integrity sha1-3UJy50s618lu7LeuXFf+jspUS3s= - -turf-hex-grid@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-hex-grid/-/turf-hex-grid-3.0.12.tgz#0698ef669020bb31d8e9cc2056d0abfcafc84e8f" - integrity sha1-BpjvZpAguzHY6cwgVtCr/K/ITo8= - dependencies: - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - -turf-inside@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-inside/-/turf-inside-3.0.12.tgz#9ba40fa6eed63bec7e7d88aa6427622c4df07066" - integrity sha1-m6QPpu7WO+x+fYiqZCdiLE3wcGY= - dependencies: - turf-invariant "^3.0.12" - -turf-intersect@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-intersect/-/turf-intersect-3.0.12.tgz#c0d7fb305843a19275670057a39d268b17830d83" - integrity sha1-wNf7MFhDoZJ1ZwBXo50mixeDDYM= - dependencies: - jsts "1.1.2" - -turf-invariant@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-invariant/-/turf-invariant-3.0.12.tgz#3b95253953991ebd962dd35d4f6704c287de8ebe" - integrity sha1-O5UlOVOZHr2WLdNdT2cEwofejr4= - -turf-isolines@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-isolines/-/turf-isolines-3.0.12.tgz#00b233dfe2eebd4ecb47a94fc923c6ecec89c7ab" - integrity sha1-ALIz3+LuvU7LR6lPySPG7OyJx6s= - dependencies: - turf-bbox "^3.0.12" - turf-grid "1.0.1" - turf-helpers "^3.0.12" - turf-inside "^3.0.12" - turf-planepoint "^3.0.12" - turf-square "^3.0.12" - turf-tin "^3.0.12" - -turf-kinks@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-kinks/-/turf-kinks-3.0.12.tgz#e9c9a8dba5724d98f2350fc5bdeba069ec333755" - integrity sha1-6cmo26VyTZjyNQ/FveugaewzN1U= - dependencies: - turf-helpers "^3.0.12" - -turf-line-distance@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-line-distance/-/turf-line-distance-3.0.12.tgz#7108f5b26907f7b8c2dd1b3997866dd3a60e8f5f" - integrity sha1-cQj1smkH97jC3Rs5l4Zt06YOj18= - dependencies: - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - -turf-line-slice@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-line-slice/-/turf-line-slice-3.0.12.tgz#f5f1accc92adae69ea1ac0b29f07529a28dde916" - integrity sha1-9fGszJKtrmnqGsCynwdSmijd6RY= - dependencies: - turf-bearing "^3.0.12" - turf-destination "^3.0.12" - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - turf-point-on-line "^3.0.12" - -turf-meta@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-meta/-/turf-meta-3.0.12.tgz#0aa9a1caf82b2a5a08d54e0830b5b5a3fa0e8a38" - integrity sha1-CqmhyvgrKloI1U4IMLW1o/oOijg= - -turf-midpoint@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-midpoint/-/turf-midpoint-3.0.12.tgz#b12765ae89acdee8556fd5e26c9c5fa041a02cbe" - integrity sha1-sSdlroms3uhVb9XibJxfoEGgLL4= - dependencies: - turf-bearing "^3.0.12" - turf-destination "^3.0.12" - turf-distance "^3.0.12" - turf-invariant "^3.0.12" - -turf-nearest@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-nearest/-/turf-nearest-3.0.12.tgz#700207f4443f05096f86cd246f929f170dfaf46d" - integrity sha1-cAIH9EQ/BQlvhs0kb5KfFw369G0= - dependencies: - turf-distance "^3.0.12" - -turf-planepoint@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-planepoint/-/turf-planepoint-3.0.12.tgz#2c37ae0f17fcb30db6e38f0d59ee6c0dd6caa9af" - integrity sha1-LDeuDxf8sw22448NWe5sDdbKqa8= - -turf-point-grid@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-point-grid/-/turf-point-grid-3.0.12.tgz#d604978be10bc9e53306ae02cef7098431db4971" - integrity sha1-1gSXi+ELyeUzBq4CzvcJhDHbSXE= - dependencies: - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - -turf-point-on-line@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-point-on-line/-/turf-point-on-line-3.0.12.tgz#1d8663354e70372db1863e6253e9040c47127b0f" - integrity sha1-HYZjNU5wNy2xhj5iU+kEDEcSew8= - dependencies: - turf-bearing "^3.0.12" - turf-destination "^3.0.12" - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - -turf-point-on-surface@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-point-on-surface/-/turf-point-on-surface-3.0.12.tgz#9be505b6b0ba78e98565001de3b3a4267115240a" - integrity sha1-m+UFtrC6eOmFZQAd47OkJnEVJAo= - dependencies: - turf-center "^3.0.12" - turf-distance "^3.0.12" - turf-explode "^3.0.12" - turf-helpers "^3.0.12" - turf-inside "^3.0.12" - -turf-point@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/turf-point/-/turf-point-2.0.1.tgz#a2dcc30a2d20f44cf5c6271df7bae2c0e2146069" - integrity sha1-otzDCi0g9Ez1xicd97riwOIUYGk= - dependencies: - minimist "^1.1.0" - -turf-random@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-random/-/turf-random-3.0.12.tgz#34dbb141c3f1eaeae1424fd6c5eaba1f6fb9b1e8" - integrity sha1-NNuxQcPx6urhQk/Wxeq6H2+5seg= - dependencies: - geojson-random "^0.2.2" - -turf-sample@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-sample/-/turf-sample-3.0.12.tgz#7949f8620612047e1314c1ced87e99c142463cd2" - integrity sha1-eUn4YgYSBH4TFMHO2H6ZwUJGPNI= - dependencies: - turf-helpers "^3.0.12" - -turf-simplify@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-simplify/-/turf-simplify-3.0.12.tgz#85e443c8b46aa2b7526389444c7381daa2ad19e7" - integrity sha1-heRDyLRqordSY4lETHOB2qKtGec= - dependencies: - simplify-js "^1.2.1" - -turf-square-grid@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-square-grid/-/turf-square-grid-3.0.12.tgz#3c1d80ac14556c6813b478bda012512ed4b93ec8" - integrity sha1-PB2ArBRVbGgTtHi9oBJRLtS5Psg= - dependencies: - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - -turf-square@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-square/-/turf-square-3.0.12.tgz#1a38b1e0fb05ffe0fcaa43188e2f37942a515b64" - integrity sha1-Gjix4PsF/+D8qkMYji83lCpRW2Q= - dependencies: - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - -turf-tag@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-tag/-/turf-tag-3.0.12.tgz#2284fff0e8a1e92a27d4ac7fd7471b3c48ddd1a8" - integrity sha1-IoT/8Oih6Son1Kx/10cbPEjd0ag= - dependencies: - turf-inside "^3.0.12" - -turf-tesselate@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-tesselate/-/turf-tesselate-3.0.12.tgz#41474b7b5b3820bcf273fb71e1894d8c3cd40d35" - integrity sha1-QUdLe1s4ILzyc/tx4YlNjDzUDTU= - dependencies: - earcut "^2.0.0" - turf-helpers "^3.0.12" - -turf-tin@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-tin/-/turf-tin-3.0.12.tgz#b6534644763ace1c9df241c958d2384855257385" - integrity sha1-tlNGRHY6zhyd8kHJWNI4SFUlc4U= - dependencies: - turf-helpers "^3.0.12" - -turf-triangle-grid@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-triangle-grid/-/turf-triangle-grid-3.0.12.tgz#80647e57dafe09346879a29a18a0e6294acf1159" - integrity sha1-gGR+V9r+CTRoeaKaGKDmKUrPEVk= - dependencies: - turf-distance "^3.0.12" - turf-helpers "^3.0.12" - -turf-union@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-union/-/turf-union-3.0.12.tgz#dfed0e5540b8c2855e4994c14621e3a60c829c8e" - integrity sha1-3+0OVUC4woVeSZTBRiHjpgyCnI4= - dependencies: - jsts "1.1.2" - -turf-within@^3.0.12: - version "3.0.12" - resolved "https://registry.yarnpkg.com/turf-within/-/turf-within-3.0.12.tgz#f77eeaf377238561b7fb1338e76e9d1298741f94" - integrity sha1-937q83cjhWG3+xM4526dEph0H5Q= - dependencies: - turf-helpers "^3.0.12" - turf-inside "^3.0.12" - -turf@^3.0.11: - version "3.0.14" - resolved "https://registry.yarnpkg.com/turf/-/turf-3.0.14.tgz#eb2f4a80a2d583b8c6486bc7b5c7190466866c27" - integrity sha1-6y9KgKLVg7jGSGvHtccZBGaGbCc= - dependencies: - turf-along "^3.0.12" - turf-area "^3.0.12" - turf-bbox "^3.0.12" - turf-bbox-polygon "^3.0.12" - turf-bearing "^3.0.12" - turf-bezier "^3.0.12" - turf-buffer "^3.0.12" - turf-center "^3.0.12" - turf-centroid "^3.0.12" - turf-circle "^3.0.12" - turf-collect "^3.0.12" - turf-combine "^3.0.12" - turf-concave "^3.0.12" - turf-convex "^3.0.12" - turf-destination "^3.0.12" - turf-difference "^3.0.12" - turf-distance "^3.0.12" - turf-envelope "^3.0.12" - turf-explode "^3.0.12" - turf-flip "^3.0.12" - turf-helpers "^3.0.12" - turf-hex-grid "^3.0.12" - turf-inside "^3.0.12" - turf-intersect "^3.0.12" - turf-isolines "^3.0.12" - turf-kinks "^3.0.12" - turf-line-distance "^3.0.12" - turf-line-slice "^3.0.12" - turf-meta "^3.0.12" - turf-midpoint "^3.0.12" - turf-nearest "^3.0.12" - turf-planepoint "^3.0.12" - turf-point-grid "^3.0.12" - turf-point-on-line "^3.0.12" - turf-point-on-surface "^3.0.12" - turf-random "^3.0.12" - turf-sample "^3.0.12" - turf-simplify "^3.0.12" - turf-square "^3.0.12" - turf-square-grid "^3.0.12" - turf-tag "^3.0.12" - turf-tesselate "^3.0.12" - turf-tin "^3.0.12" - turf-triangle-grid "^3.0.12" - turf-union "^3.0.12" - turf-within "^3.0.12" +turf-jsts@*: + version "1.2.3" + resolved "https://registry.yarnpkg.com/turf-jsts/-/turf-jsts-1.2.3.tgz#59757f542afbff9a577bbf411f183b8f48d38aa4" + integrity sha512-Ja03QIJlPuHt4IQ2FfGex4F4JAr8m3jpaHbFbQrgwr7s7L6U8ocrHiF3J1+wf9jzhGKxvDeaCAnGDot8OjGFyA== tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= -two-product@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/two-product/-/two-product-1.0.2.tgz#67d95d4b257a921e2cb4bd7af9511f9088522eaa" - integrity sha1-Z9ldSyV6kh4stL16+VEfkIhSLqo= - -two-sum@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/two-sum/-/two-sum-1.0.0.tgz#31d3f32239e4f731eca9df9155e2b297f008ab64" - integrity sha1-MdPzIjnk9zHsqd+RVeKyl/AIq2Q= - type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -6896,7 +7698,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedarray@~0.0.5: +typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= @@ -6936,11 +7738,6 @@ underscore@~1.6.0: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" integrity sha1-izixDKze9jM3uLJOT/htRa6lKag= -union-find@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/union-find/-/union-find-1.0.2.tgz#292bac415e6ad3a89535d237010db4a536284e58" - integrity sha1-KSusQV5q06iVNdI3AQ20pTYoTlg= - union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -6958,6 +7755,13 @@ unique-string@^1.0.0: dependencies: crypto-random-string "^1.0.0" +unist-util-stringify-position@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" + integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== + dependencies: + "@types/unist" "^2.0.2" + universal-user-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" @@ -7082,6 +7886,46 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +vfile-message@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.4.tgz#5b43b88171d409eae58477d13f23dd41d52c371a" + integrity sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ== + dependencies: + "@types/unist" "^2.0.0" + unist-util-stringify-position "^2.0.0" + +vfile-reporter@^5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/vfile-reporter/-/vfile-reporter-5.1.2.tgz#80f1db5cbe8f9c12f2f30cce3e2cd18353a48519" + integrity sha512-b15sTuss1wOPWVlyWOvu+n6wGJ/eTYngz3uqMLimQvxZ+Q5oFQGYZZP1o3dR9sk58G5+wej0UPCZSwQBX/mzrQ== + dependencies: + repeat-string "^1.5.0" + string-width "^2.0.0" + supports-color "^5.0.0" + unist-util-stringify-position "^2.0.0" + vfile-sort "^2.1.2" + vfile-statistics "^1.1.0" + +vfile-sort@^2.1.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/vfile-sort/-/vfile-sort-2.2.2.tgz#720fe067ce156aba0b411a01bb0dc65596aa1190" + integrity sha512-tAyUqD2R1l/7Rn7ixdGkhXLD3zsg+XLAeUDUhXearjfIcpL1Hcsj5hHpCoy/gvfK/Ws61+e972fm0F7up7hfYA== + +vfile-statistics@^1.1.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/vfile-statistics/-/vfile-statistics-1.1.4.tgz#b99fd15ecf0f44ba088cc973425d666cb7a9f245" + integrity sha512-lXhElVO0Rq3frgPvFBwahmed3X03vjPF8OcjKMy8+F1xU/3Q3QU3tKEDp743SFtb74PdF0UWpxPvtOP0GCLheA== + +vfile@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/vfile/-/vfile-4.2.1.tgz#03f1dce28fc625c625bc6514350fbdb00fa9e624" + integrity sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA== + dependencies: + "@types/unist" "^2.0.0" + is-buffer "^2.0.0" + unist-util-stringify-position "^2.0.0" + vfile-message "^2.0.0" + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -7096,11 +7940,6 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== -wgs84@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/wgs84/-/wgs84-0.0.0.tgz#34fdc555917b6e57cf2a282ed043710c049cdc76" - integrity sha1-NP3FVZF7blfPKigu0ENxDASc3HY= - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" From da247af377f321acb1d5f31996e209943b990e9c Mon Sep 17 00:00:00 2001 From: Alicia Date: Mon, 20 Dec 2021 14:03:07 +0100 Subject: [PATCH 08/12] revert gojson validator library and add a guard against geojsone overflowing and against multipoin point types --- app/src/services/geoStoreService.js | 20 +++- app/src/validators/geoJSONValidator.js | 2 +- app/test/e2e/utils/test.constants.js | 2 +- package.json | 2 +- yarn.lock | 133 ++++++++----------------- 5 files changed, 59 insertions(+), 100 deletions(-) diff --git a/app/src/services/geoStoreService.js b/app/src/services/geoStoreService.js index c3998c2..99ba9ce 100644 --- a/app/src/services/geoStoreService.js +++ b/app/src/services/geoStoreService.js @@ -53,14 +53,14 @@ class GeoStoreService { * st_MakeValid: create a valid representation of a given invalid geometry * https://postgis.net/docs/manual-dev/ST_MakeValid.html * - * ST_CollectionExtract: ensure that the geometry is not a collection of different types + * ST_CollectionExtract: ensure that the geometry is not a collection of different geom types * * In order to ensure a valid geojson representation based on rfc7946, we need to: * ST_ForcePolygonCCW: ensure that the exterior ring is counterclockwise as per spec * @todo: The geometry needs to enforce the antimeridian split rule over [-180,180] epsg:4326 * geometries. */ - const sql = `SELECT ST_AsGeoJson(ST_ForcePolygonCCW(ST_CollectionExtract(st_MakeValid(ST_GeomFromGeoJSON('${JSON.stringify(geojson)}')),${geometryType}))) as geojson`; + const sql = `SELECT ST_AsGeoJson(ST_CollectionExtract(st_MakeValid( ST_GeomFromGeoJSON('${JSON.stringify(geojson)}')),${geometryType})) as geojson`; if (process.env.NODE_ENV !== 'test' || sql.length < 2000) { logger.debug('SQL to repair geojson: %s', sql); @@ -169,7 +169,7 @@ class GeoStoreService { * @param {*} bbox * @returns boolean */ - static async overFlooded(bbox) { + static overFlooded(bbox) { return bbox[0] > 180 || bbox[2] > 180; } @@ -181,11 +181,23 @@ class GeoStoreService { * */ static async crossAntimeridian(feature, bbox) { - logger.debug('Checking antimeridian'); + logger.info('Checking antimeridian'); + const antimeridian = this.overFlooded(bbox); + const geomTypes = ['Point', 'MultiPoint']; + if (antimeridian) { + logger.debug('BBOX crosses antimeridian but is in [0, 360]'); + return bbox; + } const westHemiBBox = [-180, -90, 0, 90]; const eastHemiBBox = [0, -90, 180, 90]; const bboxTotal = bbox || turf.bbox(feature); + logger.info(feature.type); + logger.info(feature.geometry.type); + + if (geomTypes.includes(feature.type) || geomTypes.includes(feature.geometry.type)) { + return bbox; + } const clippedEastGeom = turf.bboxClip(feature, eastHemiBBox); const clippedWestGeom = turf.bboxClip(feature, westHemiBBox); diff --git a/app/src/validators/geoJSONValidator.js b/app/src/validators/geoJSONValidator.js index 7756bb5..5a66fa6 100644 --- a/app/src/validators/geoJSONValidator.js +++ b/app/src/validators/geoJSONValidator.js @@ -1,5 +1,5 @@ /* eslint-disable func-names */ -const geojsonhint = require('@mapbox/geojsonhint'); +const geojsonhint = require('geojsonhint'); const koaValidate = require('koa-validate'); (function () { diff --git a/app/test/e2e/utils/test.constants.js b/app/test/e2e/utils/test.constants.js index 730e670..bd24ebf 100644 --- a/app/test/e2e/utils/test.constants.js +++ b/app/test/e2e/utils/test.constants.js @@ -59,7 +59,7 @@ const ANTIMERIDIAN_GEOJSON = { }; const MOCK_RESULT_CARTODB = [{ - geojson: '{"type":"MultiPolygon","coordinates":[[[[7.4134,43.7346],[7.4095,43.7299],[7.4179,43.7226],[7.4396,43.7492],[7.4134,43.7346]]]]}', + geojson: '{"type":"MultiPolygon","coordinates":[[[[7.4134,43.7346],[7.4396,43.7492],[7.4179,43.7226],[7.4095,43.7299],[7.4134,43.7346]]]]}', area_ha: 235.490994944, name: 'Monaco' }]; diff --git a/package.json b/package.json index 46cfdc3..fcfee30 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ }, "homepage": "https://github.com/gfw-api/gfw-geostore-api#readme", "dependencies": { - "@mapbox/geojsonhint": "^3.0.1", "@octokit/rest": "^16.28.7", "@turf/turf": "^6.5.0", "arcgis-to-geojson-utils": "^1.0.1", @@ -45,6 +44,7 @@ "co-sleep": "0.0.1", "config": "1.19.0", "country-data": "0.0.24", + "geojsonhint": "1.2.0", "jsonapi-serializer": "^3.6.5", "koa": "^2.11.0", "koa-bodyparser": "^4.3.0", diff --git a/yarn.lock b/yarn.lock index f84b0c3..b5cfd3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -163,17 +163,6 @@ dependencies: vary "^1.1.2" -"@mapbox/geojsonhint@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@mapbox/geojsonhint/-/geojsonhint-3.0.1.tgz#46eb0afbfb45915efb73650b90ac64dd8b2274ef" - integrity sha512-8BhaDcFnTGP9Z8gLWQfeOMMO4xWmJWN45ZITfjiatI5aP9rmRXTaF2ugvCAJQH+llWTuC+/V+c783ApVoSbnsQ== - dependencies: - concat-stream "^1.6.1" - jsonlint-lines "1.7.1" - minimist "^1.2.5" - vfile "^4.0.0" - vfile-reporter "^5.1.1" - "@octokit/auth-token@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" @@ -1454,11 +1443,6 @@ "@types/cookiejar" "*" "@types/node" "*" -"@types/unist@^2.0.0", "@types/unist@^2.0.2": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" - integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== - "JSV@>= 4.0.x": version "4.0.2" resolved "https://registry.yarnpkg.com/JSV/-/JSV-4.0.2.tgz#d077f6825571f82132f9dffaed587b4029feff57" @@ -1935,11 +1919,6 @@ btoa-lite@^1.0.0: resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - bunyan@1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-1.7.1.tgz#5ff717e9d1a9a8b81e7b084bf6afc1fbaf9bafc4" @@ -2070,7 +2049,7 @@ chai@^4.2.0: pathval "^1.1.0" type-detect "^4.0.5" -chalk@^1.0.0, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= @@ -2383,15 +2362,14 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.6.1: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== +concat-stream@~1.4.4: + version "1.4.11" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.4.11.tgz#1dc9f666f2621da9c618b1e7f8f3b2ff70b5f76f" + integrity sha512-X3JMh8+4je3U1cQpG87+f9lXHDrqcb2MVLg9L7o8b1UZ0DzhRrUpdn65ttzu10PpJPPI3MQNkis+oha6TSA9Mw== dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" + inherits "~2.0.1" + readable-stream "~1.1.9" + typedarray "~0.0.5" concaveman@*: version "1.2.1" @@ -3636,6 +3614,17 @@ geojson-rbush@3.x: "@types/geojson" "7946.0.8" rbush "^3.0.1" +geojsonhint@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/geojsonhint/-/geojsonhint-1.2.0.tgz#750ee17419e08c29cbf552e867038c4565c521e5" + integrity sha1-dQ7hdBngjCnL9VLoZwOMRWXFIeU= + dependencies: + chalk "^1.1.0" + concat-stream "~1.4.4" + jsonlint-lines "1.7.1" + minimist "1.1.1" + text-table "^0.2.0" + get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -4209,7 +4198,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4309,11 +4298,6 @@ is-buffer@^1.1.5, is-buffer@~1.1.1: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - is-buffer@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" @@ -5457,16 +5441,16 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= +minimist@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.1.tgz#1bc2bc71658cdca5712475684363615b0b4f695b" + integrity sha1-G8K8cWWM3KVxJHVoQ2NhWwtPaVs= + minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -6542,7 +6526,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -readable-stream@^2.2.2, readable-stream@^2.3.5, readable-stream@^2.3.6: +readable-stream@^2.3.5, readable-stream@^2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -6564,6 +6548,16 @@ readable-stream@^3.1.1: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readdirp@~3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" @@ -6656,7 +6650,7 @@ repeat-element@^1.1.2: resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== -repeat-string@^1.5.0, repeat-string@^1.6.1: +repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= @@ -7328,7 +7322,7 @@ string.prototype.trimstart@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" -string_decoder@0.10: +string_decoder@0.10, string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= @@ -7447,7 +7441,7 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^5.0.0, supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -7698,7 +7692,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedarray@^0.0.6: +typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= @@ -7755,13 +7749,6 @@ unique-string@^1.0.0: dependencies: crypto-random-string "^1.0.0" -unist-util-stringify-position@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" - integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== - dependencies: - "@types/unist" "^2.0.2" - universal-user-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" @@ -7886,46 +7873,6 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vfile-message@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.4.tgz#5b43b88171d409eae58477d13f23dd41d52c371a" - integrity sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-stringify-position "^2.0.0" - -vfile-reporter@^5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/vfile-reporter/-/vfile-reporter-5.1.2.tgz#80f1db5cbe8f9c12f2f30cce3e2cd18353a48519" - integrity sha512-b15sTuss1wOPWVlyWOvu+n6wGJ/eTYngz3uqMLimQvxZ+Q5oFQGYZZP1o3dR9sk58G5+wej0UPCZSwQBX/mzrQ== - dependencies: - repeat-string "^1.5.0" - string-width "^2.0.0" - supports-color "^5.0.0" - unist-util-stringify-position "^2.0.0" - vfile-sort "^2.1.2" - vfile-statistics "^1.1.0" - -vfile-sort@^2.1.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/vfile-sort/-/vfile-sort-2.2.2.tgz#720fe067ce156aba0b411a01bb0dc65596aa1190" - integrity sha512-tAyUqD2R1l/7Rn7ixdGkhXLD3zsg+XLAeUDUhXearjfIcpL1Hcsj5hHpCoy/gvfK/Ws61+e972fm0F7up7hfYA== - -vfile-statistics@^1.1.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/vfile-statistics/-/vfile-statistics-1.1.4.tgz#b99fd15ecf0f44ba088cc973425d666cb7a9f245" - integrity sha512-lXhElVO0Rq3frgPvFBwahmed3X03vjPF8OcjKMy8+F1xU/3Q3QU3tKEDp743SFtb74PdF0UWpxPvtOP0GCLheA== - -vfile@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/vfile/-/vfile-4.2.1.tgz#03f1dce28fc625c625bc6514350fbdb00fa9e624" - integrity sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA== - dependencies: - "@types/unist" "^2.0.0" - is-buffer "^2.0.0" - unist-util-stringify-position "^2.0.0" - vfile-message "^2.0.0" - websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" From b5c6f268bec90b80f68e8294b7f237cb52fd98a3 Mon Sep 17 00:00:00 2001 From: Alicia Date: Tue, 21 Dec 2021 16:24:07 +0100 Subject: [PATCH 09/12] finish developing an antimeridian fix --- app/src/services/geoStoreService.js | 78 +++++++++++----- app/src/services/geoStoreServiceV2.js | 127 +++++++++++++++++++++++++- app/test/e2e/utils/test.constants.js | 118 +++++++++++++----------- app/test/e2e/v1/geostore-get.spec.js | 8 +- app/test/e2e/v2/geostore-get.spec.js | 8 +- 5 files changed, 254 insertions(+), 85 deletions(-) diff --git a/app/src/services/geoStoreService.js b/app/src/services/geoStoreService.js index 99ba9ce..f9e698f 100644 --- a/app/src/services/geoStoreService.js +++ b/app/src/services/geoStoreService.js @@ -60,7 +60,7 @@ class GeoStoreService { * @todo: The geometry needs to enforce the antimeridian split rule over [-180,180] epsg:4326 * geometries. */ - const sql = `SELECT ST_AsGeoJson(ST_CollectionExtract(st_MakeValid( ST_GeomFromGeoJSON('${JSON.stringify(geojson)}')),${geometryType})) as geojson`; + const sql = `SELECT ST_AsGeoJson(ST_CollectionExtract(st_MakeValid(ST_GeomFromGeoJSON('${JSON.stringify(geojson)}')),${geometryType})) as geojson`; if (process.env.NODE_ENV !== 'test' || sql.length < 2000) { logger.debug('SQL to repair geojson: %s', sql); @@ -164,7 +164,9 @@ class GeoStoreService { } } + // @TODO: Extract bbox handeling to its own class /** + * @name overFlooded * @description check if the geometry overflows the [-180, -90, 180, 90] box * @param {*} bbox * @returns boolean @@ -174,6 +176,19 @@ class GeoStoreService { } /** + * @name bboxToPolygon + * @description converts a bbox to a polygon + * @param {Array} bbox + * @returns {Polygon} + */ + static bboxToPolygon(bbox) { + return turf.polygon([[[bbox[2], bbox[3]], [bbox[2], bbox[1]], + [bbox[0], bbox[1]], [bbox[0], bbox[3]], + [bbox[2], bbox[3]]]]); + } + + /** + * @name: crossAntiMeridian * @description: checks if a bbox crosses the antimeridian * this is a mirror of https://github.com/mapbox/carmen/blob/03fac2d7397ecdfcb4f0828fcfd9d8a54c845f21/lib/util/bbox.js#L59 * @param {Array} bbox A bounding box array in the format [minX, minY, maxX, maxY] @@ -183,39 +198,54 @@ class GeoStoreService { static async crossAntimeridian(feature, bbox) { logger.info('Checking antimeridian'); - const antimeridian = this.overFlooded(bbox); const geomTypes = ['Point', 'MultiPoint']; - if (antimeridian) { - logger.debug('BBOX crosses antimeridian but is in [0, 360]'); - return bbox; - } + const bboxTotal = bbox || turf.bbox(feature); const westHemiBBox = [-180, -90, 0, 90]; const eastHemiBBox = [0, -90, 180, 90]; - const bboxTotal = bbox || turf.bbox(feature); - logger.info(feature.type); - logger.info(feature.geometry.type); + const antimeridian = this.overFlooded(bbox); - if (geomTypes.includes(feature.type) || geomTypes.includes(feature.geometry.type)) { - return bbox; + if (geomTypes.includes(turf.getType(feature))) { + /** + * if the geometry is a triangle geometry length is 4 and + * the points are spread among hemispheres bbox calc over each + * hemisphere will be wrong + * This will need its own development + */ + logger.debug('Multipoint or point geometry'); + return bboxTotal; } - const clippedEastGeom = turf.bboxClip(feature, eastHemiBBox); - const clippedWestGeom = turf.bboxClip(feature, westHemiBBox); + if (antimeridian) { + logger.debug('BBOX crosses antimeridian but is in [0, 360º]'); + return bboxTotal; + } + + if (turf.booleanIntersects(feature, this.bboxToPolygon(eastHemiBBox)) + && turf.booleanIntersects(feature, this.bboxToPolygon(westHemiBBox))) { + logger.debug('Geometry that is contained in both hemispheres'); + + const clippedEastGeom = turf.bboxClip(feature, eastHemiBBox); + const clippedWestGeom = turf.bboxClip(feature, westHemiBBox); + const bboxEast = turf.bbox(clippedEastGeom); + const bboxWest = turf.bbox(clippedWestGeom); - const bboxEast = turf.bbox(clippedEastGeom); - const bboxWest = turf.bbox(clippedWestGeom); + const amBBox = [bboxEast[0], bboxTotal[1], bboxWest[2], bboxTotal[3]]; + const pmBBox = [bboxWest[0], bboxTotal[1], bboxEast[2], bboxTotal[3]]; - const amBBox = [bboxEast[0], bboxTotal[1], bboxWest[2], bboxTotal[3]]; - const pmBBox = [bboxWest[0], bboxTotal[1], bboxEast[2], bboxTotal[3]]; + const pmBBoxWidth = (bboxEast[2]) + Math.abs(bboxWest[0]); + const amBBoxWidth = (180 - bboxEast[0]) + (180 - Math.abs(bboxWest[2])); - const pmBBoxWidth = (bboxEast[2]) + Math.abs(bboxWest[0]); - const amBBoxWidth = (180 - bboxEast[0]) + (180 - Math.abs(bboxWest[2])); - const newBbox = (pmBBoxWidth > amBBoxWidth) ? amBBox : pmBBox; + const newBbox = (pmBBoxWidth > amBBoxWidth) ? amBBox : pmBBox; + + return newBbox; + } + + return bboxTotal; - return newBbox; } /** + * @name: translateBBox * @description: This function translates a bbox that crosses the antimeridian * @param {Array} bbox * @returns {Array} bbox with the antimeridian corrected @@ -224,11 +254,11 @@ class GeoStoreService { logger.debug('Converting bbox from [-180,180] to [0,360] for representation'); const newBBox = [bbox[0], bbox[1], 360 - Math.abs(bbox[2]), bbox[3]]; return newBBox; - } /** - * @description: swap a bbox. If a bbox that crosses + * @name: swapBBox + * @description: swap a bbox. If a bbox crosses * the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] * @param {geoStore} geoStore @@ -241,11 +271,13 @@ class GeoStoreService { const bbox = await turf.featureReduce(geoStore.geojson, (previousValue, currentFeature) => GeoStoreService.crossAntimeridian(currentFeature, previousValue), orgBbox); + return bbox[0] > bbox[2] ? GeoStoreService.translateBBox(bbox) : bbox; } /** + * @name: calculateBBox * @description: Calculates a bbox. * If a bbox that crosses the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] diff --git a/app/src/services/geoStoreServiceV2.js b/app/src/services/geoStoreServiceV2.js index 83325df..73bccf0 100644 --- a/app/src/services/geoStoreServiceV2.js +++ b/app/src/services/geoStoreServiceV2.js @@ -155,9 +155,130 @@ class GeoStoreServiceV2 { } } + // @TODO: Extract bbox handeling to its own class + /** + * @name overFlooded + * @description check if the geometry overflows the [-180, -90, 180, 90] box + * @param {*} bbox + * @returns boolean + */ + static overFlooded(bbox) { + return bbox[0] > 180 || bbox[2] > 180; + } + + /** + * @name bboxToPolygon + * @description converts a bbox to a polygon + * @param {Array} bbox + * @returns {Polygon} + */ + static bboxToPolygon(bbox) { + return turf.polygon([[[bbox[2], bbox[3]], [bbox[2], bbox[1]], + [bbox[0], bbox[1]], [bbox[0], bbox[3]], + [bbox[2], bbox[3]]]]); + } + + /** + * @name: crossAntiMeridian + * @description: checks if a bbox crosses the antimeridian + * this is a mirror of https://github.com/mapbox/carmen/blob/03fac2d7397ecdfcb4f0828fcfd9d8a54c845f21/lib/util/bbox.js#L59 + * @param {Array} bbox A bounding box array in the format [minX, minY, maxX, maxY] + * @returns {Boolean} + * + */ + static async crossAntimeridian(feature, bbox) { + logger.info('Checking antimeridian'); + + const geomTypes = ['Point', 'MultiPoint']; + const bboxTotal = bbox || turf.bbox(feature); + const westHemiBBox = [-180, -90, 0, 90]; + const eastHemiBBox = [0, -90, 180, 90]; + const antimeridian = this.overFlooded(bbox); + + if (geomTypes.includes(turf.getType(feature))) { + /** + * if the geometry is a triangle geometry length is 4 and + * the points are spread among hemispheres bbox calc over each + * hemisphere will be wrong + * This will need its own development + */ + logger.debug('Multipoint or point geometry'); + return bboxTotal; + } + + if (antimeridian) { + logger.debug('BBOX crosses antimeridian but is in [0, 360º]'); + return bboxTotal; + } + + if (turf.booleanIntersects(feature, this.bboxToPolygon(eastHemiBBox)) + && turf.booleanIntersects(feature, this.bboxToPolygon(westHemiBBox))) { + logger.debug('Geometry that is contained in both hemispheres'); + + const clippedEastGeom = turf.bboxClip(feature, eastHemiBBox); + const clippedWestGeom = turf.bboxClip(feature, westHemiBBox); + const bboxEast = turf.bbox(clippedEastGeom); + const bboxWest = turf.bbox(clippedWestGeom); + + const amBBox = [bboxEast[0], bboxTotal[1], bboxWest[2], bboxTotal[3]]; + const pmBBox = [bboxWest[0], bboxTotal[1], bboxEast[2], bboxTotal[3]]; + + const pmBBoxWidth = (bboxEast[2]) + Math.abs(bboxWest[0]); + const amBBoxWidth = (180 - bboxEast[0]) + (180 - Math.abs(bboxWest[2])); + + const newBbox = (pmBBoxWidth > amBBoxWidth) ? amBBox : pmBBox; + + return newBbox; + } + + return bboxTotal; + + } + + /** + * @name: translateBBox + * @description: This function translates a bbox that crosses the antimeridian + * @param {Array} bbox + * @returns {Array} bbox with the antimeridian corrected + */ + static translateBBox(bbox) { + logger.debug('Converting bbox from [-180,180] to [0,360] for representation'); + const newBBox = [bbox[0], bbox[1], 360 - Math.abs(bbox[2]), bbox[3]]; + return newBBox; + } + + /** + * @name: swapBBox + * @description: swap a bbox. If a bbox crosses + * the antimeridian will be transformed its + * latitudes from [-180, 180] to [0, 360] + * @param {geoStore} geoStore + * @returns {bbox} + * + * */ + static async swapBBox(geoStore) { + + const orgBbox = turf.bbox(geoStore.geojson); + const bbox = await turf.featureReduce(geoStore.geojson, + (previousValue, currentFeature) => GeoStoreServiceV2.crossAntimeridian(currentFeature, previousValue), + orgBbox); + + return bbox[0] > bbox[2] ? GeoStoreServiceV2.translateBBox(bbox) : bbox; + + } + + /** + * @name: calculateBBox + * @description: Calculates a bbox. + * If a bbox that crosses the antimeridian will be transformed its + * latitudes from [-180, 180] to [0, 360] + * @param {geoStore} geoStore + * @returns {geoStore} + * + * */ static async calculateBBox(geoStore) { logger.debug('Calculating bbox'); - geoStore.bbox = turf.bbox(geoStore.geojson); + geoStore.bbox = await GeoStoreServiceV2.swapBBox(geoStore); await geoStore.save(); return geoStore; } @@ -230,7 +351,7 @@ class GeoStoreServiceV2 { hash: geoStore.hash }); if (!geoStore.bbox) { - geoStore.bbox = turf.bbox(geoStore.geojson); + geoStore.bbox = await GeoStoreServiceV2.swapBBox(geoStore); } await GeoStore.findOneAndUpdate({ hash: geoStore.hash }, geoStore, { @@ -264,7 +385,7 @@ class GeoStoreServiceV2 { geoStore.geojson = GeoJSONConverter.makeFeatureCollection(geoStore.geojson); logger.debug('Result', JSON.stringify(geoStore.geojson)); geoStore.areaHa = turf.area(geoStore.geojson) / 10000; // convert to ha2 - geoStore.bbox = turf.bbox(geoStore.geojson); + geoStore.bbox = await GeoStoreServiceV2.swapBBox(geoStore); return geoStore; diff --git a/app/test/e2e/utils/test.constants.js b/app/test/e2e/utils/test.constants.js index bd24ebf..4901b91 100644 --- a/app/test/e2e/utils/test.constants.js +++ b/app/test/e2e/utils/test.constants.js @@ -1,67 +1,83 @@ const DEFAULT_GEOJSON = { type: 'FeatureCollection', - features: [{ - type: 'Feature', - properties: {}, - geometry: { - type: 'MultiPoint', - coordinates: [ - [ - 14.26438308756265, - 14.062500000000002 + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'MultiPoint', + coordinates: [ + [14.26438308756265, 14.062500000000002], + [5.266007882805498, 2.8125], + [44.84029065139799, 16.523437500000004], ], - [ - 5.266007882805498, - 2.8125 - ], - [ - 44.84029065139799, - 16.523437500000004 - ], - ] - } - }], + }, + }, + ], }; -const ANTIMERIDIAN_GEOJSON = { +const ANTIMERIDIAN_GEOJSON_WRONG = { type: 'FeatureCollection', - features: [{ - type: 'Feature', - properties: {}, - geometry: { - type: 'Polygon', - coordinates: [ - [ + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Polygon', + coordinates: [ [ - 177.066650390625, - -20.663626054152797 + [177.066650390625, -20.663626054152797], + [-173.759765625, -20.663626054152797], + [-173.759765625, -13.218555949175457], + [177.066650390625, -13.218555949175457], + [177.066650390625, -20.663626054152797], ], - [ - -173.759765625, - -20.663626054152797 + ], + }, + }, + ], +}; + +const ANTIMERIDIAN_GEOJSON = { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'MultiPolygon', + coordinates: [ + [[ + [176.515420, -34.184289], + [180, -34.184289], + [180, -27.592584], + [176.515420, -27.592584], + [176.515420, -34.184289], ], - [ - -173.759765625, - -13.218555949175457 ], - [ - 177.066650390625, - -13.218555949175457 + [[ + [-180, -34.184289], + [-173, -34.184289], + [-173, -27.592584], + [-180, -27.592584], + [-180, -34.184289], ], - [ - 177.066650390625, - -20.663626054152797 ] - ] - ] + ], + }, } - }], + ], }; -const MOCK_RESULT_CARTODB = [{ - geojson: '{"type":"MultiPolygon","coordinates":[[[[7.4134,43.7346],[7.4396,43.7492],[7.4179,43.7226],[7.4095,43.7299],[7.4134,43.7346]]]]}', - area_ha: 235.490994944, - name: 'Monaco' -}]; +const MOCK_RESULT_CARTODB = [ + { + geojson: + '{"type":"MultiPolygon","coordinates":[[[[7.4134,43.7346],[7.4396,43.7492],[7.4179,43.7226],[7.4095,43.7299],[7.4134,43.7346]]]]}', + area_ha: 235.490994944, + name: 'Monaco', + }, +]; -module.exports = { DEFAULT_GEOJSON, ANTIMERIDIAN_GEOJSON, MOCK_RESULT_CARTODB }; +module.exports = { + DEFAULT_GEOJSON, ANTIMERIDIAN_GEOJSON, ANTIMERIDIAN_GEOJSON_WRONG, MOCK_RESULT_CARTODB +}; diff --git a/app/test/e2e/v1/geostore-get.spec.js b/app/test/e2e/v1/geostore-get.spec.js index 06aa3b8..be8b4e8 100644 --- a/app/test/e2e/v1/geostore-get.spec.js +++ b/app/test/e2e/v1/geostore-get.spec.js @@ -85,10 +85,10 @@ describe('Geostore v1 tests - Get geostores', () => { geojson.should.deep.equal(expectedGeojson); bbox.should.instanceOf(Array); bbox.should.deep.equal([ - 176.55029296875, - -20.11783963049162, - 183.09814453125, - -14.827991347352068 + 176.51542, + -34.184289, + 187, + -27.592584 ]); hash.should.equal(createdGeostore.hash); }); diff --git a/app/test/e2e/v2/geostore-get.spec.js b/app/test/e2e/v2/geostore-get.spec.js index 7844ce7..94a2a9b 100644 --- a/app/test/e2e/v2/geostore-get.spec.js +++ b/app/test/e2e/v2/geostore-get.spec.js @@ -84,10 +84,10 @@ describe('Geostore v2 tests - Get geostores', () => { geojson.should.deep.equal(expectedGeojson); bbox.should.instanceOf(Array); bbox.should.deep.equal([ - 176.55029296875, - -20.11783963049162, - 183.09814453125, - -14.827991347352068 + 176.51542, + -34.184289, + 187, + -27.592584 ]); hash.should.equal(createdGeostore.hash); }); From ee959668171c8fef3ce1726b388aa44f0d574d0c Mon Sep 17 00:00:00 2001 From: Alicia Date: Tue, 21 Dec 2021 16:31:49 +0100 Subject: [PATCH 10/12] update descriptions of functions --- app/src/services/geoStoreService.js | 8 ++++---- app/src/services/geoStoreServiceV2.js | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/services/geoStoreService.js b/app/src/services/geoStoreService.js index f9e698f..75145d9 100644 --- a/app/src/services/geoStoreService.js +++ b/app/src/services/geoStoreService.js @@ -168,8 +168,8 @@ class GeoStoreService { /** * @name overFlooded * @description check if the geometry overflows the [-180, -90, 180, 90] box - * @param {*} bbox - * @returns boolean + * @param {Array} bbox + * @returns {boolean} */ static overFlooded(bbox) { return bbox[0] > 180 || bbox[2] > 180; @@ -192,7 +192,7 @@ class GeoStoreService { * @description: checks if a bbox crosses the antimeridian * this is a mirror of https://github.com/mapbox/carmen/blob/03fac2d7397ecdfcb4f0828fcfd9d8a54c845f21/lib/util/bbox.js#L59 * @param {Array} bbox A bounding box array in the format [minX, minY, maxX, maxY] - * @returns {Boolean} + * @returns {Array} * */ static async crossAntimeridian(feature, bbox) { @@ -262,7 +262,7 @@ class GeoStoreService { * the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] * @param {geoStore} geoStore - * @returns {bbox} + * @returns {Array} * * */ static async swapBBox(geoStore) { diff --git a/app/src/services/geoStoreServiceV2.js b/app/src/services/geoStoreServiceV2.js index 73bccf0..929134c 100644 --- a/app/src/services/geoStoreServiceV2.js +++ b/app/src/services/geoStoreServiceV2.js @@ -159,7 +159,7 @@ class GeoStoreServiceV2 { /** * @name overFlooded * @description check if the geometry overflows the [-180, -90, 180, 90] box - * @param {*} bbox + * @param {Array} bbox * @returns boolean */ static overFlooded(bbox) { @@ -183,7 +183,7 @@ class GeoStoreServiceV2 { * @description: checks if a bbox crosses the antimeridian * this is a mirror of https://github.com/mapbox/carmen/blob/03fac2d7397ecdfcb4f0828fcfd9d8a54c845f21/lib/util/bbox.js#L59 * @param {Array} bbox A bounding box array in the format [minX, minY, maxX, maxY] - * @returns {Boolean} + * @returns {Array} * */ static async crossAntimeridian(feature, bbox) { @@ -253,7 +253,7 @@ class GeoStoreServiceV2 { * the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] * @param {geoStore} geoStore - * @returns {bbox} + * @returns {Array} * * */ static async swapBBox(geoStore) { From 653156b1479b8c0ccc24a4a4b1cff588cdf2f69d Mon Sep 17 00:00:00 2001 From: Tiago Garcia Date: Wed, 22 Dec 2021 07:34:07 +0000 Subject: [PATCH 11/12] Code simplification --- app/src/services/geoStoreService.js | 69 +++++++++++++-------------- app/src/services/geoStoreServiceV2.js | 66 ++++++++++++------------- 2 files changed, 67 insertions(+), 68 deletions(-) diff --git a/app/src/services/geoStoreService.js b/app/src/services/geoStoreService.js index 75145d9..894f83c 100644 --- a/app/src/services/geoStoreService.js +++ b/app/src/services/geoStoreService.js @@ -85,7 +85,10 @@ class GeoStoreService { static async obtainGeoJSONOfCarto(table, user, filter) { logger.debug('Obtaining geojson with params: table %s, user %s, filter %s', table, user, filter); logger.debug('Generating query'); - const sql = `SELECT ST_AsGeoJson(the_geom) as geojson, (ST_Area(geography(the_geom))/10000) as area_ha FROM ${table} WHERE ${filter}`; + const sql = `SELECT ST_AsGeoJson(the_geom) as geojson, + (ST_Area(geography(the_geom)) / 10000) as area_ha + FROM ${table} + WHERE ${filter}`; logger.debug('SQL to obtain geojson: %s', sql); const client = new CartoDB.SQL({ user @@ -142,13 +145,11 @@ class GeoStoreService { } static async getGeostoreByInfoProps(infoQuery) { - const geoStore = await GeoStore.findOne(infoQuery); - return geoStore; + return GeoStore.findOne(infoQuery); } static async getGeostoreByInfo(info) { - const geoStore = await GeoStore.findOne({ info }); - return geoStore; + return GeoStore.findOne({ info }); } static async obtainGeoJSON(provider) { @@ -164,14 +165,14 @@ class GeoStoreService { } } - // @TODO: Extract bbox handeling to its own class + // @TODO: Extract bbox handling to its own class /** - * @name overFlooded + * @name overflowsAntimeridian * @description check if the geometry overflows the [-180, -90, 180, 90] box * @param {Array} bbox * @returns {boolean} */ - static overFlooded(bbox) { + static overflowsAntimeridian(bbox) { return bbox[0] > 180 || bbox[2] > 180; } @@ -195,33 +196,35 @@ class GeoStoreService { * @returns {Array} * */ - static async crossAntimeridian(feature, bbox) { + static crossAntimeridian(feature, bbox) { logger.info('Checking antimeridian'); const geomTypes = ['Point', 'MultiPoint']; const bboxTotal = bbox || turf.bbox(feature); const westHemiBBox = [-180, -90, 0, 90]; const eastHemiBBox = [0, -90, 180, 90]; - const antimeridian = this.overFlooded(bbox); + const overflowsAntimeridian = this.overflowsAntimeridian(bbox); if (geomTypes.includes(turf.getType(feature))) { - /** - * if the geometry is a triangle geometry length is 4 and - * the points are spread among hemispheres bbox calc over each - * hemisphere will be wrong - * This will need its own development - */ + /** + * if the geometry is a triangle geometry length is 4 and + * the points are spread among hemispheres bbox calc over each + * hemisphere will be wrong + * This will need its own development + */ logger.debug('Multipoint or point geometry'); return bboxTotal; } - if (antimeridian) { + if (overflowsAntimeridian) { logger.debug('BBOX crosses antimeridian but is in [0, 360º]'); return bboxTotal; } - if (turf.booleanIntersects(feature, this.bboxToPolygon(eastHemiBBox)) - && turf.booleanIntersects(feature, this.bboxToPolygon(westHemiBBox))) { + if ( + turf.booleanIntersects(feature, this.bboxToPolygon(eastHemiBBox)) + && turf.booleanIntersects(feature, this.bboxToPolygon(westHemiBBox)) + ) { logger.debug('Geometry that is contained in both hemispheres'); const clippedEastGeom = turf.bboxClip(feature, eastHemiBBox); @@ -235,9 +238,7 @@ class GeoStoreService { const pmBBoxWidth = (bboxEast[2]) + Math.abs(bboxWest[0]); const amBBoxWidth = (180 - bboxEast[0]) + (180 - Math.abs(bboxWest[2])); - const newBbox = (pmBBoxWidth > amBBoxWidth) ? amBBox : pmBBox; - - return newBbox; + return (pmBBoxWidth > amBBoxWidth) ? amBBox : pmBBox; } return bboxTotal; @@ -252,8 +253,7 @@ class GeoStoreService { */ static translateBBox(bbox) { logger.debug('Converting bbox from [-180,180] to [0,360] for representation'); - const newBBox = [bbox[0], bbox[1], 360 - Math.abs(bbox[2]), bbox[3]]; - return newBBox; + return [bbox[0], bbox[1], 360 - Math.abs(bbox[2]), bbox[3]]; } /** @@ -261,19 +261,19 @@ class GeoStoreService { * @description: swap a bbox. If a bbox crosses * the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] - * @param {geoStore} geoStore + * @param {GeoStore} geoStore * @returns {Array} * * */ - static async swapBBox(geoStore) { - + static swapBBox(geoStore) { const orgBbox = turf.bbox(geoStore.geojson); - const bbox = await turf.featureReduce(geoStore.geojson, + const bbox = turf.featureReduce( + geoStore.geojson, (previousValue, currentFeature) => GeoStoreService.crossAntimeridian(currentFeature, previousValue), - orgBbox); + orgBbox + ); return bbox[0] > bbox[2] ? GeoStoreService.translateBBox(bbox) : bbox; - } /** @@ -281,13 +281,13 @@ class GeoStoreService { * @description: Calculates a bbox. * If a bbox that crosses the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] - * @param {geoStore} geoStore + * @param {GeoStore} geoStore * @returns {geoStore} * * */ static async calculateBBox(geoStore) { logger.debug('Calculating bbox'); - geoStore.bbox = await GeoStoreService.swapBBox(geoStore); + geoStore.bbox = GeoStoreService.swapBBox(geoStore); await geoStore.save(); return geoStore; } @@ -353,7 +353,7 @@ class GeoStoreService { logger.debug('bbox geostore'); logger.debug('geojson', JSON.stringify(geoStore.bbox)); if (!geoStore.bbox) { - geoStore.bbox = await GeoStoreService.swapBBox(geoStore); + geoStore.bbox = GeoStoreService.swapBBox(geoStore); } return GeoStore.findOneAndUpdate({ hash: geoStore.hash }, geoStore, { @@ -379,8 +379,7 @@ class GeoStoreService { geoStore.areaHa = geoJsonObtained.area_ha; } - logger.debug('Converting geojson'); - logger.debug('Converting', JSON.stringify(geoStore.geojson)); + logger.debug('Converting geojson', JSON.stringify(geoStore.geojson)); geoStore.geojson = GeoJSONConverter.makeFeatureCollection(geoStore.geojson); logger.debug('Result', JSON.stringify(geoStore.geojson)); geoStore.areaHa = turf.area(geoStore.geojson) / 10000; // convert to ha2 diff --git a/app/src/services/geoStoreServiceV2.js b/app/src/services/geoStoreServiceV2.js index 929134c..9e3a08b 100644 --- a/app/src/services/geoStoreServiceV2.js +++ b/app/src/services/geoStoreServiceV2.js @@ -76,7 +76,10 @@ class GeoStoreServiceV2 { static async obtainGeoJSONOfCarto(table, user, filter) { logger.debug('Obtaining geojson with params: table %s, user %s, filter %s', table, user, filter); logger.debug('Generating query'); - const sql = `SELECT ST_AsGeoJson(the_geom) as geojson, (ST_Area(geography(the_geom))/10000) as area_ha FROM ${table} WHERE ${filter}`; + const sql = `SELECT ST_AsGeoJson(the_geom) as geojson, + (ST_Area(geography(the_geom)) / 10000) as area_ha + FROM ${table} + WHERE ${filter}`; logger.debug('SQL to obtain geojson: %s', sql); const client = new CartoDB.SQL({ user @@ -138,8 +141,7 @@ class GeoStoreServiceV2 { } static async getGeostoreByInfo(info) { - const geoStore = await GeoStore.findOne({ info }); - return geoStore; + return GeoStore.findOne({ info }); } static async obtainGeoJSON(provider) { @@ -155,14 +157,14 @@ class GeoStoreServiceV2 { } } - // @TODO: Extract bbox handeling to its own class + // @TODO: Extract bbox handling to its own class /** - * @name overFlooded + * @name overflowsAntimeridian * @description check if the geometry overflows the [-180, -90, 180, 90] box * @param {Array} bbox * @returns boolean */ - static overFlooded(bbox) { + static overflowsAntimeridian(bbox) { return bbox[0] > 180 || bbox[2] > 180; } @@ -186,33 +188,35 @@ class GeoStoreServiceV2 { * @returns {Array} * */ - static async crossAntimeridian(feature, bbox) { + static crossAntimeridian(feature, bbox) { logger.info('Checking antimeridian'); const geomTypes = ['Point', 'MultiPoint']; const bboxTotal = bbox || turf.bbox(feature); const westHemiBBox = [-180, -90, 0, 90]; const eastHemiBBox = [0, -90, 180, 90]; - const antimeridian = this.overFlooded(bbox); + const overflowsAntimeridian = this.overflowsAntimeridian(bbox); if (geomTypes.includes(turf.getType(feature))) { - /** - * if the geometry is a triangle geometry length is 4 and - * the points are spread among hemispheres bbox calc over each - * hemisphere will be wrong - * This will need its own development - */ + /** + * if the geometry is a triangle geometry length is 4 and + * the points are spread among hemispheres bbox calc over each + * hemisphere will be wrong + * This will need its own development + */ logger.debug('Multipoint or point geometry'); return bboxTotal; } - if (antimeridian) { + if (overflowsAntimeridian) { logger.debug('BBOX crosses antimeridian but is in [0, 360º]'); return bboxTotal; } - if (turf.booleanIntersects(feature, this.bboxToPolygon(eastHemiBBox)) - && turf.booleanIntersects(feature, this.bboxToPolygon(westHemiBBox))) { + if ( + turf.booleanIntersects(feature, this.bboxToPolygon(eastHemiBBox)) + && turf.booleanIntersects(feature, this.bboxToPolygon(westHemiBBox)) + ) { logger.debug('Geometry that is contained in both hemispheres'); const clippedEastGeom = turf.bboxClip(feature, eastHemiBBox); @@ -226,9 +230,7 @@ class GeoStoreServiceV2 { const pmBBoxWidth = (bboxEast[2]) + Math.abs(bboxWest[0]); const amBBoxWidth = (180 - bboxEast[0]) + (180 - Math.abs(bboxWest[2])); - const newBbox = (pmBBoxWidth > amBBoxWidth) ? amBBox : pmBBox; - - return newBbox; + return (pmBBoxWidth > amBBoxWidth) ? amBBox : pmBBox; } return bboxTotal; @@ -243,8 +245,7 @@ class GeoStoreServiceV2 { */ static translateBBox(bbox) { logger.debug('Converting bbox from [-180,180] to [0,360] for representation'); - const newBBox = [bbox[0], bbox[1], 360 - Math.abs(bbox[2]), bbox[3]]; - return newBBox; + return [bbox[0], bbox[1], 360 - Math.abs(bbox[2]), bbox[3]]; } /** @@ -252,19 +253,19 @@ class GeoStoreServiceV2 { * @description: swap a bbox. If a bbox crosses * the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] - * @param {geoStore} geoStore + * @param {GeoStore} geoStore * @returns {Array} * * */ - static async swapBBox(geoStore) { - + static swapBBox(geoStore) { const orgBbox = turf.bbox(geoStore.geojson); - const bbox = await turf.featureReduce(geoStore.geojson, + const bbox = turf.featureReduce( + geoStore.geojson, (previousValue, currentFeature) => GeoStoreServiceV2.crossAntimeridian(currentFeature, previousValue), - orgBbox); + orgBbox + ); return bbox[0] > bbox[2] ? GeoStoreServiceV2.translateBBox(bbox) : bbox; - } /** @@ -272,13 +273,13 @@ class GeoStoreServiceV2 { * @description: Calculates a bbox. * If a bbox that crosses the antimeridian will be transformed its * latitudes from [-180, 180] to [0, 360] - * @param {geoStore} geoStore + * @param {GeoStore} geoStore * @returns {geoStore} * * */ static async calculateBBox(geoStore) { logger.debug('Calculating bbox'); - geoStore.bbox = await GeoStoreServiceV2.swapBBox(geoStore); + geoStore.bbox = GeoStoreServiceV2.swapBBox(geoStore); await geoStore.save(); return geoStore; } @@ -351,7 +352,7 @@ class GeoStoreServiceV2 { hash: geoStore.hash }); if (!geoStore.bbox) { - geoStore.bbox = await GeoStoreServiceV2.swapBBox(geoStore); + geoStore.bbox = GeoStoreServiceV2.swapBBox(geoStore); } await GeoStore.findOneAndUpdate({ hash: geoStore.hash }, geoStore, { @@ -380,8 +381,7 @@ class GeoStoreServiceV2 { geoStore.areaHa = geoJsonObtained.area_ha; } - logger.debug('Converting geojson'); - logger.debug('Converting', JSON.stringify(geoStore.geojson)); + logger.debug('Converting geojson', JSON.stringify(geoStore.geojson)); geoStore.geojson = GeoJSONConverter.makeFeatureCollection(geoStore.geojson); logger.debug('Result', JSON.stringify(geoStore.geojson)); geoStore.areaHa = turf.area(geoStore.geojson) / 10000; // convert to ha2 From 1636286a1fab04c1308d0256b55c9a45bb2867eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 00:40:58 +0000 Subject: [PATCH 12/12] Bump pathval from 1.1.0 to 1.1.1 Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/chaijs/pathval/releases) - [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md) - [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: pathval dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b5cfd3a..270d807 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6265,9 +6265,9 @@ path-type@^4.0.0: integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== pathval@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== performance-now@^2.1.0: version "2.1.0"