concaveman
A very fast JavaScript algorithm that draws a concave outline around a set of 2D points. It is useful when a convex hull would cover too much empty space.
Pick a small issue you can reproduce, then fix it with your AI coding agent.
Share on XLicense: ISC
Overview
concaveman is a JavaScript implementation of a 2D concave hull algorithm. Given a set of points, it returns a polygon that outlines the general shape of the set, which is useful when a convex hull would cover too much empty space. You call one function with your points and optionally tune how detailed the outline is. The algorithm follows a published paper and uses a fast nearest-point search to speed it up. A C++ port also exists for use from other languages.
Key features
- One function call returns an outline polygon from [x, y] points
- Concavity setting controls detail, with Infinity giving a convex hull
- Length threshold simplifies the resulting shape
- Built on rbush, tinyqueue and robust-predicates
Best for
Anyone who needs a tight outline around scattered 2D points, for example on a map. Very low concavity values below 1 can give odd shapes.
- Upstream
- mapbox/concaveman
- Fork on GitHub
- Guo-astro/concaveman
- Upstream stars
- 724
- Category
- Maps and geospatial
- Language
- JavaScript
- License
- ISC
- Forked
- 2020-11-01
- Sync status
- In syncLast synced 2026-11-09
More in Maps and geospatial
An interactive atlas for exploring Chinese history from 403 BCE to the present. Move through historical periods to see territorial changes, locate places, and connect them with historical events and poetry.
Forked 2026-10-21Last synced 2026-10-25License: GPL-3.0Maps and geospatialGitHub
A Go terminal map viewer and journey planner for recorded activities and planned routes. Inspect tracks, elevation, and playback offline, or use Mapbox for place search and road routing.
Forked 2026-10-19Last synced 2026-11-09License: MITMaps and geospatialGitHub
GeoLibre is a GIS for visualizing and analyzing geospatial data across browser, desktop, mobile, and notebooks. It keeps work local with browser geoprocessing tools.
Forked 2026-10-07Last synced 2026-11-09License: MITMaps and geospatialGitHub
An open source command line toolkit that turns drone, balloon or kite photos into maps, point clouds, 3D models and elevation models. Used for aerial mapping and surveying.
Forked 2026-06-09Last synced 2026-11-09License: AGPL-3.0Maps and geospatialGitHub