关于创建 WMS 服务和桌面客户端的一些建议?
我正在学习使用 MapServer 创建 WMS 服务,之后我想开发一个可以访问它的 PyQt 桌面应用程序。我不知道最好的方法是什么,因为我见过很多网络解决方案,但这不是我想要的。我也不知道是否有图书馆可以帮助我。你能给我一些建议吗?
提前致谢!
I'm learning to create a WMS service using MapServer and after that I want to develop a PyQt desktop application which will access it. I don't know what is the best way to do that because I have seen a lot of web solutions but it's not what I'm looking for. Neither I know if there are libraries that can help me. Can you give me some advices?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您在 MapServer 上设置 WMS 服务没有任何问题。使用 GIS 桌面客户端或简单的 OpenLayers 网页进行测试。
为了开发 WMS 客户端,我将在 GDAL 库之上构建。这也包含在 MapServer 中。
http://crschmidt.net/blog/archives /285/having-a-large-image-from-openaerialmap/
作为额外的奖励,GDAL 包含 Python 绑定,这将有助于编写脚本。
http://pypi.python.org/pypi/GDAL/
您还需要 < strong>libcurl 访问 URL。 libcurl 也有 Python 绑定 - 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 结果以便更快地使用(也在本地缓存)。
I'm assuming you have no trouble setting up a WMS service on MapServer. Test this is working with a GIS desktop client, or a simple OpenLayers web page.
To develop a WMS client I'd build on top of the GDAL library. This is also included in MapServer.
http://crschmidt.net/blog/archives/285/producing-a-large-image-from-openaerialmap/
As an added bonus GDAL includes Python bindings which will help with scripting.
http://pypi.python.org/pypi/GDAL/
You will also need libcurl to access URLs. libcurl too has Python bindings - http://curl.haxx.se/libcurl/python/
libcurl is also included in MapServer, which itself can be both a WMS server and client. You can also check out the C++ source code for how the MapServer client works - https://trac.osgeo.org/mapserver/browser/branches/branch-5-6/mapserver/mapwmslayer.c
A WMS service returns an image (apart from a few extra meta services), so the custom development will be based around building the correct WMS requests based on user actions.
If you want to have fast performance then have a look at TileCache which will cache the WMS results on the server for quicker use (and also cache locally).