Zh-hans:Strava

From OpenStreetMap Wiki
Jump to navigation Jump to search

Strava (Strava于维基百科) 是一个利用 GPS 来记录运动的 网站 和手机应用程序 (Android 版和 iOS 版) 。它的总部位于美国加利福尼亚州的旧金山。

Strava 上记录的最受欢迎的活动是骑行、跑步和远足。Strava 数据集 中包含了超过 100 万次运动记录的 13 万亿个经纬坐标点,总距离为 270 亿公里。[1]

对 OpenStreetMap 的使用

Strava 正逐步使用 OpenStreetMap 替换 Google 地图。它们目前使用的是由 Mapbox 渲染和托管的“terrain”风格矢量瓦片集。

  • 网页版和手机应用程序里的静态地图(小的缩略图)自 2014 年初以来一直使用 OpenStreetMap。
  • 网页版的 slippy 地图 在 2015 年中期就从 Google 地图切换到 OpenStreetMap,但手机端的迁移还未开始,2019 年 10 月的这则公告 只是说静态快照开始切换到 OpenStreetMap。
  • 路段和“创建路线工具”是基于 OpenStreetMap 数据的。

此外还有 the strava-map-switcher 浏览器扩展 可以为 Strava 网页增添更详细或更新的地图 (Mapy.cz, Freemap Slovakia, MTB map Europe, …)。

全球热图

information sign

Strava 全球热图最近发生了一些调整,要求使用者必须先登录 strava.com 才能查看热图。这意味着您必须先注册一个 Strava 账号。
Zoomed in on Nottingham cycle paths. from a blog post comparing the data
Strava heatmap layer in JOSM in the Gbamgbama area, Sierra Leone. Red lines are already mapped roads, green "lines" are from Strava heatmap data.

Strava 全球热图的网站是: https://www.strava.com/heatmap/

热图数据汇总自过去两年 Strava 上的公开活动,并且每月更新。但活动非常少的道路和步道不会显示“热度”[2]。您可从 2017 年 11 月的博客文章了解更多 Strava 工程师们构建热图的细节。

数据许可 - 可以用来描图!

OpenStreetMap 的用户仅 被准许 (在 2019 年 11 月二次确认) 借助 Strava 的热图数据来在 OpenStreetMap 上描图。 对于任何其它非个人用途,包括利用热图来向其它数据集贡献描图,请联系 Strava Metro。

热图数据的许可本是需要付费的,所以非常感谢 Strava 免费提供这些数据来帮助改善 OpenStreetMap(航空影像的供应商也跟我们有类似的协议)。请注意虽然这是一个寻找缺失路线的优秀工具,但有热图线并不一定意味着公众可以合法地到访该地。另外,一些 Strava 活动轨迹的类型可能被错误指定(例如在大面积不冻水体上的自行车轨迹)。

高分辨率热图

热图一直对公众开放,但仅 Strava 注册用户方可在热图上放大至街道级别查看活动细节,因此为了利用 Strava 热图编辑 OpenStreetMap,您必须先注册 Strava 账号(免费注册,只需要电子邮箱,不需要手机号)。

In JOSM, a TMS layer of Strava high-resolution heatmap can be added in the Imagery menu as follows:

  • tms[3,15]:https://heatmap-external-{switch:a,b,c}.strava.com/tiles-auth/ACTIVITY/COLOR/{zoom}/{x}/{y}.png?Key-Pair-Id=MYVALUE&Policy=MYVALUE&Signature=MYVALUE

In iD, you can use the following link as a custom background:

  • https://heatmap-external-{switch:a,b,c}.strava.com/tiles-auth/ACTIVITY/COLOR/{zoom}/{x}/{y}.png?Key-Pair-Id=MYVALUE&Policy=MYVALUE&Signature=MYVALUE

After logging in to https://www.strava.com/heatmap/ using a browser, you then have to retrieve and replace the MYVALUE items with appropriate cookie values for the following:

  • CloudFront-Key-Pair-Id
  • CloudFront-Policy
  • CloudFront-Signature

To get these values: On Firefox, press Shift+F9. On Chrome, paste this in your URL bar: chrome://settings/cookies/detail?site=strava.com, or click on the padlock icon in the URL bar while at https://www.strava.com/heatmap/ and take the values from Cookies.

Replace also the elements ACTIVITY and COLOR with the available options:

  • ACTIVITY:
    • run
    • ride
    • winter
    • water
    • all
  • COLOR:
    • blue
    • bluered
    • purple
    • hot
    • gray

The cookies will expire in approximately one week. After that, you need to repeat the whole process in order to keep using the high resolution Strava Heatmaps in your editor.

If you have a question regarding editing with the heatmap, please ask OSM community at for example help.openstreetmap.org (search for old, similar questions before). If you run into technical issues with these addresses (e.g. server/DNS error), please mail maps -at- strava.com.

浏览器扩展

JOSM Strava Heatmap 简化了上述获取高分辨率 TMS URL 的流程。您可在 Firefox AddonChrome Extension 获取该扩展,其代码也 在 GitHub 开源


如果您使用 Tampermonkey 脚本管理器,可以使用脚本 Strava Global Heatmap TMS server link generator for JOSM

低分辨率热图

低分辨率的 Strava 热图不够详细,无法用于在 OpenStreetMap 描图。它有可能会显示出在哪里有缺失的道路或自行车道。您可以在 http://strava.github.io/iD/ 查看(该编辑器的“提交”按钮已经不起作用)低分辨率热图。

在 JOSM 中,Strava 全球热图(低分辨率)已经预置到 JSOM 的图像列表中,可以在首选项中开启。Here are the strava entries on JOSM's internal list for reference.

For iD editor, you could paste the URLs into the "custom" entry (only one possible at a time) of the background settings. To find out the correct URLs, see the part between <url> and </url> on the JOSM list and append ?px=256 at the end. Examples:

  • https://heatmap-external-{switch:a,b,c}.strava.com/tiles/ride/bluered/{zoom}/{x}/{y}.png?px=256
  • https://heatmap-external-{switch:a,b,c}.strava.com/tiles-auth/ride/hot/{zoom}/{x}/{y}.png?px=256

Strava Slide

information sign

Strava Slide iD fork gives access to GPS tracks and provides a clever tool (Slide add-on) to iteratively refine a way geometry and optimize its alignment with the GPS heat data.

Routing Error Reports

Routing errors reported by Strava users can be viewed on a slippy map that has OpenStreetMap as a base layer. This could be used as a "check list" for mappers to investigate potential problems and correct them based on usual sources (like checking the location on-the-ground). http://labs.strava.com/routing-errors/

API

Strava have an API. Most of the information available relates to a specific user or their friends and so requires login through a Strava account. http://strava.github.io/api/

See also

References