From b6b20ff16c022d715b0b7a8e8382046461c60d87 Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Thu, 30 Nov 2023 10:12:36 -0500 Subject: [PATCH] v0.6.52 --- CHANGELOG.md | 6 +++++- REFERENCE.md | 10 +++++++--- package-lock.json | 4 ++-- package.json | 4 ++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2679ad07..a76d1d28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v0.6.52 +* Added -calc + option, which saves calc output to a new layer. +* Added -info + option, which saves info output to a new layer. + v0.6.51 * Improved support for running applyCommands() api function in a web browser. @@ -17,7 +21,7 @@ v0.6.47 v0.6.46 * Added save to clipboard option to web UI export menu. -* In -each expressions, `this.geojson` setter now accepts nulls and FeatureCollectsions in addition to single Features. +* In -each expressions, `this.geojson` setter now accepts nulls and FeatureCollections in addition to single Features. v0.6.45 * Added -o hoist= option for moving GeoJSON Feature properties to the root of each Feature. diff --git a/REFERENCE.md b/REFERENCE.md index 0b6a8633..18e7e93e 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1,6 +1,6 @@ # COMMAND REFERENCE -This documentation applies to version 0.6.47 of mapshaper's command line program. Run `mapshaper -v` to check your version. For an introduction to the command line tool, read [this page](https://github.com/mbloch/mapshaper/wiki/Introduction-to-the-Command-Line-Tool) first. +This documentation applies to version 0.6.52 of mapshaper's command line program. Run `mapshaper -v` to check your version. For an introduction to the command line tool, read [this page](https://github.com/mbloch/mapshaper/wiki/Introduction-to-the-Command-Line-Tool) first. ## Command line syntax @@ -602,6 +602,7 @@ Polygon layers - `this.centroidY` Y-coord of centroid - `this.innerX` X-coord of an interior point (for anchoring symbols or labels) - `this.innerY` Y-coord of an interior point +- `this.perimeter` Perimeter of each feature. For lat-long datasets, returns length in meters. Polyline layers - `this.length` Length of each polyline feature. For lat-long datasets, returns length in meters. @@ -1518,8 +1519,9 @@ mapshaper data.csv \ `` or `expression=` JS expression containing calls to one or more `-calc` functions. `where=` Perform calculations on a subset of records, using a boolean JS expression as a filter (similar to [`-filter`](#-filter) command). - -Common options: `target=` +`+` Save output to a layer. +`name=` Name the output layer (default name is "calc"). +`target=` **Examples** @@ -1559,6 +1561,8 @@ mapshaper mystery_file.json -info ``` `save-to=` Save information to a .json file. +`+` Save output to a layer. +`name=` Name the output layer (default name is "info"). ### -inspect diff --git a/package-lock.json b/package-lock.json index 771258e2..56037ab4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mapshaper", - "version": "0.6.51", + "version": "0.6.52", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mapshaper", - "version": "0.6.51", + "version": "0.6.52", "license": "MPL-2.0", "dependencies": { "@placemarkio/tokml": "^0.3.3", diff --git a/package.json b/package.json index de8bad3f..7bda8c5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapshaper", - "version": "0.6.51", + "version": "0.6.52", "description": "A tool for editing vector datasets for mapping and GIS.", "keywords": [ "shapefile", @@ -76,7 +76,7 @@ "mocha": { "reporter": "dot", "node-option": [ - "experimental-specifier-resolution=node" + "experimental-loader=./test/_loader.js" ], "check-leaks": true, "parallel": true,