diff --git a/bin/cmd/import.js b/bin/cmd/import.js index 571a456..44efbbd 100644 --- a/bin/cmd/import.js +++ b/bin/cmd/import.js @@ -57,7 +57,7 @@ module.exports = { }) yargs.option('tweak_module_shard_complexity', { type: 'number', - default: 200, + default: 500, coerce: parseFloat, describe: 'max polygon complexity for shard module' }) diff --git a/module/shard/TriggerGeometryInsert.js b/module/shard/TriggerGeometryInsert.js index 74ee07a..fe51d38 100644 --- a/module/shard/TriggerGeometryInsert.js +++ b/module/shard/TriggerGeometryInsert.js @@ -5,7 +5,7 @@ class TriggerGeometryInsert extends SqliteStatement { create (db, config) { try { let dbname = _.get(config, 'database', 'main') - let complexity = _.clamp(_.get(config, 'module.shard.complexity', 200), 5, 1000000) + let complexity = _.clamp(_.get(config, 'module.shard.complexity', 500), 5, 1000000) let simplify = _.get(config, 'module.shard.simplify', 0.0001) db.prepare(` CREATE TRIGGER IF NOT EXISTS shard_geometry_insert diff --git a/module/shard/TriggerGeometryInsert.test.js b/module/shard/TriggerGeometryInsert.test.js index fd1101f..a340051 100644 --- a/module/shard/TriggerGeometryInsert.test.js +++ b/module/shard/TriggerGeometryInsert.test.js @@ -81,7 +81,7 @@ tap.test('definition', (t) => { -- insert collection into tmp table INSERT INTO shard_subdivide (geom) - SELECT ST_Subdivide(ST_SimplifyPreserveTopology(NEW.geom, 0.0001), 200) + SELECT ST_Subdivide(ST_SimplifyPreserveTopology(NEW.geom, 0.0001), 500) WHERE NEW.geom IS NOT NULL; -- insert shards in to shard table @@ -177,8 +177,7 @@ tap.test('functional - boundary', (t) => { { element: 34 }, { element: 35 }, { element: 36 }, - { element: 37 }, - { element: 38 } + { element: 37 } ], 'split') t.end() @@ -254,8 +253,7 @@ tap.test('functional - buffer', (t) => { { element: 34 }, { element: 35 }, { element: 36 }, - { element: 37 }, - { element: 38 } + { element: 37 } ], 'split') t.end()