美国地址验证 (Zip+4)

发布于 2024-09-25 15:25:29 字数 217 浏览 6 评论 0原文

我有一个包含邮政编码列表的数据库,其中包含纬度、经度、州、城市、州 fips 代码、时区等。我想扩展它并编写 C# 函数或 TSQL (SQL Server 2008)函数将获取街道、城市、州和邮政编码并返回邮政编码+4。我到处搜索,有很多程序可以做到这一点,但似乎没有一个程序能够真正让我看到他们所做的事情并根据我自己的需要增强它。有谁知道可以做到这一点的开源解决方案,或者为我指明正确的方向,以便我可以制作开源版本?

I have a database that has a list of zip codes which has latitude, longitude, state, city, state fips code, time zone, etc. I'd like to extend this and write either a C# function or TSQL (SQL Server 2008) function that will take a street, city, state and zip and return the zip+4. I've searched high and low and there's many programs out there that can do it but none appear to actually allow me to see what they've done and enhance it for my own needs. Does anyone know of an open source solution that can do this or point me in the right direction so I can make an open source version?

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

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

发布评论

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

评论(3

第几種人 2024-10-02 15:25:29

可能最简单的解决方案是 USPS 的地址 API (http://www.usps.com/webtools/htm/Address-Information.htm#_Toc131231396) 关于清理数据库的用法有点模糊(如果你问他们关于看起来它们仍然很模糊,也许是故意的),但是一旦您获得批准,就可以非常轻松地发送您拥有的数据并取回经过完全验证、100% 合规且最新的地址。从 USPS 获取数据后,您可以根据需要简单地添加/减去/参数,然后再将其填回数据库。例如,您可以从经过验证的地址或数据库进行地理编码,然后将该数据附加到您收到的数据中,并插入到循环中。

我在我的一个应用程序上使用它来验证入站查询,事实证明它几乎 100% 可靠,可以帮助我纠正需要的内容。

Possibly the easiest solution to use is the USPS's address API (http://www.usps.com/webtools/htm/Address-Information.htm#_Toc131231396) The usage regarding scrubbing databases is a bit vague (and if you ask them about it, it seems they remain just as vague, perhaps on purpose) but once you get approved it's VERY easy to send the data you have and get back a fully verified, 100% compliant and up-to-date address. Once you get the data back from USPS, you can simply add/subtract/agument it as you need prior to stuffing back into the DB. For instance, you could Geocode from the verified address, or from your DB, then append that data into the data you received, inserting in a loop.

I'm using it on one of my applications to validate inbound inquiries and it has proven nearly 100% reliable for getting me what I need corrected.

_蜘蛛 2024-10-02 15:25:29

关于 USPS 免费 API 需要注意的一件事是,他们的许可证规定其返回的数据只能用于通过 USPS 发送物品。我们需要 ZIP+4 数据,但我们通过其他运营商运送我们的东西,因此这意味着我们无法使用免费服务。

One thing to note about the USPS free API is that their license says the data it returns must be used only for sending things via the USPS. We had a need for ZIP+4 data but we ship our stuff through other carriers, so this meant we could not use the free service.

菩提树下叶撕阳。 2024-10-02 15:25:29

我在一家名为 SmartyStreets 的公司工作;我们进行邮政地址验证,并获得 USPS 的 CASS 认证。但是,没有像 USPS 的 API 和 Google 的 API 等那样的许可限制。我们甚至还有免费版本。

您有兴趣尝试 LiveAddress...如果您有任何疑问我会帮你实现它。

I work for a company called SmartyStreets; we do postal address validation and are CASS-Certified by the USPS. However, there aren't license restrictions like with the USPS' API and Google's API and others. We even have a free version.

You'd be interested to try LiveAddress... and if you have any questions I'll help you implement it.

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