Skip to content

Commit bc373de

Browse files
committed
Adjust snap intervals, simplification to make cleaner polygons
1 parent 8c578e0 commit bc373de

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

topojson/bin/process_geodata.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ const commandsCountries50m = [
369369
`-each 'if (iso3cd) iso3cd = iso3cd.toUpperCase()'`,
370370
`-filter '${filters.countries}'`,
371371
// Snap polygons to clean up land, coastlines layers
372-
'-clean snap-interval=0.00013',
372+
'-clean snap-interval=0.000125',
373373
`-o ${outputFilePathCountries50m}`
374374
].join(' ');
375375
await mapshaper.runCommands(commandsCountries50m);
@@ -388,9 +388,8 @@ const inputFilePathCountries110m = outputFilePathCountries50m;
388388
const outputFilePathCountries110m = `${outputDirGeojson}/${unFilename}_110m/countries.geojson`;
389389
const commandsCountries110m = [
390390
inputFilePathCountries110m,
391-
'-simplify 20%',
392-
// Use 'snap-interval' to fix alignment issues with continental USA, Alaska, and Mexico
393-
'-clean snap-interval=0.015',
391+
'-simplify 21%',
392+
'-clean',
394393
`-o ${outputFilePathCountries110m}`
395394
].join(' ');
396395
await mapshaper.runCommands(commandsCountries110m);

0 commit comments

Comments
 (0)