Python Wrapper for Fragstats
FragStatsPy a wrapper to Fragstats that allows for automated model setup and execution. While Fragstats currently provides a command-line tool for model execution, it does not provide command-line tools for model setup. FragStatsPy begins to fill that gap by providing functions to generate and manipulate Fragstats models from within Python.
Current functionality includes
- Model database generation
- Loading landscape layers
- Setting the output base path
- Defining a sampling strategy
- Linking user-defined tiles
- A general purpose SQL editor to allow for complete model manipulation (for savvy users)
- Access to the Fragstats native run commands (command-line)
Example Code
The code below will setup and run a Fragstats model to calculate the mean and standard deviation of patch sizes per user-defined region.
import src.frag_model as fspy
model = fspy.FragModel('model_py.fca')
model.set_output_base_path('model_outputs')
model.load_landscape_layer("geomorphic_patches.tif")
model.set_user_provided_tiles("regions.tif")
model.set_sampling_strategy(strategy='user_tiles', landscape=True)
model.toggle_metric(level='l', metric='AREA', stat='MN', on=True)
model.toggle_metric(level='l', metric='AREA', stat='SD', on=True)
model.run_model()
results = model.get_results()
Metadata
Release files for FragStatsPy 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| FragStatsPy-0.0.2.tar.gz | 5.1 kB | Without provenance | Details for FragStatsPy-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| FragStatsPy-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for FragStatsPy-0.0.2-py3-none-any.whl |
Total release size: 11.3 kB
Release files / FragStatsPy-0.0.2.tar.gz
| Download URL | FragStatsPy-0.0.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff3f36c66a81202e671427396a6d048908ce7c86ed96c5f025ae9fb02108abed
|
|
BLAKE2b-256 checksum How to use checksums |
a8097ab2d9eee0fdc1691757fbe6c07c12135e73774d4b18947590de8c045bac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / FragStatsPy-0.0.2-py3-none-any.whl
| Download URL | FragStatsPy-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bb053e78d0cf0c2e8cfbf9312246f05f6c0409132de055a1e3338adb2737574
|
|
BLAKE2b-256 checksum How to use checksums |
8622ffcf0bd2caed420e450ff25875a7e9a1164528888ea751fba80c3dc6436b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for FragStatsPy 0.0.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.