小编Gau*_*ain的帖子

使用 Python S2/S2sphere 库 - 在一个圆圈中找到特定级别的所有 s2 单元(给出纬度、长度和半径)

什么 S2Region 以及我应该如何使用从给定的经度、长度和半径绘制的圆圈覆盖的某个父级别(假设为 9)的所有 s2 单元格。下面是一个使用 python s2 库获取矩形下所有单元格的示例。

region_rect = S2LatLngRect(
              S2LatLng.FromDegrees(-51.264871, -30.241701),
              S2LatLng.FromDegrees(-51.04618, -30.000003))
coverer = S2RegionCoverer()
coverer.set_min_level(8)
coverer.set_max_level(15)
coverer.set_max_cells(500)
covering = coverer.GetCovering(region_rect)
Run Code Online (Sandbox Code Playgroud)

示例来源http://blog.christianperone.com/2015/08/googles-s2-geometry-on-the-sphere-cells-and-hilbert-curve/

我正在寻找类似的东西

region_circle = S2latLangCircle(lat,lang,radius)
Run Code Online (Sandbox Code Playgroud)

我找到了在 c++ 中实现的 google s2 library 这个问题的答案Using google s2 library - find all s2 cells of a specific level of the circle, given lat/lng and radius in miles/km但我需要这个在 python 中。

谢谢

python geolocation

7
推荐指数
1
解决办法
4502
查看次数

对于 SPA,每个会话的 Google 分析页面超过 1 个

我使用 Create React App 构建了一个 SPA。我已经集成了谷歌分析并使用谷歌标签管理器(标签)发送事件。

 window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'UA-xxxxxxxxxx'); 
Run Code Online (Sandbox Code Playgroud)

在分析事件时,我注意到我的应用程序仅触发登陆页面浏览事件(仅在第一页用户访问时)。

我无法弄清楚的是,即使应用程序仅触发了一次页面浏览事件,页面/会话如何 > 1。有人可以帮助我理解这个谜团以及 Goggle 分析如何计算每个会话的页面吗?

来自 GA 仪表板的图像

javascript google-analytics create-react-app gtag.js

5
推荐指数
1
解决办法
547
查看次数

arc diff(Arcanist) 因 env: php: 没有这样的文件或目录而失败

升级到 macOS Monterey Arcanist 后,arc diff 等命令失败并出现以下错误

env: php: No such file or directory
Run Code Online (Sandbox Code Playgroud)

php phabricator arcanist

2
推荐指数
1
解决办法
2327
查看次数