csvtogeojson

    0.0.2 • Public • Published

    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
        }
    };
    

    Install

    npm i csvtogeojson

    DownloadsWeekly Downloads

    4

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • florianschmidt1994