# geojson-coords

> return all coordinates from a geojson object

Latest version **0.0.0** (published 2014-04-21) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2014-04-21 |
| First published | 2014-04-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 33 |
| Author | Tom MacWright |
| Maintainers | tmcw |
| Keywords | geojson, coords, browser, coordinates |

## Links

- npm: https://www.npmjs.com/package/geojson-coords
- Repository: git@github.com:mapbox/geojson-coords
- Homepage: https://github.com/mapbox/geojson-coords
- Issues: https://github.com/mapbox/geojson-coords/issues
- npm.io page: https://npm.io/package/geojson-coords

## Dependencies (2)

- [geojson-flatten](https://npm.io/package/geojson-flatten.md) ~0.1.0
- [geojson-normalize](https://npm.io/package/geojson-normalize.md) 0.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.0 (latest) — 2014-04-21

## README

# geojson-coords

Extract coordinates from [GeoJSON](http://geojson.org/).

## install

    npm install --save geojson-coords

## api

### `coords(geojson)`

Given any valid GeoJSON object, return a single array of coordinates that
it contains. Handles any root object, collapses multidimensional coordinate arrays
and expands point coordinate arrays.

## example

```js
var geojsonCoords = require('geojson-coords');

geojsonCoords({
    "type": "GeometryCollection",
    "geometries": [
        {
            "type": "Point",
            "coordinates": [100.0, 0.0]
        },
        {
            "type": "LineString",
            "coordinates": [ [101.0, 0.0], [102.0, 1.0] ]
        }
    ]
});
// returns [[100, 0], [101, 0], [102, 1]];

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