1.2.0 • Published 6 days ago

web-e57 v1.2.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 days ago

E57 File Conversion for JavaScript

Provides capability to convert E57 file into XYZ, LAZ, XML, JSON formats.

Usage in node.js application

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);
}

Usage in web application

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
}
1.2.0

6 days ago

1.1.0

1 month ago

1.0.0

1 month ago