在php中从lat中获取邮政编码 [英] get zipcode from lat long in php

查看:69
本文介绍了在php中从lat中获取邮政编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道如何从php中的经度和纬度获取邮政编码?

Anybody knows How to get zipcode from latitude and longitude in php ??

推荐答案

原则上是
您仍然可以解决您的问题,可能准确性有限,但这将是一项不切实际的艰巨任务.首先,您将需要一个巨大的数据库.如果我认为这样的任务是现实的,我会想到这样一个数据库的结构.我不这么认为.我不知道互联网上是否存在这样的服务;在这种情况下,您可以使用它.

—SA
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


这篇关于在php中从lat中获取邮政编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆