---
id: alpha_shape_concave_hull_py_datascience
name: alpha_shape_concave_hull
kind: function
lang: py
domain: datascience
version: "1.0.0"
purity: pure
signature: "def alpha_shape_concave_hull(points: list[tuple[float, float]], alpha: float) -> shapely.geometry.base.BaseGeometry | None"
description: "Computes the alpha-shape (concave hull) of a 2-D point set via Delaunay triangulation, filtering triangles by circumradius <= alpha and merging survivors."
tags: [geometry, spatial, concave-hull, alpha-shape, shapely, delaunay]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [numpy, shapely]
example: |
  from alpha_shape_concave_hull import alpha_shape_concave_hull
  pts = [(0.0,0.0),(1.0,0.0),(1.0,1.0),(0.0,1.0)]
  geom = alpha_shape_concave_hull(pts, alpha=10.0)
  # shapely Polygon
tested: true
tests:
  - "test_alpha_shape_square_large_alpha"
  - "test_alpha_shape_too_few_points"
  - "test_alpha_shape_very_small_alpha_returns_none"
  - "test_alpha_shape_5_points_returns_geometry"
test_file_path: "python/functions/datascience/tests/test_alpha_shape_concave_hull.py"
file_path: "python/functions/datascience/alpha_shape_concave_hull.py"
params:
  - name: points
    desc: "List of (x, y) coordinate pairs. Requires at least 4 points."
  - name: alpha
    desc: "Alpha radius parameter. Triangles with circumradius > alpha are discarded. Smaller alpha = more concave hull."
output: "Shapely geometry (Polygon or MultiPolygon) of the alpha-shape, or None if fewer than 4 points or no triangles survive the alpha filter."
source_repo: "internal:footprint_aurgi"
source_license: "internal-aurgi"
source_file: "ponderacion_isochronas/src/recomendador_centros.py:408"
---

Requiere shapely. Si shapely no esta instalado, retorna None en silencio. returns_optional=true porque puede no haber triangulos validos.
