2.0.7 • Published 6 years ago

flow-geojson v2.0.7

Weekly downloads
314
License
MIT
Repository
github
Last release
6 years ago

Flow GeoJSON Build Status

Flow type definitions for GeoJSON

Install

npm

npm install --save-dev flow-geojson

Yarn

yarn add --dev flow-geojson

Usage

About coordinates

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

/**
 * 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)
2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago