Skip to content

Commit

Permalink
Strip metadata out of roads to reduce size
Browse files Browse the repository at this point in the history
  • Loading branch information
cypressf committed Feb 25, 2021
1 parent 58b04a3 commit 2233bd4
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions mit data/convert_highway_shapefile.fish
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

shp2json $argv[1] |
geoproject 'd3.geoAlbersUsa().fitSize([975, 610], d)' |
ndjson-split 'd.features' > temp-map.ndjson
ndjson-split 'd.features' |
ndjson-map 'delete d.properties.OBJECTID,
delete d.properties.PREFIX,
delete d.properties.PRETYPE,
delete d.properties.NAME,
delete d.properties.TYPE,
delete d.properties.SUFFIX,
delete d.properties.CLASS,
delete d.properties.CLASS_RTE,
delete d.properties.HWY_TYPE,
delete d.properties.HWY_SYMBOL,
delete d.properties.Shape_Leng,
d' > temp-map.ndjson
geo2topo -n roads=temp-map.ndjson |
toposimplify -p -1 -f |
topoquantize 1e5 > usa-topo.json
topoquantize 1e5 > roads-topo.json

0 comments on commit 2233bd4

Please sign in to comment.