0.0.4 • Published 7 years ago

toposplit v0.0.4

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
7 years ago

README

toposplit - Split big topojson files into a file for each object.

CURRENT VERSION 0.0.3

This is pretty much just a script I was writing for a very specific project, so I don't know how fully I will flesh this out, hence the very early version number. See CHANGES for more about each version.

INSTALL

from repo: npm install https://github.com/jakekara/toposplit -g

from npm npm install toposplit -g

NPM PAGE

https://www.npmjs.com/package/toposplit

USAGE

toposplit --input INPUT_FILE--outdir OUTPUT_DIRECTORY | --feature FEATURE_TO_SPLIT

--input INPUT_FILE INPUT_FILE is the json file you want to split

--outdir OUTPUT_DIRECTORY OUTPUT_DIRECTORY is the directory you want the files to be stored in

--feature FEATURE_TO_SPLIT This is for generating a file from only one object This option supercedes --outdir.

EXAMPLE

The demo dir contains demo.sh, which downloads a Census block file, splits it into layers using mapshaper, and then uses topojson to split that into separate files.

NOTE: This demo requires wget (brew install wget) and mapshaper (npm install -g mapshaper)

To use it, git clone this repository into some_dir

$ git clone https://github.com/jakekara/toposplit.git

cd into the demo folder

$ cd toposplit/demo

Run the demo script:

$ chmod 755 demo.sh
$ ./demo.sh

ABOUT

This is my first node program. I'm surprised this feature wasn't in the topojson utilities Mike Bostock wrote or mapshaper. As the demo explains, both

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago