skillfed

alphashape

Toolbox for generating alpha shapes.

alphashape v1.3.1 1.4M downloads/30d#3,903 on PyPI313
Permissive license MIT license Active released

What it is and what it does

Alphashape is a computational geometry library that wraps point clouds in tight, adaptive bounding shapes. Unlike a convex hull—which always produces the outermost perimeter—an alpha shape lets you control how tightly the boundary fits by adjusting an alpha parameter: lower values yield convex shapes, higher values produce concave hulls that hug the data more closely. The library works in 2, 3, 4, or higher dimensions and returns either a polygon (2D), a mesh (3D+), or a set of simplices depending on dimensionality.

You can specify the alpha parameter directly, define it as a function of local point density, or let the library solve for an optimal value automatically. A command-line tool is included for batch processing. The package depends on shapely for 2D geometry, trimesh for 3D visualization, and standard scientific Python stack (numpy, scipy, networkx, rtree) for computational backbone.

Use it for:

  • Compute concave hulls around GPS traces or sensor readings to define coverage regions without over-fitting to outliers.
  • Mesh 3D point clouds from LiDAR or photogrammetry by generating alpha shapes at varying scales.
  • Automatically determine tight bounding polygons for geospatial features where convex hulls are too loose.
  • Solve for optimal alpha values in exploratory analysis to find the best-fitting boundary without manual parameter tuning.
  • Generate n-dimensional simplicial complexes for topological or statistical analysis of high-dimensional point sets.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates n-dimensional alpha shapes—concave or convex bounding polygons around point sets—with support for static, dynamic, or automatically-solved alpha parameters.

Yes. The package is stable (Production/Stable classifier), actively maintained, permissively licensed, has no known vulnerabilities, and installs with low friction. It fills a genuine gap between convex hulls and manual boundary fitting. Install it if you need adaptive bounding shapes; skip it only if you require only convex hulls or if your use case is strictly 2D and you prefer a lighter dependency tree.

Install

alphashape on PyPI

pip

pip install alphashape

uv

uv add alphashape

poetry

poetry add alphashape

Installing alphashape

Before you install

Low friction: pure-Python wheel with no compiled dependencies. Actively maintained as of 2026-07-23 with 313 repository stars and no known vulnerabilities.

License in practice

MIT license permits commercial and private use with minimal restrictions; attribution required but no copyleft obligations.

Quickstart

pip install alphashape
import alphashape
import numpy as np
points = [(0., 0.), (0., 1.), (1., 1.), (1., 0.), (0.5, 0.25)]
alpha_shape = alphashape.alphashape(points, 2.0)

Verify before relying

  • Performance characteristics on large datasets (fact sheet notes solving for alpha can be slow but does not quantify thresholds)
  • Numerical stability or precision guarantees for edge cases in high dimensions

Package facts

License MIT license (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 8 — Click, click-log, shapely, numpy, trimesh, networkx, rtree, scipy
Maintenance actively maintained — 1,946 days since the last release
Last repo commit
First released
Downloads 1,434,301/month — #3,903 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: alphashape-1.3.1-py2.py3-none-any.whl

Keywords: alphashape

Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering

Tags

alpha shape generationconcave hull algorithmn-dimensional point boundingalpha complex computationadaptive bounding polygonconvex hull generalizationpoint set boundary fitting
computational-geometrypoint-cloud-processing

More Scientific/Engineering packages

Further reading