(filename)
| 16 | if (!fs.existsSync(outputDirTopojson)) fs.mkdirSync(outputDirTopojson, { recursive: true }); |
| 17 | |
| 18 | async function convertShpToGeo(filename) { |
| 19 | const inputFilePath = `${inputDir}/${filename}.shp`; |
| 20 | const outputFilePath = `${outputDirGeojson}/${filename}.geojson`; |
| 21 | const commands = [inputFilePath, `-proj wgs84`, `-o format=geojson ${outputFilePath}`].join(' '); |
| 22 | await mapshaper.runCommands(commands); |
| 23 | } |
| 24 | |
| 25 | function getJsonFile(filename) { |
| 26 | try { |
no outgoing calls
no test coverage detected
searching dependent graphs…