Skip to content

Commit

Permalink
Clean TopoJSON (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkaoster authored Dec 8, 2020
1 parent b8092d9 commit a0aa16e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
Binary file modified img/counties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/nation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/towns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/villages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions prepublish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ geo2topo -q 1e10 -n villages=<( \
> base.json

# Use mapshaper to remove extra slivers and islands outside of the boundaries.
mapshaper -i base.json -clip bbox=${bbox} -filter-slivers -o format=topojson villages-10t.json
mapshaper -i base.json -clip bbox=${bbox} -filter-slivers -o force format=topojson base.json

# Use mapshaper to generate village topojson.
mapshaper -i base.json -clean target=villages,towns,counties,nation -o format=topojson villages-10t.json

# Use mapshaper to remove layers of detail we don't want for towns
mapshaper -i villages-10t.json -drop target=villages -o format=topojson target=* towns-10t.json
Expand All @@ -59,7 +62,10 @@ geo2topo -q 1e7 -n villages=<( \
> base-mercator.json

# Use mapshaper to remove extra slivers and islands outside of the boundaries.
mapshaper -i base-mercator.json -filter-slivers -o format=topojson villages-mercator-10t.json
mapshaper -i base-mercator.json -filter-slivers -o force format=topojson base-mercator.json

# Use mapshaper to generate village topojson.
mapshaper -i base-mercator.json -clean target=villages,towns,counties,nation -o format=topojson villages-mercator-10t.json

# Use mapshaper to remove layers of detail we don't want for towns
mapshaper -i villages-mercator-10t.json -drop target=villages -o format=topojson target=* towns-mercator-10t.json
Expand Down

0 comments on commit a0aa16e

Please sign in to comment.