RomanIakovlev / timeshape

Java library to find timezone based on geo coordinates
MIT License
160 stars 35 forks source link

Empty ZoneId #52

Closed PaulDaviesC closed 4 years ago

PaulDaviesC commented 4 years ago

Can there be a case where the ZoneId is returned empty by engine.query() for a valid latitude and longitude?

RomanIakovlev commented 4 years ago

In general, yes. When the library is initialized with a bounding box smaller than the whole world, all the valid coordinates outside of that bounding box will return the empty answer. When the library is initialized without specifying the bounding box (i.e. for the whole world), it might return the empty answer for some valid coordinates if and only if the source data (see https://github.com/evansiroky/timezone-boundary-builder) has gaps in its coverage at those coordinates.

I'm not sure if the source data covers the whole world without any gaps, but I think the answer is most probably 'yes'. If you must be absolutely sure, ask in the source data project.

PaulDaviesC commented 4 years ago

Thanks @RomanIakovlev