# flow-geojson

> Flow type definitions for GeoJSON

Latest version **2.0.7** (published 2018-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install flow-geojson
pnpm add flow-geojson
yarn add flow-geojson
bun add flow-geojson
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.7 |
| Published | 2018-09-22 |
| First published | 2017-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Pavel Tereschenko |
| Maintainers | bigslycat |
| Keywords | GeoJSON, Flow, flowtype, maps, map |

## Links

- npm: https://www.npmjs.com/package/flow-geojson
- Repository: https://github.com/bigslycat/flow-geojson
- Homepage: https://github.com/bigslycat/flow-geojson#readme
- Issues: https://github.com/bigslycat/flow-geojson/issues
- npm.io page: https://npm.io/package/flow-geojson

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.7 (latest) — 2018-09-22
- 2.0.6 — 2018-01-27
- 2.0.5 — 2018-01-27
- 2.0.4 — 2018-01-27
- 2.0.3 — 2017-12-24
- 2.0.2 — 2017-12-17
- 2.0.1 — 2017-12-17
- 2.0.0 — 2017-12-17
- 1.0.2 — 2017-05-26
- 1.0.1 — 2017-05-25
- 1.0.0 — 2017-05-25

## README

# Flow GeoJSON [![Build Status][status-img]][status-url]

Flow type definitions for GeoJSON

- [Install](#install)
  - [npm](#npm)
  - [Yarn](#yarn)
- [Usage](#usage)
  - [About coordinates](#about-coordinates)
  - [Available types](#available-types)

## Install

### npm
```bash
npm install --save-dev flow-geojson
```

### Yarn
```bash
yarn add --dev flow-geojson
```

## Usage

### About coordinates

Because of the flow restrictions, the package uses three types of coordinates:

```js
/**
 * For universal, but less strict type checking
 * [longitude, latitude] or [longitude, latitude, altitude]
 */
type Coord   = [number, number, number | void];

/**
 * [longitude, latitude]
 */
type Coord2D = [number, number];

/**
 * [longitude, latitude, altitude]
 */
type Coord3D = [number, number, number];
```

All exported types are named similarly to the type of coordinates used.

### Opaque types support

Since version 2.0.0, you can use types with the suffix `Strict`. For example `Point3D`
contains `[number, number, number]` when `Point3DStrict` contains `[Longitude, Latitude, Altitude]`.

### Available types

- `Longitude` (opaque type)
- `Latitude` (opaque type)
- `Altitude` (opaque type)
- `FeatureCollection`
- `FeatureCollectionStrict` (use coordinates as opaque types)
- `FeatureCollection2D`
- `FeatureCollection2DStrict` (use coordinates as opaque types)
- `FeatureCollection3D`
- `FeatureCollection3DStrict` (use coordinates as opaque types)
- `Feature`
- `FeatureStrict` (use coordinates as opaque types)
- `Feature2D`
- `Feature2DStrict` (use coordinates as opaque types)
- `Feature3D`
- `Feature3DStrict` (use coordinates as opaque types)
- `Point`
- `PointStrict` (use coordinates as opaque types)
- `Point2D`
- `Point2DStrict` (use coordinates as opaque types)
- `Point3D`
- `Point3DStrict` (use coordinates as opaque types)
- `MultiPoint`
- `MultiPointStrict` (use coordinates as opaque types)
- `MultiPoint2D`
- `MultiPoint2DStrict` (use coordinates as opaque types)
- `MultiPoint3D`
- `MultiPoint3DStrict` (use coordinates as opaque types)
- `LineString`
- `LineStringStrict` (use coordinates as opaque types)
- `LineString2D`
- `LineString2DStrict` (use coordinates as opaque types)
- `LineString3D`
- `LineString3DStrict` (use coordinates as opaque types)
- `MultiLineString`
- `MultiLineStringStrict` (use coordinates as opaque types)
- `MultiLineString2D`
- `MultiLineString2DStrict` (use coordinates as opaque types)
- `MultiLineString3D`
- `MultiLineString3DStrict` (use coordinates as opaque types)
- `Polygon`
- `PolygonStrict` (use coordinates as opaque types)
- `Polygon2D`
- `Polygon2DStrict` (use coordinates as opaque types)
- `Polygon3D`
- `Polygon3DStrict` (use coordinates as opaque types)
- `MultiPolygon`
- `MultiPolygonStrict` (use coordinates as opaque types)
- `MultiPolygon2D`
- `MultiPolygon2DStrict` (use coordinates as opaque types)
- `MultiPolygon3D`
- `MultiPolygon3DStrict` (use coordinates as opaque types)
- `GeometryCollection`
- `GeometryCollectionStrict` (use coordinates as opaque types)
- `GeometryCollection2D`
- `GeometryCollection2DStrict` (use coordinates as opaque types)
- `GeometryCollection3D`
- `GeometryCollection3DStrict` (use coordinates as opaque types)

[status-url]: https://travis-ci.org/bigslycat/flow-geojson
[status-img]: https://travis-ci.org/bigslycat/flow-geojson.svg?branch=master

---
_Source: https://npm.io/package/flow-geojson · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
