mapshaper 0.6.52 → 0.6.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mapshaper.js +19 -19
- package/package.json +1 -1
- package/www/mapshaper.js +19 -19
package/mapshaper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
|
|
3
|
-
var VERSION = "0.6.
|
|
3
|
+
var VERSION = "0.6.53";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var utils = /*#__PURE__*/Object.freeze({
|
|
@@ -23703,14 +23703,14 @@ ${svg}
|
|
|
23703
23703
|
.option('geojson-type', {
|
|
23704
23704
|
describe: '[GeoJSON] FeatureCollection, GeometryCollection or Feature'
|
|
23705
23705
|
})
|
|
23706
|
-
.option('ndjson', {
|
|
23707
|
-
describe: '[GeoJSON/JSON] output newline-delimited features or records',
|
|
23708
|
-
type: 'flag'
|
|
23709
|
-
})
|
|
23710
23706
|
.option('hoist', {
|
|
23711
23707
|
describe: '[GeoJSON] move properties to the root level of each Feature',
|
|
23712
23708
|
type: 'strings'
|
|
23713
23709
|
})
|
|
23710
|
+
.option('ndjson', {
|
|
23711
|
+
describe: '[GeoJSON/JSON] output newline-delimited features or records',
|
|
23712
|
+
type: 'flag'
|
|
23713
|
+
})
|
|
23714
23714
|
.option('width', {
|
|
23715
23715
|
describe: '[SVG/TopoJSON] pixel width of output (SVG default is 800)',
|
|
23716
23716
|
type: 'number'
|
|
@@ -23865,10 +23865,6 @@ ${svg}
|
|
|
23865
23865
|
describe: 'a pair of values (0-100) for limiting a color ramp',
|
|
23866
23866
|
type: 'numbers'
|
|
23867
23867
|
})
|
|
23868
|
-
.option('range', {
|
|
23869
|
-
// describe: 'a pair of numbers defining the effective data range',
|
|
23870
|
-
type: 'numbers'
|
|
23871
|
-
})
|
|
23872
23868
|
.option('null-value', {
|
|
23873
23869
|
describe: 'value (or color) to use for invalid or missing data'
|
|
23874
23870
|
})
|
|
@@ -23895,6 +23891,11 @@ ${svg}
|
|
|
23895
23891
|
describe: 'user-defined sequential class breaks',
|
|
23896
23892
|
type: 'numbers'
|
|
23897
23893
|
})
|
|
23894
|
+
.option('outer-breaks', {
|
|
23895
|
+
describe: 'min,max breakpoints, to limit the effect of outliers',
|
|
23896
|
+
old_alias: 'range',
|
|
23897
|
+
type: 'numbers'
|
|
23898
|
+
})
|
|
23898
23899
|
.option('classes', {
|
|
23899
23900
|
describe: 'number of classes (can be inferred from other options)',
|
|
23900
23901
|
type: 'integer'
|
|
@@ -23904,7 +23905,7 @@ ${svg}
|
|
|
23904
23905
|
type: 'flag'
|
|
23905
23906
|
})
|
|
23906
23907
|
.option('continuous', {
|
|
23907
|
-
describe: 'output
|
|
23908
|
+
describe: 'output interpolated values, for unclassed colors',
|
|
23908
23909
|
type: 'flag'
|
|
23909
23910
|
})
|
|
23910
23911
|
.option('index-field', {
|
|
@@ -32134,23 +32135,22 @@ ${svg}
|
|
|
32134
32135
|
}
|
|
32135
32136
|
|
|
32136
32137
|
var ascending = getAscendingNumbers(dataValues);
|
|
32137
|
-
if (opts.
|
|
32138
|
-
ascending = applyDataRange(ascending, opts.
|
|
32138
|
+
if (opts.outer_breaks) {
|
|
32139
|
+
ascending = applyDataRange(ascending, opts.outer_breaks);
|
|
32139
32140
|
}
|
|
32140
32141
|
var nullCount = dataValues.length - ascending.length;
|
|
32141
32142
|
var minVal = ascending[0];
|
|
32142
32143
|
var maxVal = ascending[ascending.length - 1];
|
|
32143
32144
|
|
|
32144
|
-
|
|
32145
|
-
|
|
32146
|
-
if (val
|
|
32147
|
-
if (val > opts.range[1]) val = opts.range[1];
|
|
32145
|
+
var clamp = opts.outer_breaks ? function(val) {
|
|
32146
|
+
if (val < opts.outer_breaks[0]) val = opts.outer_breaks[0];
|
|
32147
|
+
if (val > opts.outer_breaks[1]) val = opts.outer_breaks[1];
|
|
32148
32148
|
return val;
|
|
32149
32149
|
} : null;
|
|
32150
32150
|
|
|
32151
|
-
if (opts.
|
|
32152
|
-
minVal = opts.
|
|
32153
|
-
maxVal = opts.
|
|
32151
|
+
if (opts.outer_breaks) {
|
|
32152
|
+
minVal = opts.outer_breaks[0];
|
|
32153
|
+
maxVal = opts.outer_breaks[1];
|
|
32154
32154
|
}
|
|
32155
32155
|
|
|
32156
32156
|
if (numBreaks === 0) {
|
package/package.json
CHANGED
package/www/mapshaper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
|
|
3
|
-
var VERSION = "0.6.
|
|
3
|
+
var VERSION = "0.6.53";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var utils = /*#__PURE__*/Object.freeze({
|
|
@@ -23703,14 +23703,14 @@ ${svg}
|
|
|
23703
23703
|
.option('geojson-type', {
|
|
23704
23704
|
describe: '[GeoJSON] FeatureCollection, GeometryCollection or Feature'
|
|
23705
23705
|
})
|
|
23706
|
-
.option('ndjson', {
|
|
23707
|
-
describe: '[GeoJSON/JSON] output newline-delimited features or records',
|
|
23708
|
-
type: 'flag'
|
|
23709
|
-
})
|
|
23710
23706
|
.option('hoist', {
|
|
23711
23707
|
describe: '[GeoJSON] move properties to the root level of each Feature',
|
|
23712
23708
|
type: 'strings'
|
|
23713
23709
|
})
|
|
23710
|
+
.option('ndjson', {
|
|
23711
|
+
describe: '[GeoJSON/JSON] output newline-delimited features or records',
|
|
23712
|
+
type: 'flag'
|
|
23713
|
+
})
|
|
23714
23714
|
.option('width', {
|
|
23715
23715
|
describe: '[SVG/TopoJSON] pixel width of output (SVG default is 800)',
|
|
23716
23716
|
type: 'number'
|
|
@@ -23865,10 +23865,6 @@ ${svg}
|
|
|
23865
23865
|
describe: 'a pair of values (0-100) for limiting a color ramp',
|
|
23866
23866
|
type: 'numbers'
|
|
23867
23867
|
})
|
|
23868
|
-
.option('range', {
|
|
23869
|
-
// describe: 'a pair of numbers defining the effective data range',
|
|
23870
|
-
type: 'numbers'
|
|
23871
|
-
})
|
|
23872
23868
|
.option('null-value', {
|
|
23873
23869
|
describe: 'value (or color) to use for invalid or missing data'
|
|
23874
23870
|
})
|
|
@@ -23895,6 +23891,11 @@ ${svg}
|
|
|
23895
23891
|
describe: 'user-defined sequential class breaks',
|
|
23896
23892
|
type: 'numbers'
|
|
23897
23893
|
})
|
|
23894
|
+
.option('outer-breaks', {
|
|
23895
|
+
describe: 'min,max breakpoints, to limit the effect of outliers',
|
|
23896
|
+
old_alias: 'range',
|
|
23897
|
+
type: 'numbers'
|
|
23898
|
+
})
|
|
23898
23899
|
.option('classes', {
|
|
23899
23900
|
describe: 'number of classes (can be inferred from other options)',
|
|
23900
23901
|
type: 'integer'
|
|
@@ -23904,7 +23905,7 @@ ${svg}
|
|
|
23904
23905
|
type: 'flag'
|
|
23905
23906
|
})
|
|
23906
23907
|
.option('continuous', {
|
|
23907
|
-
describe: 'output
|
|
23908
|
+
describe: 'output interpolated values, for unclassed colors',
|
|
23908
23909
|
type: 'flag'
|
|
23909
23910
|
})
|
|
23910
23911
|
.option('index-field', {
|
|
@@ -32134,23 +32135,22 @@ ${svg}
|
|
|
32134
32135
|
}
|
|
32135
32136
|
|
|
32136
32137
|
var ascending = getAscendingNumbers(dataValues);
|
|
32137
|
-
if (opts.
|
|
32138
|
-
ascending = applyDataRange(ascending, opts.
|
|
32138
|
+
if (opts.outer_breaks) {
|
|
32139
|
+
ascending = applyDataRange(ascending, opts.outer_breaks);
|
|
32139
32140
|
}
|
|
32140
32141
|
var nullCount = dataValues.length - ascending.length;
|
|
32141
32142
|
var minVal = ascending[0];
|
|
32142
32143
|
var maxVal = ascending[ascending.length - 1];
|
|
32143
32144
|
|
|
32144
|
-
|
|
32145
|
-
|
|
32146
|
-
if (val
|
|
32147
|
-
if (val > opts.range[1]) val = opts.range[1];
|
|
32145
|
+
var clamp = opts.outer_breaks ? function(val) {
|
|
32146
|
+
if (val < opts.outer_breaks[0]) val = opts.outer_breaks[0];
|
|
32147
|
+
if (val > opts.outer_breaks[1]) val = opts.outer_breaks[1];
|
|
32148
32148
|
return val;
|
|
32149
32149
|
} : null;
|
|
32150
32150
|
|
|
32151
|
-
if (opts.
|
|
32152
|
-
minVal = opts.
|
|
32153
|
-
maxVal = opts.
|
|
32151
|
+
if (opts.outer_breaks) {
|
|
32152
|
+
minVal = opts.outer_breaks[0];
|
|
32153
|
+
maxVal = opts.outer_breaks[1];
|
|
32154
32154
|
}
|
|
32155
32155
|
|
|
32156
32156
|
if (numBreaks === 0) {
|