python - 关于创建 WMS 服务和桌面客户端的一些建议?

标签 python pyqt gis wms

我正在学习使用 MapServer 创建 WMS 服务,之后我想开发一个可以访问它的 PyQt 桌面应用程序。我不知道最好的方法是什么,因为我见过很多网络解决方案,但这不是我想要的。我也不知道是否有图书馆可以帮助我。你能给我一些建议吗?

提前致谢!

最佳答案

我假设您在 MapServer 上设置 WMS 服务时没有遇到任何问题。使用 GIS 桌面客户端或简单的 OpenLayers 网页进行测试。

为了开发 WMS 客户端,我将在 GDAL 库之上构建。这也包含在 MapServer 中。

GDAL has the ability to read images from a remote WMS server, and treat them as it does any other data source: which means that it can take the images, and convert them to any other format, from JPEG2000 to GeoTIFF.

http://crschmidt.net/blog/archives/285/producing-a-large-image-from-openaerialmap/

作为额外的奖励,GDAL 包含 Python 绑定(bind),这将有助于编写脚本。

http://pypi.python.org/pypi/GDAL/

您还需要 libcurl 来访问 URL。 libcurl 也有 Python 绑定(bind) - http://curl.haxx.se/libcurl/python/

libcurl 也包含在 MapServer 中,它本身既可以是 WMS 服务器,也可以是客户端。您还可以查看 C++ 源代码以了解 MapServer 客户端的工作原理 - https://trac.osgeo.org/mapserver/browser/branches/branch-5-6/mapserver/mapwmslayer.c

WMS 服务返回一个图像(除了一些额外的元服务),因此自定义开发将基于根据用户操作构建正确的 WMS 请求。

如果您想获得快速的性能,请查看TileCache,它将在服务器上缓存 WMS 结果以便更快地使用(也在本地缓存)。

关于python - 关于创建 WMS 服务和桌面客户端的一些建议?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3222954/

相关文章:

r - 如何通过sf找到一个点属于哪个多边形

collections - GeoTools:创建点并将其添加到 featureCollection

python - WEBPY/提供静态文件: 'StaticApp Object has no attribute ' directory'

python - 如何在 QML 中使用 QtWebEngine

python - 如何将通知编号添加到按钮图标?

android - GeoLocation API 在移动设备上的安全性如何?

python - 使用 Python Eve Rest 和 Mongo 过滤嵌入式文档

python - pyqt5 textedit 删除经过指定行的行

python - 将整数添加到元组中的所有值

python - QFileDialog 作为 TableView 的编辑器 : how to get result?