Skip to main content

CoastPy

Python tools for cloud-native coastal analytics.

Installation

You can install coastpy with pip in a Python environment where GDAL and pyproj are already installed.

pip install coastpy

However, if you start from scratch, it's probably easier to install with conda:

conda env create -f https://raw.githubusercontent.com/TUDelft-CITG/coastpy/refs/heads/main/environment.yaml

Data

The data that is produced with this software can be directly accessed via the cloud using tools like DuckDB; see the tutorials and analytics other for other access methods (Python) and latest usage instructions.

Global Coastal Transect System (GCTS)

Cross-shore coastal transects are essential to coastal monitoring, offering a consistent reference line to measure coastal change, while providing a robust foundation to map coastal characteristics and derive coastal statistics thereof.

The Global Coastal Transect System consists of more than 11 million cross-shore coastal transects uniformly spaced at 100-m intervals alongshore, for all OpenStreetMap coastlines that are longer than 5 kilometers.

# Download all transects located in the United States.
duckdb -c "COPY (SELECT * FROM 'az://coclico.blob.core.windows.net/gcts/release/2024-08-02/*.parquet' AS gcts WHERE gcts.country = 'US') TO 'United_States.parquet' (FORMAT 'PARQUET')"
# Download transects by bounding box.
duckdb -c "COPY (SELECT * FROM 'az://coclico.blob.core.windows.net/gcts/release/2024-08-02/*.parquet' AS gcts WHERE bbox.xmin <= 14.58 AND bbox.ymin <= -22.77 AND bbox.xmax >= 14.27 AND bbox.ymax >= -23.57) TO area_of_interest.parquet (FORMAT 'PARQUET')"
# Or, download the data in bulk using AZ CLI
az storage blob download-batch \
    --destination "./" \
    --source "gcts" \
    --pattern "release/2024-08-02/*.parquet" \
    --account-name coclico

Coastal Grid

The Coastal Grid dataset provides a global tiling system for coastal analytics. It supports scalable data processing workflows by offering coastal tiles at varying zoom levels (5, 6, 7, 8, 9, 10) and buffer sizes (500 m, 1000 m, 2000 m, 5000 m, 10000 m, 15000 m).

Installation & usage instructions

Better installation and usage instructions will come when we build the documentation. For now, to run tutorials, analytics or scripts, you could consider proceeding as follows.

Installation

  1. Install Git or GitHub Desktop
  2. Clone CoastPy
  3. Install Miniforge
  4. Open a Miniforge prompt (finder/spotlight)
  5. Run the following commands:
# Update conda if you already had miniforge installed
conda update --all --yes

# Create the software environment
conda env create -f https://raw.githubusercontent.com/TUDelft-CITG/coastpy/refs/heads/main/environment.yaml

Usage

  1. Open Miniforge
  2. Change to the directory where CoastPy was cloned by using cd /path/to/coastpy
  3. Activate the software environment by mamba activate coastal
  4. Launch Jupyter lab by jupyter lab
  5. Navigate to the tutorials folder in Jupyter lab

Citation:

@article{CALKOEN2025106257,
  title     = {Enabling coastal analytics at planetary scale},
  journal   = {Environmental Modelling & Software},
  volume    = {183},
  pages     = {106257},
  year      = {2025},
  issn      = {1364-8152},
  doi       = {https://doi.org/10.1016/j.envsoft.2024.106257},
  url       = {https://www.sciencedirect.com/science/article/pii/S1364815224003189},
}

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

coastpy was created by Floris Calkoen. The software is licensed under the terms of the MIT license. Data licenses are typically CC-BY-4.0, and can be found in the respective STAC collection.

Metadata

Release files for coastpy 0.2.5

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

Source distribution (sdist)

Source distribution for coastpy 0.2.5
File Size Uploaded Provenance Actions
coastpy-0.2.5.tar.gz 154.3 kB Without provenance Details for coastpy-0.2.5.tar.gz

Built distribution (wheel)

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

Total release size: 263.0 kB

Release files / coastpy-0.2.5.tar.gz

Download URL coastpy-0.2.5.tar.gz
Size 154.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ce2c133aa6753a26a082c4026950163ac3173784bad8db135776c80d37c1001d
BLAKE2b-256 checksum
How to use checksums
d7b1e87b1aa31c91d85275fba774ae4eebb83114bddc62bd5802742f44f19440
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / coastpy-0.2.5-py3-none-any.whl

Download URL coastpy-0.2.5-py3-none-any.whl
Size 108.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c12b19488063f06e3dcfdc94ea299e870d96e18c7485632a3619b9c99f34466
BLAKE2b-256 checksum
How to use checksums
e6e65e8379029546100ae307947a11a1f83bb8aac09bbb2341f58208f75f4d06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for coastpy 0.2.5

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