Skip to main content

A small library to work with OGC legends

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ogc-legends-0.1.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distributions

ogc_legends-0.1.4-py3.8.egg (4.9 kB view details)

Uploaded Source

ogc_legends-0.1.4-py3.7.egg (4.9 kB view details)

Uploaded Source

ogc_legends-0.1.4-py3.6.egg (4.9 kB view details)

Uploaded Source

ogc_legends-0.1.4-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ogc-legends-0.1.4.tar.gz.

File metadata

  • Download URL: ogc-legends-0.1.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for ogc-legends-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5a2a978e62ee4b9d5e6d3453e15ec0d70c13733df940b94d8c74bcd9eadbb752
MD5 c2db41f6b76cd2faf16ae88190c2d681
BLAKE2b-256 ea1e2ee63101a1a0a5d7590c84a2171889453d223cd34ec4dcf44efc02d42c1f

See more details on using hashes here.

File details

Details for the file ogc_legends-0.1.4-py3.8.egg.

File metadata

  • Download URL: ogc_legends-0.1.4-py3.8.egg
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for ogc_legends-0.1.4-py3.8.egg
Algorithm Hash digest
SHA256 b0ba06ecbad80b4aadd030282267dcb16cf722a470439076f03ebf04fcd0020d
MD5 501caa63df20e1787118773e44b58918
BLAKE2b-256 0809878d02fe37499137e5572f37daf2a4828f88947b230502832c716574f85f

See more details on using hashes here.

File details

Details for the file ogc_legends-0.1.4-py3.7.egg.

File metadata

  • Download URL: ogc_legends-0.1.4-py3.7.egg
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for ogc_legends-0.1.4-py3.7.egg
Algorithm Hash digest
SHA256 fac10a7af57b75e50a33b991ded2155da6b033ccd97c71720d53b1ef32aca743
MD5 9cb286a8598e35e1ba493124408084f8
BLAKE2b-256 68f4dc8c7b367fad6666d09aa3474988981ab8ef6a7892ee97bd46d4ab0c0cf5

See more details on using hashes here.

File details

Details for the file ogc_legends-0.1.4-py3.6.egg.

File metadata

  • Download URL: ogc_legends-0.1.4-py3.6.egg
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for ogc_legends-0.1.4-py3.6.egg
Algorithm Hash digest
SHA256 6370d1774ecce2354398535cdce7efcefff6186582b8ef84eb909d762ea93e53
MD5 f4fa4b1b4e298152e5bf952fab72651c
BLAKE2b-256 79832797425c2ce1974477594dd1c291e961ac38684ff1c55ff4a52022410933

See more details on using hashes here.

File details

Details for the file ogc_legends-0.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: ogc_legends-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for ogc_legends-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f2fad96f7263f40efdc2ef309dd15c8ec270ed159b6bcd719cc7f345ce2b3d16
MD5 aa11181f36cafcb4b657fadb8ceb2f3f
BLAKE2b-256 32d42832342f332e7a525876ca5c78d2cbca06fb692e0edb855ae4e4b25cacff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page