Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README

README

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

CURRENT VERSION 0.0.4

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. The EXAMPLE
section describes how to use the demo, which is a pretty thorough example
shell script that is probably just as effective as a tutorial would be.

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, install toposplit, and then 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 and package. I'm surprised this feature
wasn't in the topojson utilities Mike Bostock wrote or mapshaper. 

About

split a topojson file into a folder of topojson files -- one for each object.

Resources

License

Releases

No releases published

Packages

No packages published