public Set < String > getIntersectingIds ( double minLongitude , double minLatitude , double maxLongitude , double maxLatitude ) { Set < String > ids = new HashSet <> ( ) ; forCellsIn ( minLongitude , minLatitude , maxLongitude , maxLatitude , cell -> { ids . addAll ( cell . getAllIds ( ) ) ; } ) ; return ids ; }
Identify which countries intersect with the given bounding box . The given bounding box may wrap around the 180th longitude i . e minLongitude = 170 and maxLongitude = - 170 .