Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// ---------------------------------------------------------------------------------------------------------------------
// GeoJSONUtils
//
// @module
// ---------------------------------------------------------------------------------------------------------------------
const area = require('@turf/area').default;
const _ = require('lodash');
// ---------------------------------------------------------------------------------------------------------------------
class GeoJSONUtils {
constructor() {
}
/**
* Checks to see if the feature is a Polygon formatted as a MultiPolygon.
*
* @param {Polygon} polygon
* @returns {Polygon}
*/
fixMultiPoly(polygon) {
if(polygon.geometry.type === 'MultiPolygon' && polygon.geometry.coordinates[0].length === 1) {