Merge EPT Entwine Point Tile Maps

EPT format is a storage method for point clouds, base on an octree structure. The encoding of the point cloud is up to the user, whether las/laz, binary, or whatever custom format. So let’s say you store it in laz. What EPT does is to generate the octree to manage how those laz files are stored.

Merging EPT

Given two geographically separated point clouds, it is possible to merge them into the same EPT structure, given they use the same frame of reference. Because Potree doesn’t handle latitude and longitude rendering (as they are angles and not euclidean), you have to use euclidean systems, such as UTM coordinates.

Merging two point clouds together

You must first specify a large bounds for the initial build, and add more files later like this:

entwine build -i ~/data/xyz -o ~/entwine/xyz -b "[100, 100, 0, 400, 400, 200]"
entwine build -i ~/data/abc -o ~/entwine/xyz

See Entwine issue 109

Caveats

A caveat is that when you’re generating the first frame, you need to custom input the bounding cube bounds, because by EPT design the octree cannot be rebalanced (without recomputing for all points).

Another caveat is that UTM zone is not encoded in the laz file, using UTM cannot be extended over geographical regions. Thus we may have to store xyz points in lat/lng/alt format.

Yet another caveat is the source ID for these points are going to collide. E.g. in file1.laz you have frames ID 0-100 and file2.laz you have frames ID 0-10, then the 0-10 IDs would collide. A workaround would be to assign global unique IDs.

WD 8TB Hard Drive Shucking For NAS

The Western Digital (WD) Easystore 8TB is an external hard drive sold exclusively by Best Buy. It’s highly sought after because it contains a WD Red or unlabelled WD White 8TB drive, which can be “shucked” and used in a home server.

Typically you can get 8TB for $140+tax when on sale, whereas a regular WD 8TB NAS drive costs around $260+tax.

There are more details in this reddit post about the drives and how to shuck them.

Start by inserting plastic cards into these places and pry them out.

Wiggle out the drive.

Two screws hold the PCB board on the drive.

Slide out the connector

Done, now to mount into the Synology drive mount.

Insert and then configure in Synology.
Disk 3 shows up in Synology Storage Manager.
Add the disk, and it’ll take some time to wipe and initialize.

After a few hours the volume is expanded.

Install g++-8 compiler

The new C++17 language requires g++ >= 8.0. To install it in Ubuntu 18.04:

$ sudo apt install g++-8
...
$ which g++
/usr/bin/g++
$ which g++-8
/usr/bin/g++-8
$ sudo unlink g++
$ sudo link -s /usr/bin/g++-8 /usr/bin/g++
$ g++ --version
g++ (Ubuntu 8.2.0-1ubuntu2~18.04) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Re-link After Make Install

The magical command sudo /sbin/ldconfig -v reconfigures/indexes the files you installed into the lib.

For example, if you see errors such as:

~/w/h/build (master) [127]> curse
curse: error while loading shared libraries: libhexer.so.1.1.0: cannot open shared object file: No such file or directory

Or similiarly

~/w/e/build (master)> entwine
entwine: error while loading shared libraries: libentwine.so.2: cannot open shared object file: No such file or directory

Then go and run the magical command.

Typically this is needed when you do sudo make install after compiling some C++ code. I suppose you don’t need the -v verbose flag, because ldconfig - configure dynamic linker run-time bindings.