gpt4 book ai didi

java - 如何在 GeoTools 中添加航点项目

转载 作者:行者123 更新时间:2023-11-30 05:04:23 26 4
gpt4 key购买 nike

在查看 Geotools 的示例时,我找不到有关将航点添加到 GeoTools map 中的示例。

那么如何将路径点添加到 Geotools 中?

最佳答案

根据您的意图,有几种方法可以回答您的问题:

答:GeoTools 只是一个工具包;它不提供用于添加航路点的交互式 map 。 gt-graph 模块没有可视化教程来展示如何添加航路点。

答:gt-graph 模块确实展示了如何找到 2 个(或更多)位置之间的最短路径;如果您将这些位置视为您设置的航路点。

//calculate the paths
for ( Iterator d = destinations.iterator(); d.hasNext(); ) {
Node destination = (Node) d.next();
Path path = pf.getPath( destination );

//do something with the path
}

要在上下文中查看此源代码,文档页面位于此处:

关于java - 如何在 GeoTools 中添加航点项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5620835/

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