MCPcopy Create free account
hub / github.com/plotly/plotly.js / convertShpToGeo

Function convertShpToGeo

topojson/bin/process_geodata.mjs:18–23  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

16if (!fs.existsSync(outputDirTopojson)) fs.mkdirSync(outputDirTopojson, { recursive: true });
17
18async 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
25function getJsonFile(filename) {
26 try {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…