code: private static List<Geometry> flatIntersection(Geometry envelope, List<Geometry> dataGeoms) {
          final List<Geometry> intersectedGeoms = new ArrayList<>(dataGeoms.size());
  
          Geometry nextIntersected;
          for(Geometry nextGeom : dataGeoms) {
              try {
  
                  // AABB intersection culling
                  if(envelope.getEnvelopeInternal().intersects(nextGeom.getEnvelopeInternal())) {
  
                      nextIntersected = envelope.intersection(nextGeom);
                      if(!nextIntersected.isEmpty()) {
                          nextIntersected.setUserData(nextGeom.getUserData());
                          intersectedGeoms.add(nextIntersected);
                      }
                  }
  
              } catch (TopologyException e) {
                  LoggerFactory.getLogger(JtsAdapter.class).error(e.getMessage(), e);
              }
          }
  
          return intersectedGeoms;
      }
docs: JTS 1.14 does not support intersection on a {@link GeometryCollection}. This function works around this
  by performing intersection on a flat list of geometry. The resulting list is pre-filtered for invalid
  or empty geometry (outside of bounds). Invalid geometry are logged as errors.
  
  @param envelope non-list geometry defines bounding area
  @param dataGeoms geometry pre-passed through {@link #flatFeatureList(Geometry)}
  @return list of geometry from {@code data} intersecting with {@code envelope}.