docs: public static SpatialRuleLookup buildIndex(JsonFeatureCollection jsonFeatureCollection, String jsonIdField,
                                                 SpatialRuleFactory spatialRuleFactory, double resolution, BBox maxBBox) {
          BBox polygonBounds = BBox.createInverse(false);
          List<SpatialRule> spatialRules = new ArrayList<>();
  
          for (int jsonFeatureIdx = 0; jsonFeatureIdx < jsonFeatureCollection.getFeatures().size(); jsonFeatureIdx++) {
              JsonFeature jsonFeature = jsonFeatureCollection.getFeatures().get(jsonFeatureIdx);
              String id = jsonIdField.isEmpty() || toLowerCase(jsonIdField).equals("id") ? jsonFeature.getId() : (String) jsonFeature.getProperty(jsonIdField);
              if (id == null || id.isEmpty())
                  throw new IllegalArgumentException("ID cannot be empty but was for JsonFeature " + jsonFeatureIdx);
  
              List<Polygon> borders = new ArrayList<>();
              for (int i = 0; i < jsonFeature.getGeometry().getNumGeometries(); i++) {
                  Geometry poly = jsonFeature.getGeometry().getGeometryN(i);
                  if (poly instanceof org.locationtech.jts.geom.Polygon)
                      borders.add(Polygon.create((org.locationtech.jts.geom.Polygon) poly));
                  else
                      throw new IllegalArgumentException("Geometry for " + id + " (" + i + ") not supported " + poly.getClass().getSimpleName());
              }
              SpatialRule spatialRule = spatialRuleFactory.createSpatialRule(id, borders);
              if (spatialRule != SpatialRule.EMPTY) {
                  spatialRules.add(spatialRule);
                  for (Polygon polygon : spatialRule.getBorders()) {
                      polygonBounds.update(polygon.getMinLat(), polygon.getMinLon());
                      polygonBounds.update(polygon.getMaxLat(), polygon.getMaxLon());
                  }
              }
          }
  
          if (!polygonBounds.isValid()) {
              return SpatialRuleLookup.EMPTY;
          }
  
          BBox calculatedBounds = polygonBounds.calculateIntersection(maxBBox);
          if (calculatedBounds == null)
              return SpatialRuleLookup.EMPTY;
  
          SpatialRuleLookup spatialRuleLookup = new SpatialRuleLookupArray(spatialRules, resolution, true, calculatedBounds);
  
          logger.info("Created the SpatialRuleLookup with the following rules: " + Arrays.toString(spatialRules.toArray()));
  
          return spatialRuleLookup;
      }