From 9eaff706855e436171df3685099c1bd8470073e7 Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Sun, 11 Feb 2024 21:01:57 -0500 Subject: [PATCH] v0.6.62 --- CHANGELOG.md | 4 ++++ REFERENCE.md | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 395916ab..dc1cc02f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v0.6.62 +* Removed restrictions on the allowable size of the graticule interval (in degrees). +* Added `targets` object to the `-run` command expression context, giving access to multiple target layers. + v0.6.61 * Introduced the `fix-geometry` option to the `-snap` and `-o` commands, for removing segment intersections caused by coordinate rounding and TopoJSON quantization. diff --git a/REFERENCE.md b/REFERENCE.md index 30b2ef81..2099826c 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1071,6 +1071,7 @@ Create mapshaper commands on-the-fly and run them. Expression context: +If command has a single target layer: `target` object provides data and information about the command's target layer - `target.layer_name` Name of layer - `target.geojson` (getter) Returns a GeoJSON FeatureCollection for the layer @@ -1081,6 +1082,10 @@ Expression context: - `target.bbox` GeoJSON-style bounding box - `target.proj4` PROJ-formatted string giving the CRS (coordinate reference system) of the layer +`targets` object gives access to all layers targetted by the run command. +- by numerical index, like an array (`targets[0]` refers to the first target layer) +- by layer name (`targets.states` refers to a layer named "states") + `io` object has a method for passing data to the `-i` command. - `io.ifile(, )` Create a temp file to use as input in a `-run` command (see example 2 below) diff --git a/package-lock.json b/package-lock.json index 46a2ac83..b1779a3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mapshaper", - "version": "0.6.61", + "version": "0.6.62", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mapshaper", - "version": "0.6.61", + "version": "0.6.62", "license": "MPL-2.0", "dependencies": { "@placemarkio/tokml": "^0.3.3", diff --git a/package.json b/package.json index 2d1c1e38..d3aef23f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapshaper", - "version": "0.6.61", + "version": "0.6.62", "description": "A tool for editing vector datasets for mapping and GIS.", "keywords": [ "shapefile",