diff --git a/topojson/bin/process_geodata.mjs b/topojson/bin/process_geodata.mjs index f0b2313d07d..ccd245d1632 100644 --- a/topojson/bin/process_geodata.mjs +++ b/topojson/bin/process_geodata.mjs @@ -215,14 +215,12 @@ async function createLakesLayer({ name, resolution, source }) { async function createSubunitsLayer({ name, resolution, source }) { // Only include USA for 'usa' scope since the UN and NE borders don't match exactly and slivers of Canada creep in - const filter = (name === 'usa' ? ['USA'] : ['AUS', 'BRA', 'CAN', 'USA']) - .map((id) => `adm0_a3 === "${id}"`) - .join(' || '); + const filter = name === 'usa' ? 'adm0_a3 === "USA"' : config.filters.subunits; const inputFilePath = `${outputDirGeojson}/${getNEFilename({ resolution, source })}.geojson`; const outputFilePath = `${outputDirGeojson}/${name}_${resolution}m/subunits.geojson`; const commands = [ inputFilePath, - `-filter "${filter}"`, + `-filter '${filter}'`, `-clip ${outputDirGeojson}/${name}_${resolution}m/countries.geojson`, // Clip to the continent `-o ${outputFilePath}` ].join(' '); diff --git a/topojson/package-lock.json b/topojson/package-lock.json index 8227ca6182d..7ce21c5ab68 100644 --- a/topojson/package-lock.json +++ b/topojson/package-lock.json @@ -4,6 +4,7 @@ "requires": true, "packages": { "": { + "name": "topojson", "devDependencies": { "@mapbox/geojson-rewind": "^0.5.2", "d3-geo": "^3.1.1", @@ -187,9 +188,9 @@ "license": "MIT" }, "node_modules/@xmldom/xmldom": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", - "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", + "version": "0.8.12", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.12.tgz", + "integrity": "sha512-9k/gHF6n/pAi/9tqr3m3aqkuiNosYTurLLUtc7xQ9sxB/wm7WPygCv8GYa6mS0fLJEHhqMC1ATYhz++U/lRHqg==", "dev": true, "license": "MIT", "engines": { @@ -1027,9 +1028,9 @@ } }, "node_modules/qs": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", - "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": {