Skip to content

Instantly share code, notes, and snippets.

View connormanning's full-sized avatar

Connor Manning connormanning

View GitHub Profile
@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 / 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 / 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 / install.sh
Last active April 1, 2025 00:50
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 [email protected]:hobu/laz-perf.git && cd laz-perf
mkdir build && cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
ninja install
git clone [email protected]:PDAL/PDAL.git pdal && cd pdal
mkdir build && cd build
@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 / go.cpp
Created April 29, 2016 15:36
PDAL getSpatialReference
#include <pdal/PointTable.hpp>
#include <pdal/Reader.hpp>
#include <pdal/StageFactory.hpp>
namespace
{
const std::string path("/Users/connor/data/autzen-full.laz");
pdal::StageFactory factory;
}
@connormanning
connormanning / stream.cpp
Last active April 27, 2016 14:40
ArbiterStream
#include <fstream>
#include <memory>
#include <string>
#include <arbiter/arbiter.hpp>
class ArbiterStream : public std::ofstream
{
public:
ArbiterStream(std::string remotePath, std::ios::openmode mode)
@connormanning
connormanning / inconsistency.cpp
Last active March 21, 2016 19:53
PDAL reader behavior
#include <iostream>
#include <stdexcept>
#include <string>
#include <pdal/BufferReader.hpp>
#include <pdal/Filter.hpp>
#include <pdal/GlobalEnvironment.hpp>
#include <pdal/Options.hpp>
#include <pdal/PointTable.hpp>
#include <pdal/QuickInfo.hpp>
@connormanning
connormanning / log.txt
Created February 16, 2016 19:32
Greyhound log
ç^Cubuntu@ip-10-169-250-114:~$ docker exec -it greyhound-dock greyhound log
Tue Feb 16 2016 19:27:45 GMT+0000 (UTC) LOG controller::read
Active size: 0 Idle size: 128 This query: 1
Read 47208 bytes. Done? 1
Done. NP: 3934
GET /resource/nyc/read?schema=%5B%7B%22name%22%3A%22X%22%2C%22size%22%3A4%2C%22type%22%3A%22floating%22%7D%2C%7B%22name%22%3A%22Y%22%2C%22size%22%3A4%2C%22type%22%3A%22floating%22%7D%2C%7B%22name%22%3A%22Z%22%2C%22size%22%3A4%2C%22type%22%3A%22floating%22%7D%5D&bounds=%5B-8266112.375%2C4943058.453125%2C0%2C-8265128.75%2C4944032.34375%2C968.75%5D&depthBegin=13&depthEnd=14&compress=true&normalize=true 200 21.494 ms - -
Tue Feb 16 2016 19:27:45 GMT+0000 (UTC) LOG controller::read
Active size: 0 Idle size: 128 This query: 1
Read 411060 bytes. Done? 1
Done. NP: 34255
@connormanning
connormanning / no-srs.cpp
Last active October 29, 2015 02:46
No SRS after Reader::prepare
#include <pdal/PointTable.hpp>
#include <pdal/Reader.hpp>
#include <pdal/StageFactory.hpp>
namespace
{
const std::string path("autzen.las");
}
std::unique_ptr<pdal::Reader> makeReader(const std::string f)