Skip to content

Instantly share code, notes, and snippets.

View connormanning's full-sized avatar

Connor Manning connormanning

View GitHub Profile
@connormanning
connormanning / usage.cpp
Last active June 8, 2016 16:25
Vector PointTable for PDAL
#include <iostream>
#include "vector-point-table.hpp"
namespace
{
void print(const pdal::PointRef& pointRef)
{
std::cout <<
pointRef.getFieldAs<double>(pdal::Dimension::Id::X) << ", " <<
pointRef.getFieldAs<double>(pdal::Dimension::Id::Y) << ", " <<
@connormanning
connormanning / install.sh
Last active October 20, 2017 15:07
Installing PDAL/Entwine/Greyhound natively (OS X)
brew tap osgeo/osgeo4mac geos
brew install cmake points2grid gdal libgeotiff libxml2 jsoncpp nitro sqlite laszip xz curl ninja
git clone git@github.com:hobu/laz-perf.git && cd laz-perf
mkdir build && cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
ninja install
git clone git@github.com:PDAL/PDAL.git pdal && cd pdal
mkdir build && cd build
@connormanning
connormanning / log.txt
Created October 12, 2016 20:51
PDAL demangled stack trace output
$ pdal info file.laz -v 6
(pdal info readers.las Error: 0): Got error 11
(pdal info readers.las Debug: 3): 0 pdal main::$_0::__invoke(int) + 175
(pdal info readers.las Debug: 3): 1 libsystem_platform.dylib _sigtramp + 26
(pdal info readers.las Debug: 3): 2 ??? 0x00007fff684d2552 0x0 + 140734943274322
(pdal info readers.las Debug: 3): 3 libpdalcpp.3.dylib pdal::LasReader::processOne(pdal::PointRef&) + 146
(pdal info readers.las Debug: 3): 4 libpdalcpp.3.dylib pdal::LasReader::read(std::__1::shared_ptr<pdal::PointView>, unsigned long long) + 585
(pdal info readers.las Debug: 3): 5 libpdalcpp.3.dylib pdal::Reader::run(std::__1::shared_ptr<pdal::PointView>) + 192
(pdal info readers.las Debug: 3): 6 libpdalcpp.3.dylib pdal::StageRunner::run() + 69
(pdal info readers.las Debug: 3): 7 libpdalcpp.3.dylib pdal::Stage::execute(pdal::BasePointTable
@connormanning
connormanning / dir-tree.txt
Last active October 25, 2016 20:31
Globbing behavior sample
$ tree ~/a
/Users/connor/a
├── a.rst
├── a.txt
├── b
│   ├── b.rst
│   └── b.txt
└── c
├── c.rst
├── c.txt
@connormanning
connormanning / pipeline.json
Last active December 1, 2016 19:31
Tagless
{
"pipeline":
[
{
"filename": "3AU-15.las",
"type": "readers.las"
},
{
"limits": "Classification[1:2]",
"type": "filters.range"
@connormanning
connormanning / point-cloud-bounds.js
Created December 6, 2016 16:58
Greyhound bounds scale/offset
var PointCloudBounds = function(serverInfo) {
var bounds = serverInfo.bounds;
var preScale = serverInfo.scale || [1, 1, 1];
var preOffset = serverInfo.offset || [0, 0, 0];
console.log('From:', serverInfo);
if (!preScale.length) preScale = [preScale, preScale, preScale];
bounds = bounds.map((v, i) => v * preScale[i % 3] + preOffset[i % 3]);
@connormanning
connormanning / infer.sh
Created April 7, 2017 15:42
Infer bexar
$ time ./kernel/entwine infer "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998104c.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998104d.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998113a.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998113b.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998113c.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998113d.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998114a.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998114b.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998114c.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998114d.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998123a.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50c
$ time docker run -it connormanning/entwine infer "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998104c.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998104d.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998113a.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998113b.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998113c.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998113d.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998114a.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998114b.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998114c.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998114d.laz" "https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998123a.laz" "https://storage.googleapis.com/stratmap10_50cm_be
$ time docker run -it --rm connormanning/entwine infer https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998104c.laz -v
Curl config:
timeout: 5s
followRedirect: true
verifyPeer: true
caBundle: (default)
caInfo: (default)
Inferring from: https://storage.googleapis.com/stratmap10_50cm_bexar/stratmap10-50cm_2998104c.laz
Temp path: tmp
Threads: 4
@connormanning
connormanning / move-docker-image-location.md
Created April 12, 2017 20:50
Move docker image location
  1. Create config directory and create a config file
sudo mkdir /etc/systemd/system/docker.service.d/
sudo nano /etc/systemd/system/docker.service.d/custom.conf

Contents of that file should be:

[Service]
ExecStart=