kimlai / tz_world

Resolve timezones from a location.
https://hexdocs.pm/tz_world
MIT License
41 stars 13 forks source link

How to update shapefile data? #3

Closed kipcole9 closed 5 years ago

kipcole9 commented 5 years ago

I see that the shapefile data is stored as a zipped .etf file which is great. But this repo doesn't have the code you are using to update the data as best I can see. Is it possible you will also publish that code?

kimlai commented 5 years ago

I don't think that I've ever scripted the generation of this file... It was a bunch of iex command and SQL queries. I've since quit my job and changed my laptop, so I guess you'll have to reverse engineer it unfortunately..

If I remember correctly, I used the database table provided by the previous version, with the addition of a new column containing the bounding box of each timezone (computed with some PostGIS function). The data file is this table dumped using :erlang.term_to_binary.

Let me know if you try it, I'll do what I can to help.

kipcole9 commented 5 years ago

I've sent a PR that includes using the native GeoJSON data so I'll close this commit and hope we can discuss potential changes there.