Skip to content

Instantly share code, notes, and snippets.

@1papaya
1papaya / gdal_ecw.sh
Last active June 13, 2024 18:04
Install GDAL 2.3 with ECW support on Ubuntu 18.04
#!/bin/bash
##
## Tested on: Ubuntu 18.04 & ECW 5.4 & GDAL 2.3.1
##
## Download the ERDAS ECW JP2 SDK v5.4 Linux
## https://download.hexagongeospatial.com/downloads/ecw/erdas-ecw-jp2-sdk-v5-4-linux
## Download GDAL v2.3 Source (ex. 2.3.1)
@andrewharvey
andrewharvey / 34M_17.bin
Last active April 21, 2020 09:15
Add 3D model to a Mapbox GL JS map
This file has been truncated, but you can view the full file.
@victorzinho
victorzinho / create-labels.js
Last active August 20, 2017 17:21
Create Github labels from a JSON file
const https = require('https');
const fs = require('fs');
const LABELS_FILE = 'labels.json';
if (!fs.existsSync(LABELS_FILE)) {
console.log(LABELS_FILE + ' does not exist!');
return 1;
} else if (process.argv.length !== 5) {
console.log('Usage:' + process.argv[0] + ' ' + process.argv[1] + ' <owner> <repo> <token>');
return 2;
"""Calculate building floors from the Spanish Cadastre GIS files (SHP).
Once logged, data can be downloaded from https://www.sedecatastro.gob.es/
and the data specification is at
http://www.catastro.minhap.gob.es/ayuda/manual_descriptivo_shapefile.pdf
This python script is to be used in the QGIS 2.x field calculator.
The "CONSTRU" field stores volumetric data and other attributes in the form
of a structured text code. Floor numbers are in roman numerals.
As for example, "-II+IV+TZA" is a building part with two underground floors,
@fvanderbiest
fvanderbiest / monit
Last active August 30, 2017 15:15
monit georchestra
# /etc/default/monit
# You must set this variable to yes for monit to start
START=yes
# Options to pass to monit
#MONIT_OPTS=
@hrwgc
hrwgc / postgresql_quantiles.md
Last active May 31, 2018 13:36
Calculate quantile distributions for PostgreSQL column
SELECT
ntile,
CAST(avg(length) AS INTEGER) AS avgAmount,
CAST(max(length) AS INTEGER)  AS maxAmount,
CAST(min(length) AS INTEGER)  AS minAmount 
FROM (SELECT length, ntile(6) OVER (ORDER BY length) AS ntile FROM countries) x
GROUP BY ntile
ORDER BY ntile;