code: function(lines, bbox) {
          var result = [];
          var prev = lines[0];
          for (var i = 1; i < lines.length; i++) {
              var next = lines[i];
              var clipped = this.clipLine([ prev, next ], bbox);
              if (clipped) {
                  var last = result.length ? result[result.length - 1] : null;
                  if (!last || (last[0] !== clipped[0][0])
                          || (last[1] !== clipped[0][1])) {
                      result.push(clipped[0]);
                  }
                  result.push(clipped[1]);
              }
              prev = next;
          }
          return result;
      }
docs: Trims a multiline defined as a sequence of coordinates [x,y] by the
  specified bounding box and returns the clipped result.