diff --git a/CHANGELOG.md b/CHANGELOG.md index 41c12027..dc800084 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +v0.6.100 +* Added -frame command, for creating a rectangular map frame layer with a defined display size. Used to set SVG output size and on-screen symbol scale. +* Added -o no-null-props option, which uses "properties":{} instead of "properties":null when outputting GeoJSON features with no attribute data. +* Added support for sub-pixel sizes of pattern fills like hatches and dots (see the -style fill-effect= option). +* Bug fixes + v0.6.99 * Bug fixes diff --git a/REFERENCE.md b/REFERENCE.md index d71f4237..9f7cee68 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1,6 +1,6 @@ # COMMAND REFERENCE -This documentation applies to version 0.6.98 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.100 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 diff --git a/package-lock.json b/package-lock.json index e2bd0b01..78713c90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mapshaper", - "version": "0.6.99", + "version": "0.6.100", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mapshaper", - "version": "0.6.99", + "version": "0.6.100", "license": "MPL-2.0", "dependencies": { "@placemarkio/tokml": "^0.3.3", diff --git a/package.json b/package.json index 96cd0f40..80e6f2eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapshaper", - "version": "0.6.99", + "version": "0.6.100", "description": "A tool for editing vector datasets for mapping and GIS.", "keywords": [ "shapefile", diff --git a/src/commands/mapshaper-comment.mjs b/src/commands/mapshaper-comment.mjs index 3db9f169..bd4bb565 100644 --- a/src/commands/mapshaper-comment.mjs +++ b/src/commands/mapshaper-comment.mjs @@ -1,3 +1,7 @@ import cmd from '../mapshaper-cmd'; +import { verbose, message } from '../utils/mapshaper-logging'; -cmd.comment = function() {}; // no-op, so -comment doesn't trigger a parsing error +cmd.comment = function(opts) { + // TODO: print the comment in verbose mode + // message('[comment]', opts.message); +}; // no-op, so -comment doesn't trigger a parsing error diff --git a/src/commands/mapshaper-rectangle.mjs b/src/commands/mapshaper-rectangle.mjs index 3ca2155f..da99f756 100644 --- a/src/commands/mapshaper-rectangle.mjs +++ b/src/commands/mapshaper-rectangle.mjs @@ -57,6 +57,9 @@ cmd.rectangles = function(targetLyr, targetDataset, opts) { return outputLayers; }; + + + function shapesToBoxGeometries(lyr, dataset, opts) { var crsInfo = getDatasetCrsInfo(dataset); return lyr.shapes.map(function(shp) { diff --git a/src/crs/mapshaper-projections.mjs b/src/crs/mapshaper-projections.mjs index cfa8104f..0649928a 100644 --- a/src/crs/mapshaper-projections.mjs +++ b/src/crs/mapshaper-projections.mjs @@ -233,12 +233,12 @@ export function getDatasetCRS(dataset) { return getDatasetCrsInfo(dataset).crs; } -export function requireDatasetsHaveCompatibleCRS(arr) { +export function requireDatasetsHaveCompatibleCRS(arr, msg) { arr.reduce(function(memo, dataset) { var P = getDatasetCRS(dataset); if (memo && P) { if (isLatLngCRS(memo) != isLatLngCRS(P)) { - stop("Unable to combine projected and unprojected datasets"); + stop(msg || "Unable to combine projected and unprojected datasets"); } } return P || memo; diff --git a/src/dataset/mapshaper-target-utils.mjs b/src/dataset/mapshaper-target-utils.mjs index 9b2992d6..bf388992 100644 --- a/src/dataset/mapshaper-target-utils.mjs +++ b/src/dataset/mapshaper-target-utils.mjs @@ -13,6 +13,7 @@ export function expandCommandTargets(targets) { } + export function findCommandTargets(layers, pattern, type) { var targets = []; var matches = findMatchingLayers(layers, pattern, true); diff --git a/src/geom/mapshaper-units.mjs b/src/geom/mapshaper-units.mjs index ccc2733c..37df99e4 100644 --- a/src/geom/mapshaper-units.mjs +++ b/src/geom/mapshaper-units.mjs @@ -35,7 +35,7 @@ export function parseSizeParam(p) { var px = units == 'in' && num * 72 || units == 'cm' && Math.round(num * 28.3465) || num; - if (px > 0 === false || !units) { + if (px >= 0 === false || !units) { stop('Invalid size:', str); } return px; diff --git a/test/merge-layers-test.mjs b/test/merge-layers-test.mjs index 69ec589a..d7a54404 100644 --- a/test/merge-layers-test.mjs +++ b/test/merge-layers-test.mjs @@ -77,7 +77,6 @@ describe('mapshaper-merge-layers.js', function () { done(); }); - }); it('handles empty layers', function(done) {