Home

Awesome

TopoJSON Map Generator

This script that generates TopoJSON maps with one command line.

Prerequisites

Usage

Script usage: ./generate.sh [OPTIONS]

Example

# Generate a topojson file at a 50m resolution, skipping antartica and including lakes
./generate.sh -r 50m -a -l

World Maps

The dataset comes from NaturalEarth

Preserved properties

Projection

At the moment the only projection used on this script, when you add the parameter -p, is an equirectangular and a size 960x500:

width = 960, height = 500, d3.geo.equirectangular().rotate([-11.0, 0.0, 0.0]).scale(width /(2 * Math.PI)).translate([width / 2, height / 2])

You can edit it on the script if you targeting another projection. Here's [an example](Here's an example of where it's used) of where it has been used

Contribute

You are welcomed to fork the project and make pull requests. Be sure to create a branch for each feature!