@flatten-js/core
Advanced tools
Comparing version 1.5.7 to 1.5.8
{ | ||
"name": "@flatten-js/core", | ||
"version": "1.5.7", | ||
"version": "1.5.8", | ||
"description": "Javascript library for 2d geometry", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.cjs", |
@@ -58,3 +58,6 @@ import {Multiline, Point, Segment, Polygon} from "../../index"; | ||
function parseMutliPolygon(multiPolygonString) { | ||
const polygonStrings = multiPolygonString.split('?') | ||
// const polygonStrings = multiPolygonString.split('?') | ||
// Split the string by the delimiter ")), ((" which separates the polygons | ||
const polygonStrings = multiPolygonString.split(/\)\), \(\(/).map(polygon => '((' + polygon + '))'); | ||
const polygons = polygonStrings.map(parseSinglePolygon) | ||
@@ -73,3 +76,4 @@ const polygon = new Polygon() | ||
else { | ||
const multiPolygonString = wkt.replace(/^MULTIPOLYGON \(/, '').replace(/\)$/, '').replace(/\)\), \(\(/,'))?((') | ||
// const multiPolygonString = wkt.replace(/^MULTIPOLYGON \(/, '').replace(/\)$/, '').replace(/\)\), \(\(/,'))?((') | ||
const multiPolygonString = wkt.replace(/^MULTIPOLYGON \(\(\((.*)\)\)\)$/, '$1'); | ||
return parseMutliPolygon(multiPolygonString) | ||
@@ -76,0 +80,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1230245
31479