Created
July 25, 2022 15:55
-
-
Save deangrant/1734cd0dd33a5800552aab2010cf2aa3 to your computer and use it in GitHub Desktop.
Returns light version of TimeZoneFinder class and load all binary files into memory. Shows example of applying time zone to coordinates returned in a GeoJSON FeatureCollection.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from timezonefinder import TimezoneFinderL | |
def timezone_finder_l(): | |
return TimeZoneFinderL(in_memory=True) | |
# Initialize class and load binary files into memory. | |
get_timezone = timezone_finder_l() | |
# Return timezone for coordinates based on precomputed shortcuts. | |
get_timezone.timezone_at( | |
lng=row['geometry.coordinates'][0], | |
lat=row['geometry.coordinates'][1] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment