code: public int removeShapesWithExclusions(String database, String table, Set<GoogleMapShapeType> excludedTypes) {
  
          int count = 0;
  
          Map<Long, FeatureShape> featureIds = getFeatureIds(database, table);
  
          if (featureIds != null) {
  
              Iterator<Long> iterator = featureIds.keySet().iterator();
              while (iterator.hasNext()) {
                  long featureId = iterator.next();
  
                  FeatureShape featureShape = getFeatureShape(featureIds, featureId);
  
                  if (featureShape != null) {
  
                      Iterator<GoogleMapShape> shapeIterator = featureShape.getShapes().iterator();
                      while (shapeIterator.hasNext()) {
                          GoogleMapShape mapShape = shapeIterator.next();
                          if (excludedTypes == null || !excludedTypes.contains(mapShape.getShapeType())) {
                              mapShape.remove();
                              shapeIterator.remove();
                          }
                      }
  
                  }
  
                  if (featureShape == null || !featureShape.hasShapes()) {
                      if(featureShape != null) {
                          featureShape.removeMetadataShapes();
                      }
                      iterator.remove();
                      count++;
                  }
  
              }
  
          }
  
          return count;
      }
docs: Remove all map shapes in the database and table from the map, excluding shapes with the excluded types
  
  @param database      GeoPackage database
  @param table         table name
  @param excludedTypes Google Map Shape Types to exclude from map removal
  @return count of removed features
  @since 3.2.0