Monday 25 March 2019

What datatype to use for lat long in Sequelize?

I have this data from openweather for list of cities. This is one of the object:{ "id": 5128638, "name": "New York", "country": "US", "coord": { "lon": -75.499901, "lat": 43.000351 } }I want to store these list of cities to database. I have not decided yet which one would I go for - Postgre or MySQL.The use case here is I want to find all the lat long within 10 miles radius from a given lat long.I was hoping I could use something like this to do the job. But, if there's any tool that could do it I'm also open to that.

Submitted March 25, 2019 at 11:31PM by phoenixlads

No comments:

Post a Comment