Skip to content

Commit

Permalink
v0.6.100
Browse files Browse the repository at this point in the history
  • Loading branch information
mbloch committed Oct 7, 2024
1 parent 5b0e185 commit b123946
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 5 additions & 1 deletion src/commands/mapshaper-comment.mjs
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/commands/mapshaper-rectangle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/crs/mapshaper-projections.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/dataset/mapshaper-target-utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export function expandCommandTargets(targets) {
}



export function findCommandTargets(layers, pattern, type) {
var targets = [];
var matches = findMatchingLayers(layers, pattern, true);
Expand Down
2 changes: 1 addition & 1 deletion src/geom/mapshaper-units.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion test/merge-layers-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ describe('mapshaper-merge-layers.js', function () {
done();
});


});

it('handles empty layers', function(done) {
Expand Down

0 comments on commit b123946

Please sign in to comment.