code: function filterPolygonLineStrings (rings) {
    return rings
    .map(function (ring) {
      var e = ring.length - 1
      if (ring[0][0] !== ring[e][0] || ring[0][1] !== ring[e][1]) {
        debug('Attempting to fix broken ring', ring)
        ring.push([ring[0][0], ring[0][1]])
      }
      return ring
    })
    .filter(function (ring, i) {
      return (i === 0 && rings.length > 1) || (ring.length >= 4)
    })
  }
docs: filter out degenerate polygon rings, but make sure not to strip off the outer ring if there are holes inside (because that could turn negative space holes into positive space outer ring)