Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/node-geojson/geojson2dsv
shuttle GeoJSON points into DSV encoding.
https://github.com/node-geojson/geojson2dsv
Last synced: about 1 month ago
JSON representation
shuttle GeoJSON points into DSV encoding.
- Host: GitHub
- URL: https://github.com/node-geojson/geojson2dsv
- Owner: node-geojson
- Created: 2013-12-10T18:33:44.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-03T21:49:07.000Z (over 7 years ago)
- Last Synced: 2024-10-12T20:11:35.027Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 8
- Watchers: 54
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-starred - node-geojson/geojson2dsv - shuttle GeoJSON points into DSV encoding. (others)
README
[![Build Status](https://travis-ci.org/tmcw/geojson2dsv.svg)](https://travis-ci.org/tmcw/geojson2dsv)
[![Coverage Status](https://coveralls.io/repos/tmcw/geojson2dsv/badge.svg)](https://coveralls.io/r/tmcw/geojson2dsv)
[![Greenkeeper badge](https://badges.greenkeeper.io/tmcw/geojson2dsv.svg)](https://greenkeeper.io/)# geojson2dsv
The reverse of [csv2geojson](https://github.com/mapbox/csv2geojson): shuttle [GeoJSON](http://geojson.org/) points into
CSV encoding.## API
### geojson2dsv
Given a valid GeoJSON object, return a CSV composed of all decodable points.
**Parameters**
- `geojson` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** any GeoJSON object
- `delim` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** CSV or DSV delimiter: by default, ","
- `mixedGeometry` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** serialize just the properties
of non-Point features. (optional, default `false`)**Examples**
```javascript
var csvString = geojson2dsv(geojsonObject)
```## see also
- [geojson2csv](https://github.com/morganherlocker/geojson2csv) also does this, but has file-assumptions and does dsv encoding in-house instead of farming it out to mbostock/dsv