docs: public void findEdgesInShape(final GHIntHashSet edgeIds, final Shape shape, EdgeFilter filter) {
          GHPoint center = shape.getCenter();
          QueryResult qr = locationIndex.findClosest(center.getLat(), center.getLon(), filter);
          // TODO: if there is no street close to the center it'll fail although there are roads covered. Maybe we should check edge points or some random points in the Shape instead?
          if (!qr.isValid())
              throw new IllegalArgumentException("Shape " + shape + " does not cover graph");
  
          if (shape.contains(qr.getSnappedPoint().lat, qr.getSnappedPoint().lon))
              edgeIds.add(qr.getClosestEdge().getEdge());
  
          final boolean isPolygon = shape instanceof Polygon;
  
          BreadthFirstSearch bfs = new BreadthFirstSearch() {
              final NodeAccess na = graph.getNodeAccess();
              final Shape localShape = shape;
  
              @Override
              protected boolean goFurther(int nodeId) {
                  if (isPolygon) return isInsideBBox(nodeId);
  
                  return localShape.contains(na.getLatitude(nodeId), na.getLongitude(nodeId));
              }
  
              @Override
              protected boolean checkAdjacent(EdgeIteratorState edge) {
                  int adjNodeId = edge.getAdjNode();
  
                  if (localShape.contains(na.getLatitude(adjNodeId), na.getLongitude(adjNodeId))) {
                      edgeIds.add(edge.getEdge());
                      return true;
                  }
                  return isPolygon && isInsideBBox(adjNodeId);
              }
  
              private boolean isInsideBBox(int nodeId) {
                  BBox bbox = localShape.getBounds();
                  double lat = na.getLatitude(nodeId);
                  double lon = na.getLongitude(nodeId);
                  return lat <= bbox.maxLat && lat >= bbox.minLat && lon <= bbox.maxLon && lon >= bbox.minLon;
              }
          };
          bfs.start(graph.createEdgeExplorer(filter), qr.getClosestNode());
      }