PDAL Voxel Center Nearest Neighbor

https://pdal.io/stages/filters.voxelcenternearestneighbor.html#filters-voxelcenternearestneighbor

The VoxelCenterNearestNeighbor filter is a voxel-based sampling filter. The input point cloud is divided into 3D voxels at the given cell size. For each populated voxel, the coordinates of the voxel center are used as the query point in a 3D nearest neighbor search. The nearest neighbor is then added to the output point cloud, along with any existing dimensions.

Notice the red dots are much more sparse than the gray intensity dots. Red dots are separated 1.0 meters and gray are 0.1 meters.

To generate this I did converted with PDAL and then used Potree to visualize.

pdal pipeline $HOME/voxcnn-1.0.json 

voxcnn-1.0.json
[
"801403-802580-2493384-2494335.laz",
{
"type":"filters.voxelcenternearestneighbor",
"cell":1.0
},
"801403-802580-2493384-2494335-voxelcenternearestneighbor-1.0.laz"
]

-rw-rw-r-- 1 jsun jsun 65M Apr 11 21:01 801403-802580-2493384-2494335-voxelcenternearestneighbor.laz
-rw-rw-r-- 1 jsun jsun 8.1M Apr 11 21:04 801403-802580-2493384-2494335-voxelcenternearestneighbor-1.0.laz

Airbnb Occupancy Tax Turbotax

Airbnb already pays occupancy taxes for you so you can deduct them as a rent expense.

https://ttlc.intuit.com/questions/4567464-i-run-an-airbnb-in-maine-and-they-send-occupancy-taxes-to-the-state-how-do-i-show-my-airbnb-income-as-exempt-since-the-tax-has-already-been-paid

I run an Airbnb in Maine and they send occupancy taxes to the state. How do I show my Airbnb income as exempt since the tax has already been paid?

Asked by jlouisecarl
TurboTax Premier
 2 months ago


Occupancy taxes for your Airbnb are a completely separate tax from your income tax that you are filing. Having paid the occupancy tax through Airbnb does not make your income exempt from income tax.  All of the rent collected must still be reported as income.  However, you will be able to claim a rental expense for the occupancy tax that has been paid on your behalf since it was taken out of your rental income.

TurboTaxAnnetteB , EA
 TurboTax TaxPro  2 months ago


Dual Networks Profiles Ubuntu 18.04

The setup

I have 2 network adapters, a 10G and a 1G network. In order to connect to both networks, you must have two profiles.

Two profiles: 10G and 1G profile, across 2 adapters.

If you have a single profile, then changing settings for one network adapter will also affect the other. In Ubuntu’s Network UI, this is non-obvious.

Once setup correctly, you can verify by being able to ping both networks.

jsun@computer ~ [1]> ping 192.168.1.200
PING 192.168.1.200 (192.168.1.200) 56(84) bytes of data.
64 bytes from 192.168.1.200: icmp_seq=1 ttl=128 time=0.338 ms
64 bytes from 192.168.1.200: icmp_seq=2 ttl=128 time=0.172 ms
^C
--- 192.168.1.200 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1028ms
rtt min/avg/max/mdev = 0.172/0.255/0.338/0.083 ms

jsun@computer ~> ping 10.10.50.1
PING 10.10.50.1 (10.10.50.1) 56(84) bytes of data.
64 bytes from 10.10.50.1: icmp_seq=1 ttl=64 time=0.585 ms
64 bytes from 10.10.50.1: icmp_seq=2 ttl=64 time=0.226 ms
^C
--- 10.10.50.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1022ms
rtt min/avg/max/mdev = 0.226/0.405/0.585/0.180 ms

Space Filling Curves vs. Octree

Octree

An octree is a tree data structure in which each internal node has exactly eight children. Octrees are most often used to partition a three-dimensional space by recursively subdividing it into eight octants. Octrees are the three-dimensional analog of quadtrees.

We humans mostly deal with low dimensional data, so we give this type of structure some names:

  • 1-D data: binary tree
  • 2-D data: quadtree
  • 3-D data: octree
  • K-D data: k-d tree, or k-dimensional tree, is a data structure used in computer science for organizing some number of points in a space with k dimensions.

These are all tree-like data structures, which are very useful for range and nearest neighbor searches.

Octree example

Space Filling Curves

Space filling curves refers to a class of functions that k dimensional data to 1 dimension.

Meaning a class of functions that can map k-dimensional data into a single number n

f(n_1, n_2, …, n_k) -> n

The caveat is there is a restriction on the number it maps, i.e. n_1, as space filling curves are a fractal functions, it cannot be extended to the reals, but rather to the binary fractions (a subset of the rationals). This lets you get arbitrarily close to any number you want (and cover all the IEEE floating points).

Class of functions means that there are many functions that can be considered a space filling curve. Common to use Hibert and Z-order.

Visualization of a 3D space filling curve may look like with a Hilbert curve function.

Compare and contrast

There are certain optimal use cases for each of these.

  • Trees have the benefit being able to limit the depth of your queries, which makes it especially useful in computer graphics so you can stop querying for points that you don’t need.
  • Space filling curves have the benefit of modify data faster, because the location to store that data can be calculated. Because trees have the cost of potentially rebalancing subtrees and creating/updating/deleting.

Other structures?

There are some variants on structures for storing multi-dimensional data.

R-Tree

It’s yet another type of tree.

Visualization of an R*-tree for 3D points using ELKI.Hilbert R-Tree is a variant on the R-Tree to achieve better performance.

Data Stores

I won’t go in too much detail because this is out of scope, but in programming there are databases and data stores which can handle large amount of high dimensional data.

First, a distinction. A database can handle complex queries. A data store can be dumber, simple storage format and won’t handle things like transaction for you.

An analogy could be like “database is like an accountant, who you can ask for certain data and operations, such as ‘give me all last year’s data for people with last names in T'”, whereas “data store is like a library and you have to go find and collect that data yourself, but it’s stored in an organized fashion”.