Skip to content

Commit

Permalink
refactor: rename LAZ to LAS
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff committed Jan 18, 2024
1 parent 380a966 commit d14e330
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export { default as GeoJsonParser } from 'Parser/GeoJsonParser';
export { default as KMLParser } from 'Parser/KMLParser';
export { default as CameraCalibrationParser } from 'Parser/CameraCalibrationParser';
export { default as ShapefileParser } from 'Parser/ShapefileParser';
export { default as LASParser } from 'Parser/LAZParser';
export { default as LASParser } from 'Parser/LASParser';
export { default as ISGParser } from 'Parser/ISGParser';
export { default as GDFParser } from 'Parser/GDFParser';
export { default as GTXParser } from 'Parser/GTXParser';
Expand Down
4 changes: 2 additions & 2 deletions src/Parser/LAZLoader.js → src/Parser/LASLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Las } from 'copc';
* xOffset, zOffset]`) added to the scaled X, Y, Z point record values.
*/

class LAZLoader {
class LASLoader {
constructor() {
this._wasmPath = 'https://unpkg.com/laz-perf@0.0.6/lib/';
this._wasmPromise = null;
Expand Down Expand Up @@ -141,4 +141,4 @@ class LAZLoader {
}
}

export default LAZLoader;
export default LASLoader;
14 changes: 7 additions & 7 deletions src/Parser/LAZParser.js → src/Parser/LASParser.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as THREE from 'three';
import LAZLoader from 'Parser/LAZLoader';
import LASLoader from 'Parser/LASLoader';

const lazLoader = new LAZLoader();
const lasLoader = new LASLoader();

/** The LAZParser module provides a [parseChunk]{@link
* module:LASParser.parseChunk} method that takes a LAZ (LASZip) chunk in, and
/** The LASParser module provides a [parse]{@link
* module:LASParser.parse} method that takes a LAS or LAZ (LASZip) file in, and
* gives a `THREE.BufferGeometry` containing all the necessary attributes to be
* displayed in iTowns. It uses the
* [copc.js](https://github.com/connormanning/copc.js/) library.
*
* @module LAZParser
* @module LASParser
*/
export default {
/*
Expand All @@ -20,7 +20,7 @@ export default {
if (!path) {
throw new Error('Path to laz-perf is mandatory');
}
lazLoader.lazPerf = path;
lasLoader.lazPerf = path;
},
/**
* Parses a LAS file or a LAZ (LASZip) file and return the corresponding
Expand All @@ -40,7 +40,7 @@ export default {
if (options.out?.skip) {
console.warn("Warning: options 'skip' not supported anymore");
}
return lazLoader.parseFile(data, {
return lasLoader.parseFile(data, {
colorDepth: options.in?.colorDepth,
}).then((parsedData) => {
const geometry = new THREE.BufferGeometry();
Expand Down
3 changes: 1 addition & 2 deletions src/Source/EntwinePointTileSource.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import proj4 from 'proj4';
// import LASParser from 'Parser/LASParser';
import LASParser from 'Parser/LAZParser';
import LASParser from 'Parser/LASParser';
import PotreeBinParser from 'Parser/PotreeBinParser';
import Fetcher from 'Provider/Fetcher';
import Source from 'Source/Source';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/lazparser.js → test/unit/lasparser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';
import { HttpsProxyAgent } from 'https-proxy-agent';
import LASParser from 'Parser/LAZParser';
import LASParser from 'Parser/LASParser';
import Fetcher from 'Provider/Fetcher';
import { compareWithEpsilon } from './utils';

Expand Down

0 comments on commit d14e330

Please sign in to comment.