问题标签 [libspatialindex]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
552 浏览

python - 如何使用rtree,python在查询框(查询区域)中找到最近的点

我是 python 新手,我正在使用 import rtree 库。我将二维点数据索引到 rtree 并指定查询框(矩形)。我应该得到位于查询框内的点。但我得到了查询框中最近的点。

但我得到的结果超出了查询框。

在输出中,您可以看到 rtree 返回接近查询框外部的索引 1、8。但我只需要查询框中的点。他们有什么建议可以使用 rtree 获取位于查询框内的点。

0 投票
0 回答
225 浏览

ctypes - 从 .whl 文件成功安装 Windows 10 Rtree,但运行代码时出错

我在 Windows 10 上运行 Python 3.7、64 位,并拼命尝试让 Rtree 运行。我使用来自 Christoph Gohlke ( https://www.lfd.uci.edu/~gohlke/pythonlibs/ )的包 Rtree-0.9.1-cp37-cp37m-win_amd64.whl 。

我已经尝试了很长时间才能让它工作,但是在运行使用 geopandas 的脚本时不断收到以下错误消息。

whl-package 的安装应该包含 libspatialindex 文件,但是运行代码时找不到它们。我尝试先使用 Python 2.7 运行它,然后安装 Python 3.7。我检查了所有依赖项并检查了“spatialindex_c.dll”文件是否在正确的位置,但没有任何帮助。很高兴得到一个答案。

0 投票
1 回答
255 浏览

python - 在 Google Cloud AI 平台上安装 libspatialindex

我正在尝试在 python 中导入 rtree

导入时出现此错误

在线研究它说我需要在 Jupyter 中运行 !pip install libspatialindex 时安装 libspatialindex,我收到此错误

在这里研究https://libspatialindex.org/它说要安装 conda 并运行它

conda 目前不在 AI 平台笔记本上。不知道怎么安装,没看到网上有关于在AI平台上安装的说明

最好的下一步是什么?谢谢

0 投票
1 回答
2799 浏览

pyinstaller - pyinstaller EXE OSError: 找不到或加载 spatialindex_c-64.dll

我正在使用 Window 10 64bit 创建 exe。但是,exe 给出以下错误: 文件“rtree\core.py”,第 126 行,在 OSError:找不到或加载 spatialindex_c-64.dll [23324] 无法执行脚本微波_python_code

我尝试了以下解决方案 ppl 共享但仍然无法解决问题。

  1. --add-data=C:\path\to\spatialindex_c-64.dll;。到我的构建命令
  2. pip uninstall rtree 然后使用 'Rtree-0.9.4-cp37-none-win_amd64.whl' 安装
  3. 安装“空间索引-src-1.9.3.tar.gz”
  4. 将“spatialindex_c-64.dll”复制到 rtee 站点包文件夹中
  5. 将“spatialindex_c-64.dll”复制到 exe 文件夹中

任何人都可以通过上述操作创建工作 exe 吗?尝试上述解决方案后我仍然面临问题。我还能做些什么来让我的 exe 正常工作?

0 投票
0 回答
122 浏览

osmnx - 如何安装 libspatialindex 以在 Windows 中启用 Rtree?

libspatialindex在 Windows 中使用安装pip时出现以下错误

命令:

错误:

实际上,我想安装依赖于 Rtree 的 osmnx,而 Rtree 依赖于 libspatialindex。我该如何解决这个错误?任何人请帮助我。谢谢你。