Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-geojson with all npm packages installed. Try it out:

var gulpGeojson = require("gulp-geojson")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-geojson v0.2.0

convert multipule file format to geojson.

gulp-geojson

Build Status

Converting multipule geo file format to geojson using gulp.

Install

npm install --save-dev gulp-geojson

Support

  • kml
  • csv
  • tsv
  • topojson
  • gpx

Example

var gulp = require('gulp');
var geojson = require('./');
var rename = require('gulp-rename');

// kml
gulp.task('kml', function () {
    gulp.src('sample/data/*.kml')
        .pipe(geojson())
        .pipe(rename({extname: '.geojson'}))
        .pipe(gulp.dest('./sample/dist'));
});

// csv
gulp.task('csv', function () {
    gulp.src('sample/data/*.csv')
        .pipe(geojson())
        .pipe(rename({extname: '.geojson'}))
        .pipe(gulp.dest('./sample/dist'));
});


// tsv
gulp.task('tsv', function () {
    gulp.src('sample/data/*.tsv')
        .pipe(geojson())
        .pipe(rename({extname: '.geojson'}))
        .pipe(gulp.dest('./sample/dist'));
});

// gpx
gulp.task('gpx', function () {
    gulp.src('sample/data/*.gpx')
        .pipe(geojson())
        .pipe(rename({extname: '.geojson'}))
        .pipe(gulp.dest('./sample/dist'));
});

// topojson
gulp.task('topojson', function () {
    gulp.src('sample/data/*.topojson')
        .pipe(geojson())
        .pipe(rename({extname: '.geojson'}))
        .pipe(gulp.dest('./sample/dist'));
});

gulp.task('default', ['kml','csv','tsv','gpx','topojson']);

API

geojson()

geojson()

License

MIT @chilijung

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free