mysql - Save geolocation as latitude/longitude or address/area name? -


suppose service foursquare, want save location of check-in. should save latitude-longitude or address/area name such 123 portmill st, ny 12345 or soho, ny. in first case, can have users type address , service looks , stores lat-long information. doing service can search check-ins within polygon-boundary.

while on second case, can store location bucket , avoid redundant information such (lat,long) = (100000.1,100000.1), (100000.2,100000.2) close , can considered same location.

i don't think i've understood nuances of you're trying do, computers work better numbers latitude , longitude rather human-readable text information. example, text address, how ensure consistency, e.g. dealing spaces, zip+4 codes rather shorter zip codes etc etc.

i guess it's instinct latitude , longitude might better text. live in uk, there lot of examples towns , cities have 2 roads of same name, think there more pitfalls storing text instead of latitude/longitude.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -