Writing of coastlines, borders and rivers to images in Python
Project description
Python package for adding coastlines, borders, rivers, lakes, cities, and other overlays to raster images.
Installation
PyCoast can be installed from PyPI using pip:
pip install pycoast
Or with conda using the conda-forge channel:
conda install -c conda-forge pycoast
Example
>>> from PIL import Image >>> from pycoast import ContourWriterAGG >>> img = Image.open('BMNG_clouds_201109181715_areaT2.png') >>> proj4_string = '+proj=stere +lon_0=8.00 +lat_0=50.00 +lat_ts=50.00 +ellps=WGS84' >>> area_extent = (-3363403.31,-2291879.85,2630596.69,2203620.1) >>> area_def = (proj4_string, area_extent) >>> cw = ContourWriterAGG('/home/esn/data/gshhs') >>> cw.add_coastlines(img, area_def, resolution='l', level=4) >>> cw.add_rivers(img, area_def, level=5, outline='blue') >>> cw.add_borders(img, area_def, outline=(255, 0, 0)) >>> img.show()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycoast-1.7.1.tar.gz
(12.7 MB
view details)
Built Distribution
File details
Details for the file pycoast-1.7.1.tar.gz
.
File metadata
- Download URL: pycoast-1.7.1.tar.gz
- Upload date:
- Size: 12.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 301d8fcf38805f23ddbcbfbf2e9bd6c466aaee92553ffceccee0f2b7ad7e3637 |
|
MD5 | 1e6a6eab8113026cc02916f2cbb8a613 |
|
BLAKE2b-256 | 5bade97cb6bc778ea90b945c92a937081c06b5054fbc68a2d7bbd8fdc1a9394c |
File details
Details for the file pycoast-1.7.1-py3-none-any.whl
.
File metadata
- Download URL: pycoast-1.7.1-py3-none-any.whl
- Upload date:
- Size: 7.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f76f0c0421af5c544d2868bdd39f82018b5ff1c9f5ebe8ce897077628c3a8180 |
|
MD5 | ee8a7def8e31b45d6dd38eb301b13167 |
|
BLAKE2b-256 | 136e234ba192727f584fdc9f643483c899d0e38f66d39bba0dd35e722b4fd0f7 |