Skip to main content

pycno

Python map overlay software to read CNO and CNOB files. This provides a light-weight interface to add overlays to matplotlib plots. For longitude/latitude plots, no additional prerequisites are required. For data with projected coordinates, see "projection support." This allows for pure python installation with supplemental support if desired.

status

Build Status

Early development. Useful light weight mapping library. Interface may change.

install

  • Latest release: pip install pycno
  • Lastest development: pip install https://github.com/barronh/pycno/archive/main.zip

example usage

By default, this adds coasts and countries to the current axes. If the current axes has no other data on it, provide the xlim/ylim keywords to define the extents.

import pycno
import matplotlib.pyplot as plt


cno = pycno.cno(xlim=(-180, 180), ylim=(-90, 90))
cno.draw()
plt.savefig('coasts_countries.png')

Use the cnopath keyword to specify another overlay. If you specify a downloadable cnopath you don't have, it will automatically be downloaded. For a list of downloadable cnob, see pycno.downloadable. Currently, this includes the Panoply Overlay cnobs. For example, cno.draw('MWDB_Coasts_NA_1.cnob') will download a high-resolution version of North American coasts, continents, and states.

projection support

pycno.cno supports the pyproj projections. If you provide the proj keyword, then overlays coordinates will be converted to the projection space before being plotted. In this case, the xlim/ylim keyworkds will need to be provided in projection space. This should work for most projections, but has only been tested with Lambert Conformal Conic and Polar Stereographic. If you test it with another projection, please post a comment under issues and let us know.

lambert conic conformal

Example uses LCC domain used by EPA and called 12US2

import pycno
import pyproj
import matplotlib.pyplot as plt


proj = pyproj.Proj(
  (
    '+proj=lcc +lat_0=40 +lon_0=-97 +lat_1=33 +lat_2=45 ' +
    '+x_0=2412000 +y_0=1620000 +R=6370000 +to_meter=12000 ' +
    '+no_defs'
  ),
  preserve_units=True
)
plt.axis('image')
cno = pycno.cno(proj=proj, xlim=(0, 396), ylim=(0, 246))
cno.draw()
plt.savefig('coasts_countries_lcc.png')

polar stereographic

Example uses Polar Stereographic domain used by EPA and called 108NHEMI2

import pycno
import pyproj
import matplotlib.pyplot as plt


proj = pyproj.Proj(
  (
    '+proj=stere +lat_0=90 +lat_ts=45 +lon_0=-98 ' +
    '+x_0=10098000 +y_0=10098000 +R=6370000 +to_meter=108000 ' +
    '+no_defs'
  ),
  preserve_units=True
)
plt.axis('image')
cno = pycno.cno(proj=proj, xlim=(0, 187), ylim=(0, 187))
cno.draw()
plt.savefig('coasts_countries_ps.png')

Metadata

Release files for pycno 0.3.2

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

Source distribution (sdist)

Source distribution for pycno 0.3.2
File Size Uploaded Provenance
pycno-0.3.2.tar.gz 150.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pycno 0.3.2
File Interpreter ABI Platform
pycno-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 299.8 kB

Release files / pycno-0.3.2.tar.gz

Download URL pycno-0.3.2.tar.gz
Size 150.2 kB
Tags Source
SHA-256 checksum
How to use checksums
47541ea2febba48bfe0ea3099a5f7cea0579c0c932ad6711437a4548ceaa8603
BLAKE2b-256 checksum
How to use checksums
915113b4adfef68d1c7ec53edabc55fad3a2d6a977416d22b21f3308cd8c5680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.15

Release files / pycno-0.3.2-py3-none-any.whl

Download URL pycno-0.3.2-py3-none-any.whl
Size 149.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ac4031728fde38868e35b360ae137a5235a47fc4c86553e499f99f79eb2a13c
BLAKE2b-256 checksum
How to use checksums
3ebcd7d8a6593f87b46f5be029829d3ff181433928dc9d8f3c442b044e3fbf5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.15

Security for pycno 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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