gpt4 book ai didi

java - Here-API:PDE 请求返回 GeoboundingBox 之外的 POI

转载 作者:行者123 更新时间:2023-12-02 03:42:49 25 4
gpt4 key购买 nike

我正在使用 Here SDK 和 Here API 创建一个 Android 应用程序。在我的应用程序中,我向 PDE(平台数据扩展)发送请求以获取不同层的 POI。该请求是使用 GeoboundingBox 创建的,以我当前的位置为中心,宽度和高度各为 20 公里。

但显然请求返回了一个响应,其中包含定义的 GeoboundingBox 之外的 POI。

这是如何工作的?难道是我要求错了?下面是代码:

Set<String> layers = new HashSet<>(Arrays.asList("POI_SMALLER", "POI_SMALL", "POI_BIG"));
GeoBoundingBox box = new GeoBoundingBox(new GeoCoordinate(loc.getLatitude(), loc.getLongitude()), 20000, 20000);
final PlatformDataRequest req = PlatformDataRequest.createBoundingBoxRequest(layers, box);
req.execute((platformDataResult, error) -> {
//show markers on map
});

我在 map 中将 POI(按某些类别过滤)标记为蓝色点,我当前的位置标记为绿色。 GeoboundingBox 的左上角坐标和右下角坐标标记为黄色(由红色包围)。

我预计蓝色标记(找到的 POI)位于黄色标记(GeoboundingBox 的坐标)标记的范围内,但其中一些位于该范围之外。

enter image description here

最佳答案

我们有here演示页面,您还可以在其中测试偏微分方程的行为。

我尝试了这个边界框:52.245、8.715、52.065、8.894,但请求的矩形内有所有 POI:

enter image description here

您可以在应用程序中调试发送到 PDE 的确切坐标并将其与黄色坐标进行比较吗?

关于java - Here-API:PDE 请求返回 GeoboundingBox 之外的 POI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56824719/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com