简体   繁体   English

GIS 点之间的行驶距离

[英]Driving Distance Between GIS Points

I have a large number of GIS (latitude, longitude) coordinates, and I'd like to get the distance between them.我有大量的 GIS(纬度、经度)坐标,我想知道它们之间的距离。 Is there a service that will calculate the shortest path for me?是否有服务可以为我计算最短路径? I know about google maps, but I'd like something I can use from Python, and that can handle a large batch of requests at once.我知道谷歌地图,但我想要一些我可以从 Python 中使用的东西,它可以一次处理大量请求。

I'm looking for the driving distance, so a straight distance won't do.我正在寻找行驶距离,所以直线距离是行不通的。

Thanks谢谢

So I take it based on your question and the answers posted that you are asking what program to use?所以我根据您的问题和发布的答案来确定您要使用什么程序? If you can find a way to get a copy for free or cheap (like through work, school, etc) I'd recommend ArcGIS 9.x.如果您能找到一种免费或廉价获取副本的方法(例如通过工作、学校等),我会推荐 ArcGIS 9.x。 It has its quirks, but it's highly supported by the user community and there are a lot of forums and help/training books available for it.它有它的怪癖,但它得到了用户社区的高度支持,并且有很多论坛和帮助/培训书籍可用。 Also, they have adopted Python as their official scripting language for the program (Sweeeet!).此外,他们已经采用 Python 作为他们程序的官方脚本语言(Sweeeet!)。

Another option that is less expensive is GRASS.另一个更便宜的选择是 GRASS。 It's a free, open-source, well established, powerful and multiplatform GIS program.它是一个免费的、开源的、完善的、功能强大的多平台 GIS 程序。 It might have a bit steeper learning-curve than ArcGIS, but I've heard very good things about it considering it's a free program.它的学习曲线可能比 ArcGIS 更陡峭,但考虑到它是一个免费程序,我听说过很多关于它的好消息。

This website lists info on free, open-source (FOS) GIS programs http://opensourcegis.org/ and could give you some good info on your other choices.该网站列出了有关免费、开源 (FOS) GIS 程序的信息http://opensourcegis.org/,并且可以为您提供有关其他选择的一些很好的信息。

I couldn't tell if you were asking a question about how to measure the distance between two points and finding shortest travel distances in a GIS program or if you were just mentioning that's the kind of stuff you would need to do.我不知道你是在问一个关于如何测量两点之间的距离并在 GIS 程序中找到最短行进距离的问题,还是你只是提到这是你需要做的事情。 Either way, ArcGIS is well suited for those tasks.无论哪种方式,ArcGIS 都非常适合这些任务。 Some of the tools in ArcGIS's ArcToolbox already have commands to help you find optimal transportation routes. ArcGIS 的 ArcToolbox 中的一些工具已经具有帮助您找到最佳交通路线的命令。 This link lets you explore some of the tools available ArcToolbox Help .此链接可让您浏览一些可用的工具ArcToolbox 帮助 Most of the tools in ArcToolbox have a GUI batch processing option automatically included as well. ArcToolbox 中的大多数工具都包含自动包含的 GUI 批处理选项。 Measuring point to point distances on an individual basis is easy in ArcGIS, and if you needed to measure a bunch of point to point pairs, you could write a quick Python script to easily do it for you.在 ArcGIS 中单独测量点对点距离很容易,如果您需要测量一堆点对点对,您可以编写一个快速的 Python 脚本来轻松完成。

I think I've answered all of your questions.我想我已经回答了你所有的问题。 Feel free to let me know if there is something I missed or that doesn't make sense.如果有什么我遗漏或没有意义的地方,请随时告诉我。 Hope this helps, buddy.希望这有帮助,伙计。

Check out OpenStreetMap.查看 OpenStreetMap。 You can download their map data and have it lying around on your local system.您可以下载他们的地图数据并将其保存在您的本地系统中。 http://wiki.openstreetmap.org/wiki/Routing discusses the various routing systems for their data. http://wiki.openstreetmap.org/wiki/Routing讨论了用于其数据的各种路由系统。

You are aware that the traveling salesman problem is np-complete?你知道旅行商问题是 np-complete 吗?

using Qgis :使用Qgis

  • Use the delimited text plugin to import the data使用分隔文本插件导入数据
  • save the import as a shape file将导入保存为形状文件
  • Open the shape file打开形状文件
  • using the ftools plugin, calculate the matrix distance使用 ftools 插件,计算矩阵距离

If you have interconnections between the points you could use Dijkstra's algorithm for a 'shortest path from a single point' or Floyd's algorithm for an 'all pairs' shortest path computation.如果您在点之间有互连,您可以使用Dijkstra 算法来计算“来自单个点的最短路径”,或者使用Floyd 算法来计算“所有对”最短路径。

Neither are particularly complicated, however they do assume you know the lengths of the roads between the points.两者都不是特别复杂,但是它们确实假设您知道点之间的道路长度。 You will need to have this data to compute a driving distance.您需要使用这些数据来计算行驶距离。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM