Package Exports
- web-e57
- web-e57/e57.js
- web-e57/e57_bg.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (web-e57) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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
}