code: public int removeShapesNotWithinMap(BoundingBox boundingBox, String database) {
  
          int count = 0;
  
          Map<String, Map<Long, FeatureShape>> tables = getTables(database);
  
          if (tables != null) {
  
              for (String table : tables.keySet()) {
                  count += removeShapesNotWithinMap(boundingBox, database, table);
              }
          }
  
          return count;
      }
docs: Remove all map shapes in the database that are not visible in the bounding box
  
  @param boundingBox bounding box
  @param database    GeoPackage database
  @return count of removed features
  @since 3.2.0