This tool will:
-> download a shp file from CDN
-> apply an optional filter
-> converts to topojson
-> simplify geometries while preserving topology
npx atlas-magic us-rivers > newtopojson.json
Watch the magic happen...
#atlas-magic <command> [options…] <>
where <command> is:
us-counties, us-cities, us-rivers, us-states, combine-topo
[options...]
key | default | example |
---|---|---|
--listfile | myFIPScodes.csv (used for filtering) |
|
--filterkey | FIPS |
|
--max | 100000 |
for population (when applied) |
--simplify | 0.006 |
|
--quantize | 1e6 |
$ atlas-magic us-cities --max 250000 > cities_over_250k.json
$ atlas-magic us-counties --listfile fips_codes.csv > my-us-counties.json
$ atlas-magic us-rivers > us-rivers.json
$ atlas-magic us-states > us-states.json
$ atlas-magic us-states > us-states.json
$ atlas-magic us-counties --listfile fips_codes.csv > us-counties.json
$ atlas-magic combine-topo us-states.json us-counties.json > us-states-with-counties.json