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()
License
Copyright 2011 Pycoast developers
Licensed under the Apache License, Version 2.0 (the “License”); you may not use these files except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycoast-1.8.0.tar.gz.
File metadata
- Download URL: pycoast-1.8.0.tar.gz
- Upload date:
- Size: 12.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98633b657b3113077072240c45300450be5860c6536362e4f93bbc3251b70d2
|
|
| MD5 |
9f1acd4db534f1e277c2bdb3e3fa5f24
|
|
| BLAKE2b-256 |
2cb151aa5b90c8826b8816a750dd5a5a7ddb12ceddb9584331892eb9a37e744b
|
File details
Details for the file pycoast-1.8.0-py3-none-any.whl.
File metadata
- Download URL: pycoast-1.8.0-py3-none-any.whl
- Upload date:
- Size: 7.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34e6c1ff5ef4a3f24d9cf4a371c8e61e1b1263e6bc81f104e81913d961155b58
|
|
| MD5 |
285783422d7ef60701c4e4c2709c5385
|
|
| BLAKE2b-256 |
b8345b5034432fc49b72cb31f39c5ad7654e41ee6a76139df290d63662f59769
|