7.0.10 • Published 2 years ago

@devgioele/winged v7.0.10

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
github
Last release
2 years ago

winged

A blazingly fast GeoJSONL processor to group geographical features

Install

Using pnpm:

pnpm add @devgioele/winged

Using npm:

npm install @devgioele/winged

Getting started

One to many

To group the features of one GeoJSONL file according to the property nation:

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:

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:

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. Use node -v to check your current version.

Enable corepack

corepack enable

Install dependencies

pnpm install
7.0.10

2 years ago

7.0.9

2 years ago

7.0.6

2 years ago

7.0.5

2 years ago

7.0.4

2 years ago

7.0.3

2 years ago

7.0.2

2 years ago