https://github.com/c2corg/fit-parser-extract-geometry
Basic FIT parser that only focuses on extracting geometry from activities
https://github.com/c2corg/fit-parser-extract-geometry
Last synced: 5 months ago
JSON representation
Basic FIT parser that only focuses on extracting geometry from activities
- Host: GitHub
- URL: https://github.com/c2corg/fit-parser-extract-geometry
- Owner: c2corg
- License: mit
- Created: 2022-10-18T07:18:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-04T11:38:09.000Z (9 months ago)
- Last Synced: 2025-09-04T12:30:20.372Z (9 months ago)
- Language: TypeScript
- Size: 1.44 MB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fit-parser-extract-geometry
[](https://github.com/c2corg/fit-parser-extract-geometry/blob/main/LICENSE)   [](https://www.codacy.com/gh/c2corg/fit-parser-extract-geometry/dashboard?utm_source=github.com&utm_medium=referral&utm_content=c2corg/fit-parser-extract-geometry&utm_campaign=Badge_Grade) [](https://www.codacy.com/gh/c2corg/fit-parser-extract-geometry/dashboard?utm_source=github.com&utm_medium=referral&utm_content=c2corg/fit-parser-extract-geometry&utm_campaign=Badge_Coverage)
Basic FIT parser that only focuses on extracting geometry from activities
## Installation
```sh
npm install @c2corg/fit-parser-extract-geometry
```
## Usage
```ts
import { extractGeometry } from '@c2corg/fit-parser-extract-geometry';
const bytes = [0x0E, 0x10, 0xD9, 0x07, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x46, 0x49, 0x54, 0x91, 0x33, 0x00, 0x00];
const geometry = extractGeometry(new Uint8Array(bytes));
```
When an error is encountered, the parser stops silently and returns the coordinates already processed. Set `DEBUG` environment variable to `fit-parser-extract-geometry` to enable error messages ([more info](https://github.com/debug-js/debug)).