From 82a8ff2de570fc6b24c219cc3bf4c66f19606c2c Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Sat, 24 Jun 2023 00:46:55 -0400 Subject: [PATCH] v0.6.31 --- CHANGELOG.md | 4 ++++ package-lock.json | 18 +++++++++--------- package.json | 4 ++-- src/gui/gui-import-control.mjs | 2 +- www/index.html | 17 +++++++++-------- www/modules.js | 5 ++++- www/page.css | 4 ++++ 7 files changed, 33 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae7d8193..65ccf08a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v0.6.31 +* Updates to gui file import dialog +* Updated projection library + v0.6.30 * Added -filter-fields invert option. diff --git a/package-lock.json b/package-lock.json index 750e83f0..ea70faf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mapshaper", - "version": "0.6.30", + "version": "0.6.31", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mapshaper", - "version": "0.6.30", + "version": "0.6.31", "license": "MPL-2.0", "dependencies": { "@placemarkio/tokml": "^0.3.3", @@ -25,7 +25,7 @@ "iconv-lite": "^0.6.3", "idb-keyval": "^6.2.0", "kdbush": "^3.0.0", - "mproj": "0.0.36", + "mproj": "0.0.37", "msgpackr": "^1.8.5", "opn": "^5.3.0", "rw": "~1.3.3", @@ -2532,9 +2532,9 @@ } }, "node_modules/mproj": { - "version": "0.0.36", - "resolved": "https://registry.npmjs.org/mproj/-/mproj-0.0.36.tgz", - "integrity": "sha512-8pT4bHQ4CjgwWC/psuBdVFEsQhqJTdFoR6zM4BrbIYNZLqeA/OWRBuFeH/CMxupOlcACuJwHlgmqDBWD+iGUeA==", + "version": "0.0.37", + "resolved": "https://registry.npmjs.org/mproj/-/mproj-0.0.37.tgz", + "integrity": "sha512-UtLQa2UyFQJuwqpLWd6TF3xYNE7nGTQWvwtXHBdpEAn8F/QHP1yTjqvo2CaQem9LcSQoiZLCHP1fRU4uCWzBVw==", "dependencies": { "geographiclib": "1.48.0", "rw": "~1.3.2" @@ -5311,9 +5311,9 @@ } }, "mproj": { - "version": "0.0.36", - "resolved": "https://registry.npmjs.org/mproj/-/mproj-0.0.36.tgz", - "integrity": "sha512-8pT4bHQ4CjgwWC/psuBdVFEsQhqJTdFoR6zM4BrbIYNZLqeA/OWRBuFeH/CMxupOlcACuJwHlgmqDBWD+iGUeA==", + "version": "0.0.37", + "resolved": "https://registry.npmjs.org/mproj/-/mproj-0.0.37.tgz", + "integrity": "sha512-UtLQa2UyFQJuwqpLWd6TF3xYNE7nGTQWvwtXHBdpEAn8F/QHP1yTjqvo2CaQem9LcSQoiZLCHP1fRU4uCWzBVw==", "requires": { "geographiclib": "1.48.0", "rw": "~1.3.2" diff --git a/package.json b/package.json index 6d96a261..a840e418 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapshaper", - "version": "0.6.30", + "version": "0.6.31", "description": "A tool for editing vector datasets for mapping and GIS.", "keywords": [ "shapefile", @@ -56,7 +56,7 @@ "iconv-lite": "^0.6.3", "idb-keyval": "^6.2.0", "kdbush": "^3.0.0", - "mproj": "0.0.36", + "mproj": "0.0.37", "msgpackr": "^1.8.5", "opn": "^5.3.0", "rw": "~1.3.3", diff --git a/src/gui/gui-import-control.mjs b/src/gui/gui-import-control.mjs index 28fcb018..e07865cc 100644 --- a/src/gui/gui-import-control.mjs +++ b/src/gui/gui-import-control.mjs @@ -371,7 +371,7 @@ export function ImportControl(gui, opts) { var freeform = El('#import-options .advanced-options').node().value; importOpts = GUI.parseFreeformOptions(freeform, 'i'); importOpts.no_repair = !El("#repair-intersections-opt").node().checked; - importOpts.snap = !!El("#snap-points-opt").node().checked; + // importOpts.snap = !!El("#snap-points-opt").node().checked; } return importOpts; } diff --git a/www/index.html b/www/index.html index ac3d6ef7..22cbe19b 100644 --- a/www/index.html +++ b/www/index.html @@ -100,7 +100,8 @@

Layers

-

Sources

+ +

Source files

Add a file
@@ -192,8 +193,8 @@

Simplification

?
-
Interpret x, y values as Cartesian coordinates -on a plane, rather than longitude, latitude +
Treat x, y values as Cartesian coordinates +on a plane, rather than as longitude, latitude coordinates on a sphere.
@@ -256,7 +257,7 @@

Quick import

-
+
?
Enter options from the command line -interface. Examples: "no-topology" -"encoding=big5"
+interface. Examples: no-topology +encoding=big5 diff --git a/www/modules.js b/www/modules.js index caa1d7f1..ad497744 100644 --- a/www/modules.js +++ b/www/modules.js @@ -12530,7 +12530,10 @@ function wkt_unpack(str) { str = convert_wkt_quotes(str); // Convert WKT entities to JSON arrays - str = str.replace(/([A-Z0-9]+)\[/g, '["$1",'); + // str = str.replace(/([A-Z0-9]+)\[/g, '["$1",'); + // Changed to ignore some names that look like entities, like "GCS_TWD97[2020]" + // allow only [ or , character before the next quote (i.e. block close quotes) + str = str.replace(/([A-Z0-9]+)\[(?![^"]*[^\[,"]")/g, '["$1",'); // Enclose axis keywords in quotes to create valid JSON strings str = str.replace(/, *([a-zA-Z]+) *(?=[,\]])/g, ',"$1"'); diff --git a/www/page.css b/www/page.css index d00b183c..315fad5e 100644 --- a/www/page.css +++ b/www/page.css @@ -531,6 +531,10 @@ body.dragover #import-options-drop-area .drop-area { font-weight: normal; } +.info-box h3.list-header { + margin-bottom: 0.1em; +} + .info-box h4 { font-size: 1.085em; font-weight: normal;