Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add skipdupes option.

  • Loading branch information...
commit 949d263f2768445d672c99134bd665dfae34e671 1 parent 0d4d6b4
root authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 commands/export.bones
View
12 commands/export.bones
@@ -90,6 +90,12 @@ command.options['concurrency'] = {
'default': 4
};
+command.options['skipdupes'] = {
+ 'title': 'skipdupes=[1|0]',
+ 'description': 'Skip duplicate (solid) tiles entirely.',
+ 'default': false
+};
+
command.prototype.initialize = function(plugin, callback) {
_(this).bindAll('error', 'put', 'complete');
@@ -335,6 +341,12 @@ command.prototype.tilelive = function (project, callback) {
var opts = this.opts;
+ // Override #duplicate with #skip if skipdupes is enabled.
+ if (opts.skipdupes) {
+ tilelive.Scheme.types[opts.scheme].prototype.duplicate = tilelive.Scheme.types[opts.scheme].prototype.skip;
+ console.warn('Sink will skip duplicate tiles...');
+ }
+
// Try to load a job file if one was given and it exists.
if (opts.job) {
opts.job = path.resolve(opts.job);
Please sign in to comment.
Something went wrong with that request. Please try again.