0.0.2 • Published 10 years ago

csvtogeojson v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

roadstar-csvtogeojson

About

A converter to create GeoJSON out of csv file with predefined columns. This is no general solution for converting csv to geojson (jet), but a custom converter for the roadstar project

Install

npm install csvtogeojson

Usage

CSV should contain the following columns int id, int time, float latitude, float longitude, float speed, float measurement, string quality

Example:

var converter = require('csvtogeojson');
var csvRow = '1,100,54321.345,12345.453,10.1,0.003,\"green\"';
var result = rowToGeoJSON(csvRow);

The result is a geoJSON object, e.g:

{
    'type' : 'Feature',
    'geometry' : {
        'type' : 'Point',
        'coordinates' : [12345.453, 54321.345]
    },
    'properties' : {
        'speed' : 10.1,
        'measurement' : 0.003,
        'quality' : "green",
        'roadstarID' : 1
    }
};
0.0.2

10 years ago

0.0.1

10 years ago