mergeIdentLayers function

Merge layers with identical properties