send-dataset
This is a clone of geojsonio-cli for the Mapbox studio dataset editor.
Shoot files from your shell to the Mapbox Studio dataset editor for fast visualization and editing. This is a node.js module and thus requires node.
Read or pipe a file
MAPBOX_ACCESS_TOKEN=<token> send-dataset map.geojsonMAPBOX_ACCESS_TOKEN=<token> send-dataset < run.geojson
Options:
--print prints the url rather than opening it
installation
npm install -g send-dataset
send-dataset
requires that you have a Mapbox API access token in your enviroment as MAPBOX_ACCESS_TOKEN
. This token MUST HAVE the datasets:write
scope.
examples
pipe wkt through wellknown into send-dataset to get magic:
npm install -g send-datasetnpm install -g wellknownecho "MultiPoint(0 0, 1 1, 3 3)" | wellknown | send-dataset
pipe grep'ed geojson through geojsonify:
npm install -g send-datasetnpm install -g geojsonifygrep -h something *json | geojsonify | send-dataset
convert kml or gpx to geojson and push it to geojson.io:
npm install -g send-datasetnpm install -g togeojsontogeojson foo.kml | send-dataset
copy the generated url instead of opening it in a browser (on OSX)
send-dataset foo.geojson --print | pbcopy
simplify geojson with simplify-geojson
npm install simplify-geojson send-dataset csv2geojson -gcurl https://raw.github.com/maxogden/simplify-geojson/master/test-data/oakland-route.csv | \ csv2geojson --lat "LATITUDE N/S" --lon "LONGITUDE E/W" --line true | \ simplify-geojson -t 0.001 | \ send-dataset