split a topojson file into a folder of topojson files -- one for each object.
License
jakekara/toposplit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
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
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published