Provides capability to convert E57
file into XYZ
, LAZ
, XML
, JSON
formats.
import { promises as fs } from "fs";
import { parse } from "path";
import { convertE57 } from "web-e57";
async function processE57(filePath) {
const data = await fs.readFile(filePath);
const dataArray = new Uint8Array(data);
const convertedData = convertE57(dataArray, 'XYZ');
// Write converted data to a file on disk
const { dir, name } = parse(filePath);
const outputFilename = `${dir}/${name}.xyz`;
await fs.writeFile(outputFilename, convertedData);
}
import { convertE57 } from "web-e57";
async function processE57(file) {
const data = await file.arrayBuffer();
const dataArray = new Uint8Array(data);
const convertedData = convertE57(dataArray, 'XYZ');
const blob = new Blob([convertedData]);
// Do something with blob
}