如何将街道地址与英国邮政编码相匹配?

发布于 2024-08-14 20:22:52 字数 1539 浏览 16 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

依 靠 2024-08-21 20:22:52

快速比较:

Quick comparison:

眼角的笑意。 2024-08-21 20:22:52

我相信您需要皇家邮政邮政编码地址文件。从该链接:

PAF 是所有内容的唯一完整来源
已知的英国邮政编码。

确实存在处理对此信息的请求的服务,因此对于少量请求使用此类服务​​可能会更便宜(显然,当此类服务因任何原因不可用时,您会遇到问题)。

I believe you need the Royal Mail Postcode Address File. From that link:

PAF is the only complete source of all
known UK Postcodes.

Services do exist to handle requests for this info, such that it may be cheaper to use such services for small numbers of requests (obviously you have issues as and when such services aren't available for whatever reasons).

顾忌 2024-08-21 20:22:52

到目前为止,正式执行此操作的唯一方法是购买 邮政编码地址文件但是最近有一条新闻称数据2010 年可能会免费所以要看你是否能等!

The only way to do it officially up to now has been to buy the Postcode Address File however there was a news item recently that the data may be free in 2010 so depends if you can wait!

强辩 2024-08-21 20:22:52

与此处的答案相反,您不需要需要来自邮局的非常昂贵的 PAF。有许多商业服务(大概由 PAF 提供支持)可以返回指定邮政编码的街道和门牌号。他们通常按每个请求收费。我没有与特定供应商打交道的任何经验,但这是一个示例 - capscan

Contrary to the answers here, you do NOT need the very expensive PAF from the Post Office. There are a number of commercial services (presumably powered by the PAF) that return the streets and street numbers for a specified post code. They generally charged on a per-request basis. I do not have any experience with a particular vendor, but this is an example - capscan

暖心男生 2024-08-21 20:22:52

为此,您需要访问邮政编码地址文件 - 这是邮局(通常通过第三方)每年授权使用的文件。

您可以根据需要选择购买本地使用的软件包或使用网络服务。

皇家邮政的页面位于:http://www.royalmail .com/portal/rm/jump2?mediaId=400085&catId=400084,该页面上有指向服务提供商的链接。

To do this you need access to the Postcode Address File - this is something that is licensed for use on an annual basis from the post-office, usually via a third party.

You have a choice depending on your needs of buying a package to use locally or of using web services.

The Royal Mail's page is here: http://www.royalmail.com/portal/rm/jump2?mediaId=400085&catId=400084 and on that page are links to service providers.

新雨望断虹 2024-08-21 20:22:52

Postcode Anywhere(现在的 Loqate)是其中的提供商之一(我的一位客户使用它们,没有任何抱怨)。许可是灵活的:
Loqate,以前称为 Postcode Anywhere

Postcode Anywhere (now Loqate) is one of the providers out there (one of my clients uses them with no complaints). Licensing is flexible:
Loqate, formerly Postcode Anywhere

放飞的风筝 2024-08-21 20:22:52

您可以使用地理编码服务,例如 Google 提供的服务。

英国地理位置的实际地址

You can use a geocoding service, such as the one provided by Google.

Physical Address to GeoLocation UK

无悔心 2024-08-21 20:22:52

如果您想获取英国邮政编码的大致地址(即街道级别),有一种方法可以合法且免费地获取,而无需使用 PAF 数据。

  1. 对邮政编码进行地理编码 - 现在可以合法免费完成此操作。操作系统已将代码点数据库发布到公共域中
  2. 使用 Google 地图 HTTP 地理编码 API 对 WGS84 lat/lng 对进行反向查找以获取街道地址

作为示例,请查看此 XML Web 服务:

http://geo.jamiethompson.co.uk/W127RJ.xml

解释于:

http://jamiethompson.co.uk/projects/2010/04/30/an-open-free-uk-postcode-geocoding-web-service/

返回:

<result>
    <status>200</status>
    <message/>
    <postcode>W12 7RJ</postcode>
    <geo>
        <os_x>523180</os_x>
        <os_y>180541</os_y>
        <lat>51.510379</lat>
        <lng>-0.226376</lng>
        <landranger>TQ231805</landranger>
        <accuracy>1</accuracy>
        <key>UO1NV-4UO8</key>
    </geo>
<address>
    <street>White City Close</street>
    <locality>Hammersmith</locality>
    <district>Hammersmith</district>
    <county>Greater London</county>
</address>

它不像商业产品那样方便,商业产品可以为您提供任何给定邮政编码的实际地址的完整列表,但它可以让您执行“您的邮政编码是什么?您的门牌号是多少?”类型系统。

If you want to get the approximate address for a UK postcode (i.e. street level) there is a way you can do it legally and for free without using PAF data.

  1. Geocode the postcode - This can be done legally for free now. OS have released the codepoint database into the public domain
  2. Do a reverse lookup on the WGS84 lat/lng pair using the Google Maps HTTP Geocoding API to get the street address

As an example of this take a look at this XML Web Service:

http://geo.jamiethompson.co.uk/W127RJ.xml

explained at:

http://jamiethompson.co.uk/projects/2010/04/30/an-open-free-uk-postcode-geocoding-web-service/

which returns:

<result>
    <status>200</status>
    <message/>
    <postcode>W12 7RJ</postcode>
    <geo>
        <os_x>523180</os_x>
        <os_y>180541</os_y>
        <lat>51.510379</lat>
        <lng>-0.226376</lng>
        <landranger>TQ231805</landranger>
        <accuracy>1</accuracy>
        <key>UO1NV-4UO8</key>
    </geo>
<address>
    <street>White City Close</street>
    <locality>Hammersmith</locality>
    <district>Hammersmith</district>
    <county>Greater London</county>
</address>

It's not as handy as the commercial offerings which give you a full list of actual addresses for any given postcode, but it lets you do a "What's your postcode? What's your house number?" type system.

青衫儰鉨ミ守葔 2024-08-21 20:22:52

您可以使用 PAF 或许可 PAF 的商业 Web 服务之一(有一些)。我认为您通常会购买“积分”或支付固定费率以获得无限制的访问。

You can either use the PAF or one of the commercial web services (there are a few) which licence the PAF. I think you usually buy "credits" or pay a flat rate for unlimited access.

清君侧 2024-08-21 20:22:52

要添加到已经得到的答案中:

在付费产品中,您通常需要支付以下费用:

  • 场所级别 - 更详细,并且可以向用户提供该邮政编码位置的场所列表

  • 街道级别 - 只需匹配该邮政编码位置的街道 - 您或者您的用户填写“地址的第一行”,通常是房屋名称或号码

我相信这种区别是皇家邮政在源头的许可中内置的。 前提级别要贵得多

To add to the answers already coming through:

In the paid for products typically you pay for either:

  • premise level - more detailed and can offer the user a list of premises at that postcode location

  • street level - simply matches the street at that postcode location - you or your user fills in "the first line of the address" usually house name or number

I believe this differentiation is built into the licencing by the Royal Mail at source. Premise level is substantially more expensive

一张白纸 2024-08-21 20:22:52

如果您将其添加到网站购物车或类似系统中,则可以按每次点击购买数据访问权限。如果您将其用于 CRM 等内部系统,则需要购买每用户许可证。

无论哪种方式,您都可以通过以下方式使用 Data8 邮政编码查找 API网络服务。

If you're adding it into a website shopping cart or similar system, you can buy access to the data on a per-click basis. If you're using it for an internal system such as CRM, you need to buy a per-user license.

Either way, you can use the Data8 Postcode Lookup API via web services.

赏烟花じ飞满天 2024-08-21 20:22:52

您无需购买皇家邮政邮政编码地址文件 (PAF)。有很多可用的 API。

getaddress.io 是我发现的唯一一个提供免费计划的网站:

https://getaddress.io

You don't need to purchase the Royal Mail Postcode Address File (PAF). There are lots of APIs available.

getaddress.io is the only one I've found that has a free plan:

https://getaddress.io

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文