跳转到主要内容

一个用于处理OGC图例的小型库

项目描述

Version Build Status

一个用于处理OGC图例的小型库。

import ogc_legends

url = "https://demo.mapserver.org/cgi-bin/wms?"
legends = ogc_legends.get_legends(url, "./images")

for k, v in legends.items():
    print(k, v)

get_legends函数返回的字典结构如下

{
    "cities": [
        {
            "file": "./images\\cities_default.png",
            "style": "default"
        }
    ],
    "continents": [
        {
            "file": "./images\\continents_default.png",
            "style": "default"
        }
    ],
    "country_bounds": [
        {
            "file": "./images\\country_bounds_default.png",
            "style": "default"
        }
    ]
}
https://raw.githubusercontent.com/geographika/ogc-legends/master/images/continents_default.png

从命令行

ogc_legends "https://demo.mapserver.org/cgi-bin/wms?"

保存到不同的文件夹

ogc_legends "https://demo.mapserver.org/cgi-bin/wms?" "./images"

其他选项 - 如果文件已存在,则不要覆盖,并使用WMS版本1.1.1

ogc_legends "https://demo.mapserver.org/cgi-bin/wms?" "./images" False "1.1.1"

需求

  • Python 3.6+

安装

注意安装ogc-legends插件将自动安装所需的依赖项owslib

pip install ogc-legends

版本

0.1 (17/03/2020)

  • 初始版本

作者

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分发

ogc-legends-0.1.4.tar.gz (4.2 kB 查看哈希值)

构建分发

ogc_legends-0.1.4-py3.8.egg (4.9 kB 查看哈希值)

上传于 源代码

ogc_legends-0.1.4-py3.7.egg (4.9 kB 查看哈希)

上传于 源代码

ogc_legends-0.1.4-py3.6.egg (4.9 kB 查看哈希)

上传于 源代码

ogc_legends-0.1.4-py2.py3-none-any.whl (4.2 kB 查看哈希)

上传于 Python 2 Python 3

由以下机构支持

AWSAWS 云计算和安全赞助商 DatadogDatadog 监控 FastlyFastly CDN GoogleGoogle 下载分析 MicrosoftMicrosoft PSF赞助商 PingdomPingdom 监控 SentrySentry 错误日志 StatusPageStatusPage 状态页面