Click here to Skip to main content
15,898,947 members
Please Sign up or sign in to vote.
1.22/5 (2 votes)
See more:
Anybody knows How to get zipcode from latitude and longitude in php ??
Posted

1 solution

In principle a surjective function exists which maps each geographical location to a zip code, but there is not a simple formula which could be used to find this mapping.

This is because the boundaries between time zones are not just defined by physical location; they are defined taking into account subdivision of the land into administrative units such as regions, counties, states, etc, historical tradition, "convenience" (in many cases very much of inconvenience if fact) and many similar cultural factors.

You still can solve your problem, probably with limited accuracy, but this would be an unrealistically huge task. First of all, you will need a huge database. I would think of a structure of such database if I thought such task is realistic. I don't think so. I don't know if such service exists in Internet; in that case you could use it.

—SA
 
Share this answer
 
v4
Comments
khushboo86 16-Jun-11 0:04am    
:(Do u think this service is correct ??
http://www.geoplugin.net/extras/postalcode.gp?lat=XXX&long=YYYY&format=xml"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900