osmlint icon indicating copy to clipboard operation
osmlint copied to clipboard

[Validator] Conflict between tags: natural and leisure

Open Rub21 opened this issue 9 years ago • 1 comments

Rub21 avatar Nov 21 '16 12:11 Rub21

var turf = require('turf');

module.exports = function(tileLayers, tile, writeData, done) {
  var layer = tileLayers.osm.osm;
  var osmlint = 'naturalvsleisure';
  var result = [];
  for (var i = 0; i < layer.features.length; i++) {
    var val = layer.features[i];
   if (val.properties.natural && val.properties.leisure) {
    val.properties._osmlint = osmlint;
    result.push(val);
    }
  }


  if (result.length > 0) {
    var fc = turf.featurecollection(result);
    writeData(JSON.stringify(fc) + '\n');
  }

  done(null, null);
};

ejemplo1 naturalvsleisure

gitcheckout

@Rub21

luiswalter avatar Nov 23 '16 18:11 luiswalter