Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devgioele/winged
A blazingly fast GeoJSONL processor to group geographical features
https://github.com/devgioele/winged
geojson geojsonl gis nodejs
Last synced: about 1 month ago
JSON representation
A blazingly fast GeoJSONL processor to group geographical features
- Host: GitHub
- URL: https://github.com/devgioele/winged
- Owner: devgioele
- License: lgpl-3.0
- Created: 2022-05-30T12:20:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T00:34:34.000Z (12 months ago)
- Last Synced: 2024-08-09T03:09:55.247Z (4 months ago)
- Topics: geojson, geojsonl, gis, nodejs
- Language: TypeScript
- Homepage:
- Size: 3.34 MB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
- awesome-blazingly-fast - winged - A blazingly fast GeoJSONL processor to group geographical features (TypeScript)
README
# winged
A blazingly fast GeoJSONL processor to group geographical features
## Install
Using pnpm:
```sh
pnpm add @devgioele/winged
```Using npm:
```sh
npm install @devgioele/winged
```## Getting started
### One to many
To group the features of one GeoJSONL file according to the property `nation`:
```ts
import { groupFeatures } from '@devgioele/winged'const files = [
{
name: 'source',
path: './some-path-to-the-file.geojsonl'
}
]const [generatedFiles, malformedFiles] = await groupFeatures(
files,
'./result',
['nation']
)
```### Many to many
To group the features of two GeoJSONL files according to the property `nation` and convert them to GeoJSON at the same time:
```ts
import { groupFeatures } from '@devgioele/winged'const files = [
{
name: 'some-prefix',
path: './some-path-to-source1.geojsonl'
},
{
name: 'some-prefix',
path: './some-path-to-source2.geojsonl'
}
]const [generatedFiles, malformedFiles] = await groupFeatures(
files,
'./result',
['nation']
)
```The many-to-many processing is achieved by giving to both input files the same name.
### To GeoJSON
Convert the output files to GeoJSON at the same time by enabling the `toGeoJson` flag:
```ts
import { groupFeatures } from '@devgioele/winged'const files = [
{
name: 'source',
path: './some-path-to-the-file.geojsonl'
}
]const [generatedFiles, malformedFiles] = await groupFeatures(
files,
'./result',
['nation'],
{ toGeoJson: true }
)```
## Contributing
### Install Node.js
Install [version 16.10 or higher of Node.js](https://nodejs.org/en/download/). Use `node -v` to check your current version.
### Enable corepack
```sh
corepack enable
```### Install dependencies
```sh
pnpm install
```