wheretz alternatives and similar packages
Based on the "Geolocation" category.
Alternatively, view wheretz alternatives based on common mentions on social networks and blogs.
-
topo
A Geometry library for Elixir that calculates spatial relationships between two geometries -
geoip
Elixir library to find geo location information given an IP address, hostname or Plug.Conn -
distance_api_matrix
Google Distance Matrix API Library for Elixir -
ipgeobase
Find Russian and Ukraine city by IP address and find country for other country Elixir -
srtm
Query locations for elevation data from the NASA Shuttle Radar Topography Mission
TestGPT | Generating meaningful tests for busy devs
Do you think we are missing an alternative of wheretz or a related project?
README
WhereTZ: timezone lookup
WhereTZ is elixir version of Ruby gem for lookup of timezone by georgraphic coordinates.
https://github.com/zverok/wheretz
Features:
- no calls to external services, works without Internet connection;
- Timezone result is %Timex.TimezoneInfo
Usage
Add to project from hex.pm
def deps do
[
{:wheretz, "~> 0.1.16"},
]
end
or from github
def deps do
[
{:wheretz, git: "[email protected]:UA3MQJ/wheretz.git", tag: "v0.1.16"},
]
end
Before the first start, you need to download the geo database.
mix download_data
usage
iex(1)> WhereTZ.get(50.004444, 36.231389)
#<TimezoneInfo(Europe/Kiev - EET (+02:00:00))>
iex(2)> WhereTZ.lookup(50.004444, 36.231389)
"Europe/Kiev"
How it works
- Latest version of timezone-boundary-builder dataset is converted into mnesia table (125Mb);
- For each time zone, store timezone name, geo polygon and calculate bounding box (min and max latitude and longitude);
- On each lookup
WhereTZ
first checks provided coordinates by bounding boxes, and if only one bbox, corresponds to them, returns timezone name immediately; - If there's several intersecting bounding boxes,
WhereTZ
checks which polygon actually contains the point.
Known problems
- ?
Author
Alexey Bolshakov
Thanks to
License
Data license is ODbL.
Code license is usual MIT.
*Note that all licence references and agreements mentioned in the wheretz README section above
are relevant to that project's source code only.