Rather than building up a mutable ListBuffer here, roll this into the binnedTube below.  Instead of a ```foreach``` use a ```map``` or a ```flatMap``` depending on the use case:

```scala
val queryResults = binnedType.map { sf =>
   ...
   (0 until geom.getNumGeometries).map { i => geom.getGeometryN(i) }.flatMap { geom => 
      val geomFilter = ff.intersects(geomProperty, ff.literal(geom))
      val combinedFilter = ff.and(List(query.getFilter, geomFilter, dtgFilter, filter))
      source.getFeatures(combinedFilter)
   }
}```