tmcw

geojson-flatten

flatten multipart geometries and geometrycollections in geojson

by tmcw

JavaScript

JavaScript100%

Commit activity

Last 12 weeks · 8 commits

Full graph →

Community health

1 of 6 standards met

Community profile →
28
✓README○License○Contributing○Code of Conduct○Issue Template○PR Template
bensynapse

I run Live Tennis API. Collection flattening repeatedly concatenates each result onto the accumulated array, copying earlier results again for every member. This becomes expensive for large FeatureCollections and GeometryCollections. Use for both collection paths and add a patch changeset. Existing output order and input mutation behavior are preserved. Verified on Node 22.23.2 with the locked pnpm 12.4.1 dependencies: : Biome and all 7 tests pass. 201 output/input-mutation comparisons against pass, including nested collections, null geometries/properties, feature IDs, empty parts, and a 200,000-point part. Output digests match for 5,000, 10,000, 20,000 and 40,000-member collections. Local timings for 40,000 point members (median of three runs, cloning outside the timed section): Timing reproduction Run this as an ES module from the repository on main and on this branch:

bensynapse · 1mo ago
Structured data for AI agents

Repository: tmcw/geojson-flatten. Description: flatten multipart geometries and geometrycollections in geojson Stars: 54, Forks: 8. Primary language: JavaScript. Languages: JavaScript (100%). Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 28%. Top contributors: tmcw, greenkeeper[bot], dependabot-preview[bot], hyperknot, derhuerst, github-actions[bot], dependabot[bot], stevage, arnoschutijzer, watson and others.