Skip to main content
Version Build Status

A small library to work with OGC legends.

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)

The dictionary structure returned by the get_legends function is as follows:

{
    "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

From the command line:

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

To save to a different folder:

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

Other options - don’t override if file already exists, and use WMS version 1.1.1:

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

Requirements

  • Python 3.6+

Installation

Note installing the ogc-legends plugin will automatically install the required dependency owslib.

pip install ogc-legends

Releases

0.1 (17/03/2020)

  • Initial release

Author

Metadata

Release files for ogc-legends 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ogc-legends 0.1.4
File Size Uploaded
ogc-legends-0.1.4.tar.gz 4.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ogc-legends 0.1.4
File
ogc_legends-0.1.4-py3.8.egg Legacy Egg format - - Details
ogc_legends-0.1.4-py3.7.egg Legacy Egg format - - Details
ogc_legends-0.1.4-py3.6.egg Legacy Egg format - - Details
ogc_legends-0.1.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 23.3 kB

Release files / ogc-legends-0.1.4.tar.gz

Download URL ogc-legends-0.1.4.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5a2a978e62ee4b9d5e6d3453e15ec0d70c13733df940b94d8c74bcd9eadbb752
BLAKE2b-256 checksum
How to use checksums
ea1e2ee63101a1a0a5d7590c84a2171889453d223cd34ec4dcf44efc02d42c1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

Release files / ogc_legends-0.1.4-py3.8.egg

Download URL ogc_legends-0.1.4-py3.8.egg
Size 4.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
b0ba06ecbad80b4aadd030282267dcb16cf722a470439076f03ebf04fcd0020d
BLAKE2b-256 checksum
How to use checksums
0809878d02fe37499137e5572f37daf2a4828f88947b230502832c716574f85f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

Release files / ogc_legends-0.1.4-py3.7.egg

Download URL ogc_legends-0.1.4-py3.7.egg
Size 4.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
fac10a7af57b75e50a33b991ded2155da6b033ccd97c71720d53b1ef32aca743
BLAKE2b-256 checksum
How to use checksums
68f4dc8c7b367fad6666d09aa3474988981ab8ef6a7892ee97bd46d4ab0c0cf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

Release files / ogc_legends-0.1.4-py3.6.egg

Download URL ogc_legends-0.1.4-py3.6.egg
Size 4.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
6370d1774ecce2354398535cdce7efcefff6186582b8ef84eb909d762ea93e53
BLAKE2b-256 checksum
How to use checksums
79832797425c2ce1974477594dd1c291e961ac38684ff1c55ff4a52022410933
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

Release files / ogc_legends-0.1.4-py2.py3-none-any.whl

Download URL ogc_legends-0.1.4-py2.py3-none-any.whl
Size 4.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f2fad96f7263f40efdc2ef309dd15c8ec270ed159b6bcd719cc7f345ce2b3d16
BLAKE2b-256 checksum
How to use checksums
32d42832342f332e7a525876ca5c78d2cbca06fb692e0edb855ae4e4b25cacff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.1.4 This release

5 release files

0.1.3

4 release files

0.1.2

4 release files

0.1.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page