As the web advertisers says, β€œKnow the Sneaky Signs of Schizophrenia” 🧠

I made the tragic mistake of clicking on an article about the next generation of Schizophrenia drugs designed to help people with serious mental illness overcome their delusions and paranoia without many of the traditional side-effects of Schizophrenia drugs – namely the withdrawal from daily life and uncontrolled body movements.

Now I’m being followed around the internet with ads with creepy faces on toasters and refrigerators saying, β€œKnow the Sneaky Signs of Schizophrenia”. The rather colorful and cute ads remind me of a psychedelic album cover from the late 1960s.  You know the kind of artwork you might enjoy when you are pretty darn stoned and looking for something to be tuned into.

The irony of it all is such targeted advertising is not only creepy and plays in one’s own paranoia, it actually is in many ways a realization of the modern suburbanite’s home, full of internet connected appliances, constantly beaming information over the internet, some that you consent to and find useful but much of which can be used for nefarious or even surveillance purposes by hackers or government agents if they actually found you to be of something of interest.

I don’t have Internet at home but I have been to plenty of homes where people have Amazon Echos and β€œsmart” televisions and refrigerators with large displays that smile at you and try to be friendly in appearance, even if they are data collecting machines, mostly for innocent purposes like telling you when your toast is done on your cellphone, that and selling your data and marketing to you. I mean, the schizophrenic aren’t exactly wrong about where America is going these days in your typical suburban home.

Creating Digital Surface Models GeoTIFF Using National Map Downloader, LiDAR Point Clouds and PDAL πŸ—Ί

Creating Digital Surface Models GeoTIFF Using National Map Downloader, LiDAR Point Clouds and PDAL πŸ—Ί

Find LiDAR Point Clouds on the National Map Downloader: https://apps.nationalmap.gov/downloader/#/

Select Find Elevation Source Data (3DEP) – Lidar, IfSAR

Search for LiDAR Point Cloud (LPC)

Click Export all results as a TXT file and save to a directory.

Then run this Unix command on the text file to download point clouds:

1cat data.txt | tr -d '\n' | xargs -d '\r' -I {} wget -c -nc '{}'

Next create a pipeline.txt for pdal with the classification (For DSM, 1 are unclassified points like buildings and treetops, while 2 are ground points, if you want a DEM, you can also make them this way too with Classification of 2:2):

01{
02    "pipeline": [
03        {
04            "type": "readers.las"
05        },
06        {
07            "type": "filters.range",
08            "limits": "Classification[1:1]"
09        },
10        {
11            "gdaldriver":"GTiff",
12            "resolution": 1.0,
13            "output_type": "max",
14            "type":"writers.gdal"
15        }
16    ]
17}

Next convert the point clouds into digital surface model (GeoTIFF), you can use this shell command with xargs to go over each LAS file, using the above pipeline:

1ls *.laz | xargs -I {} basename {} .laz | xargs -P3 -I {} pdal pipeline pipeline.txt --readers.las.filename={}.laz --writers.gdal.filename={}.tif

The above command can be somewhat slow depending on how many LAZ point clouds you need to go through and your selected resolution. -P3 sets the number of parallel process (3) which can help speed things up a bit.

Now we have the digital surface models raster that can be used in QGIS for hillshade for 3D.

Build a virtual raster (dsm.vrt) for easy loading into QGIS rather than loading separate files.

1gdalbuildvrt dsm.vrt *.tif