(inputFilepath, outputFilepath)
| 64 | |
| 65 | // Clamp x-coordinates to the antimeridian |
| 66 | function clampToAntimeridian(inputFilepath, outputFilepath) { |
| 67 | outputFilepath ||= inputFilepath; |
| 68 | const jsonString = fs.readFileSync(inputFilepath, 'utf8'); |
| 69 | const updatedString = jsonString.replaceAll(/179\.9999\d+,/g, '180,').replaceAll(/180\.0000\d+,/g, '180,'); |
| 70 | |
| 71 | fs.writeFileSync(outputFilepath, updatedString); |
| 72 | } |
| 73 | |
| 74 | function pruneProperties(topojson) { |
| 75 | for (const layer in topojson.objects) { |
no outgoing calls
no test coverage detected
searching dependent graphs…