Skip to content

Commit 296eb8b

Browse files
authored
Merge pull request #7740 from plotly/cam/7739/update-topojson-dependencies
chore: Update topojson dependencies
2 parents 4d442ca + 72b5369 commit 296eb8b

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

topojson/bin/process_geodata.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,12 @@ async function createLakesLayer({ name, resolution, source }) {
215215

216216
async function createSubunitsLayer({ name, resolution, source }) {
217217
// Only include USA for 'usa' scope since the UN and NE borders don't match exactly and slivers of Canada creep in
218-
const filter = (name === 'usa' ? ['USA'] : ['AUS', 'BRA', 'CAN', 'USA'])
219-
.map((id) => `adm0_a3 === "${id}"`)
220-
.join(' || ');
218+
const filter = name === 'usa' ? 'adm0_a3 === "USA"' : config.filters.subunits;
221219
const inputFilePath = `${outputDirGeojson}/${getNEFilename({ resolution, source })}.geojson`;
222220
const outputFilePath = `${outputDirGeojson}/${name}_${resolution}m/subunits.geojson`;
223221
const commands = [
224222
inputFilePath,
225-
`-filter "${filter}"`,
223+
`-filter '${filter}'`,
226224
`-clip ${outputDirGeojson}/${name}_${resolution}m/countries.geojson`, // Clip to the continent
227225
`-o ${outputFilePath}`
228226
].join(' ');

topojson/package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)