Skip to content

Instantly share code, notes, and snippets.

View flippmoke's full-sized avatar

Blake Thompson flippmoke

  • Mapbox
  • Oklahoma
View GitHub Profile
@flippmoke
flippmoke / gist:16cd26a0247422f25840
Created November 28, 2014 18:11
Improved CPLCreateOrAcquireMutex
#ifndef CPL_MULTIPROC_PTHREAD
#ifndef MUTEX_NONE
static void *hCOAMutex = NULL;
#endif
int CPLCreateOrAcquireMutex( void **phMutex, double dfWaitInSeconds )
{
int bSuccess = FALSE;
#ifndef MUTEX_NONE
@flippmoke
flippmoke / index.js
Created August 10, 2018 16:26
LiDAR fun
"use strict";
const vtpbf = require('vt-pbf');
const fs = require('fs');
const geojsonVt = require('geojson-vt');
const SphericalMercator = require('@mapbox/sphericalmercator');
const util = require('util');
const cp = require('child_process');
const PromisePool = require('es6-promise-pool')
@flippmoke
flippmoke / MVT.cpp
Created September 19, 2013 20:48
Mapnik vector tile python wrappings
#include "vector_tile_datasource.hpp"
#include "vector_tile_compression.hpp"
#include "vector_tile_projection.hpp"
#include <stdio.h>
#include <mapnik/box2d.hpp>
#include <mapnik/layer.hpp>
#include <mapnik/map.hpp>
@flippmoke
flippmoke / gist:14b9bd332f019e91158b
Created December 5, 2014 21:40
TIFF Compression Types
#define COMPRESSION_NONE 1 /* dump mode */
#define COMPRESSION_CCITTRLE 2 /* CCITT modified Huffman RLE */
#define COMPRESSION_CCITTFAX3 3 /* CCITT Group 3 fax encoding */
#define COMPRESSION_CCITT_T4 3 /* CCITT T.4 (TIFF 6 name) */
#define COMPRESSION_CCITTFAX4 4 /* CCITT Group 4 fax encoding */
#define COMPRESSION_CCITT_T6 4 /* CCITT T.6 (TIFF 6 name) */
#define COMPRESSION_LZW 5 /* Lempel-Ziv & Welch */
#define COMPRESSION_OJPEG 6 /* !6.0 JPEG */
#define COMPRESSION_JPEG 7 /* %JPEG DCT compression */
#define COMPRESSION_T85 9 /* !TIFF/FX T.85 JBIG compression */