Open-source Python library to compute landscape metrics
Project description
PyLandStats
Overview
Open-source Pythonic library to compute landscape metrics within the PyData stack (NumPy, pandas, matplotlib...)
Features
Read GeoTiff files of land use/cover
import pylandstats as pls
ls = pls.read_geotiff('data/vaud_g100_clc00_V18_5.tif')
ls.plot_landscape(legend=True)
Compute pandas DataFrames of landscape metrics at the patch, class and landscape level
patch_metrics_df = ls.compute_patch_metrics_df()
patch_metrics_df.head()
patch_id class_val area perimeter perimeter_area_ratio shape_index fractal_dimension
0 1 115 10600 92.1739 2.40909 1.12965
1 1 13 2600 200 1.625 1.1001
2 1 2 600 300 1 1.01189
3 1 69 6000 86.9565 1.76471 1.08792
4 1 76 8800 115.789 2.44444 1.13672
class_metrics_df = ls.compute_class_metrics_df(metrics=['proportion_of_landscape', 'edge_density'])
class_metrics_df
class_val proportion_of_landscape edge_density
1 7.70194 4.45877
2 92.2981 4.45877
landscape_metrics_df = ls.compute_landscape_metrics_df(metrics=['edge_density', 'shannon_diversity_index'])
landscape_metrics_df
edge_density shannon_diversity_index
0 4.45877 0.271429
See the pylandstats-notebooks repository for a more complete overview
Installation
To install use pip:
$ pip install pylandstats
Or clone the repo:
$ git clone https://github.com/martibosch/pylandstats.git
$ python setup.py install
TODO
- Register project to PyPI
- Add encrypted password to
.travis.yml
for automated PyPI releases
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
pylandstats-0.0.1.tar.gz
(15.2 kB
view hashes)
Built Distribution
Close
Hashes for pylandstats-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcd515ddeef8dc995a9236aa4c2116af74c7f126598005878b78e5b0d65ecbc2 |
|
MD5 | 6f94d54478e4fa3b54ecc8ad0d89c533 |
|
BLAKE2b-256 | d3ec4228e32d99d9039c481e0a47c7aa8b39a52ce9a4e37af2a00f2a3fcdb325 |