mapshaper 0.5.115 → 0.5.116

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ v0.5.116
2
+ * Prevent 0-length DBF string fields, for interoperability with PostGIS.
3
+
1
4
  v0.5.115
2
5
  * Scalebar tweaks.
3
6
 
package/mapshaper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.5.115";
3
+ var VERSION = "0.5.116";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -16006,7 +16006,9 @@ ${svg}
16006
16006
 
16007
16007
  function initStringField(info, arr, name, encoding) {
16008
16008
  var formatter = encoding == 'ascii' ? encodeValueAsAscii : getStringWriterEncoded(encoding);
16009
- var size = 0;
16009
+ // Set minimum field size to 1 byte, for interoperability with PostGIS
16010
+ // (see https://github.com/mbloch/mapshaper/issues/541)
16011
+ var size = 1;
16010
16012
  var truncated = 0;
16011
16013
  var buffers = arr.map(function(rec) {
16012
16014
  var strval = convertValueToString(rec[name]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapshaper",
3
- "version": "0.5.115",
3
+ "version": "0.5.116",
4
4
  "description": "A tool for editing vector datasets for mapping and GIS.",
5
5
  "keywords": [
6
6
  "shapefile",
package/www/mapshaper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.5.115";
3
+ var VERSION = "0.5.116";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -16006,7 +16006,9 @@ ${svg}
16006
16006
 
16007
16007
  function initStringField(info, arr, name, encoding) {
16008
16008
  var formatter = encoding == 'ascii' ? encodeValueAsAscii : getStringWriterEncoded(encoding);
16009
- var size = 0;
16009
+ // Set minimum field size to 1 byte, for interoperability with PostGIS
16010
+ // (see https://github.com/mbloch/mapshaper/issues/541)
16011
+ var size = 1;
16010
16012
  var truncated = 0;
16011
16013
  var buffers = arr.map(function(rec) {
16012
16014
  var strval = convertValueToString(rec[name]);