public Set < String > getContainingIds ( double minLongitude , double minLatitude , double maxLongitude , double maxLatitude ) { Set < String > ids = new HashSet <> ( ) ; forCellsIn ( minLongitude , minLatitude , maxLongitude , maxLatitude , cell -> { if ( ids . isEmpty ( ) ) { ids . addAll ( cell . getContainingIds ( ) ) ; } else { ids . retainAll ( cell . getContainingIds ( ) ) ; } } ) ; return ids ; }
Identify which countries are guaranteed to contain the given bounding box fully . The given bounding box may wrap around the 180th longitude i . e minLongitude = 170 and maxLongitude = - 170 .