Convert SVG files to GeoJSON
svg-plotter can be used in both NodeJS and the browser.
Install using npm:
npm install svg-plotter
const { convertSVG } = require('svg-plotter');
const svg = `
<svg height="512" width="512" version="1.1" xmlns="http://www.w3.org/2000/svg">
<line x1="128" y1="128" x2="384" y2="384" stroke="black" />
</svg>
`;
const { geojson, errors } = convertSVG(svg);
npm install -g svg-plotter
svg-plotter ./path/to/input.svg
svg-plotter --help