Skip to content

Commit

Permalink
US-SEC: merge Florida counties and drop internal borders
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Aug 8, 2019
1 parent e9178cd commit e80d5e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion web/generate-geometries.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,14 @@ zoneFeatures = toListOfFeatures(zoneFeaturesInline);
// Write unsimplified list of geojson, without state merges
fs.writeFileSync('public/dist/zonegeometries.json', zoneFeatures.map(JSON.stringify).join('\n'));

// Simplify all countries
// Convert to TopoJSON
const topojson = require('topojson');
let topo = topojson.topology(zones);

// merge Florida counties in US-SEC
topo.objects['US-SEC'] = topojson.mergeArcs(topo, [topo.objects['US-SEC']]);

// Simplify all countries
topo = topojson.presimplify(topo);
topo = topojson.simplify(topo, 0.01);

Expand Down
2 changes: 1 addition & 1 deletion web/src/world.json

Large diffs are not rendered by default.

0 comments on commit e80d5e5

Please sign in to comment.