存储地理编码数据常见吗?

发布于 2024-12-07 20:43:24 字数 162 浏览 0 评论 0原文

在我的网站上,公司可以输入其每个分支机构的位置(地址等)。每次我想在(谷歌)地图上显示它时,与其每次都通过谷歌进行地理编码,不如简单地在输入时对每个地址进行地理编码,并存储坐标以供以后使用。

然而,对于所有的法律术语,我很困惑这是否是一种常规做法,或者开发人员是否通常每次都会进行动态地理编码?

On my site, companies are able to enter in locations (addresses, etc) for each of their branches. Rather than geocoding through Google each an every time that I would like to display it on a (Google) map, it seems better to simply geocode each address upon entry, and store the coordinates for later.

With all the legal jargon, however, I am confused if this is a regular practice, or whether developers usually geocode on the fly each time?

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

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

发布评论

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

评论(4

生生漫 2024-12-14 20:43:24

是的,这是一种常见的做法,尤其是当您在带宽有限的环境中运行时。但是,您不能无限期地存储所有数据。您从 API 下载的内容适用一些限制。

以下是 Google 对此问题的看法(Google Maps API 系列服务条款,http://code .google.com/apis/maps/terms.html 10.1.3.b):

您不得预取、缓存或存储任何内容,除非您可以存储:(i) 出于提高 Maps API 实现性能的目的而临时、安全地存储有限数量的内容,并且以不允许在服务之外使用内容的方式

最重要的部分是:

  • 不允许您预取
  • 数据保存必须是临时的
  • 数据必须少量保存

Yes, it is a common practice especially when you are running in a bandwidth-limited environment. However, you are not allowed to store all the data indefinitely. Some restrictions apply on the content you are downloading from the API.

Here is Google take on this problem (Google Maps API Family Terms Of Service, http://code.google.com/apis/maps/terms.html ; 10.1.3.b):

You must not pre-fetch, cache, or store any Content, except that you may store: (i) limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily, securely, and in a manner that does not permit use of the Content outside of the Service

The most important parts are:

  • You are not allowed to pre-fetch
  • Data conservation has to be temporary
  • Data has to be kept in small amounts
单身情人 2024-12-14 20:43:24

需要考虑的一件事是,地理编码坐标和您的地址并不总是描述同一点。由于街道号码的插值和其他不准确性,在这方面没有完美的地理编码服务。根据您使用坐标的目的,您通常能够重新定位该点,因此必须将其保存在数据中。

例如,如果您有一组地址为“Kings street 11-15”的公司,那么该公司的主入口在哪里?交货地点在哪里?诸如此类的事情可能导致无法动态进行地理编码。

即使您想“按原样”使用地理编码坐标,我记得 Bing 地图对“不保存任何数据”规则做了一个例外,以允许存储地理编码位置。不确定谷歌是否也这样做......

One thing to consider is that the geocoded coordinate and your address isn't always describing the same point. No geocoding service is perfect in this matter, due to interpolation of street numbers and other inaccuracies. Depending on what you are using the coordinates for, it is quite often so that you will be able to relocate the point and therefore have to save it in your data.

For instance if you have a set of companys with addresses like "Kings street 11-15", where is the main entrance to the company? Where will deliveries be made? Things like this can make it impossible to geocode on the fly.

Even if you want to use the geocoded coordinat "as is", I can recall that Bing Maps did an exception to the rule of "not saving any data" as to allow storing of geocoded locations. Not sure if Google does the same though...

情泪▽动烟 2024-12-14 20:43:24

当然 - 它不像地理编码(本质上只是纬度和经度)是谷歌唯一使用的东西。这几乎是每个人都这样做的方式(并且在过去十年中一直在这样做)

Ofcourse - its not like geocode (which essentially just is latitude and longitude) is something google are the only ones to use. Its a pretty much how everyone does it (and has been done for the last decade)

骑趴 2024-12-14 20:43:24

在 SugarCRM 的 Google 地图项目中,我在数据库(地址缓存模块)中存储来自 Google 地图地理编码 API 的有限数据。我不存储整个对象,只存储其中的一部分。只需存储提高效率所需的内容即可。

主要是:

  • 完整的一行地址
  • 地理编码状态
  • 经度
  • 纬度

数据存储在地址缓存中以识别状态为“OK”的地址。因此,我只存储从 Google 地图返回的有限数据。我认为这样做绝对没问题。

另外,我只将其存储为地址缓存,可以随时销毁并重新填充。如果没有“预先填充”的经度/纬度信息,则需要几分钟的时间才能在地图上填充 5,000 条记录。通过缓存,可以在 10 秒内显示包含 5,000 条记录的地图。

http://www.jjwdesign.com/sugarcrm/google-maps-for-sugarcrm

思考问题:

  1. Google 地图将什么视为“有限内容”?低于 1GB 数据?
  2. 您如何理解“提高绩效的目的”?也许可以即时使用该服务?

With my Google Maps project for SugarCRM, I am storing limited amounts of data from the Google Maps Geocoding API in the database (Address Cache Module). I don't store the entire object, just parts of it. Just store what you need for efficiency.

Mainly:

  • Full One Line Address
  • Geocode Status
  • Longitude
  • Latitude

The data is stored in an Address Cache to identify addresses with status "OK". So, I'm only storing limited amounts of the data returned from Google Maps. Which I think it absolutely fine to do so.

ALso, I'm only storing this as Address Cache, which can be destroyed and repopulated at any time. Without the "pre-populated" Longitude/Latitude information it would take several minutes to populate a map with 5,000 records. With the cache, a Map with 5,000 records can be displayed in under 10 seconds.

http://www.jjwdesign.com/sugarcrm/google-maps-for-sugarcrm

Questions to Ponder:

  1. What does Google Maps consider "Limited Amounts of Content"? Under a 1GB of data?
  2. How do you interpret "purpose of improving the performance"? Using the service on-the-fly perhaps?
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文