A small library to work with OGC legends
Project description
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"
}
]
}
From the command line:
python ogc_legends.py "https://demo.mapserver.org/cgi-bin/wms?" "./images"
Other options - don’t override if file already exists, and use WMS version 1.1.1:
python ogc_legends.py "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
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.1.tar.gz
(4.0 kB
view hashes)
Built Distributions
ogc_legends-0.1.1-py3.7.egg
(4.6 kB
view hashes)
ogc_legends-0.1.1-py3.6.egg
(4.6 kB
view hashes)
Close
Hashes for ogc_legends-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e0c04d97e047c645a954520038baa12e6874534c5d2dda78271071fe2e49c70 |
|
MD5 | a571b50ee8f1bf1cc49ecac93ef42e95 |
|
BLAKE2b-256 | b3e77f0fdae7bdfd1889a8b4d350c71746997852cc8b92b4ef32e6c0e71353d2 |