Skip to content

Instantly share code, notes, and snippets.

@pcace
pcace / gdal-install.sh
Created March 31, 2025 11:11
Install gdal from source on PopOS 22.04
#!/bin/bash
set -e
# Install build dependencies
sudo apt update
sudo apt install -y build-essential cmake wget unzip python3-dev \
libsqlite3-dev sqlite3 libtiff-dev libcurl4-openssl-dev \
libxml2-dev libexpat-dev libxerces-c-dev libpq-dev \
libfontconfig1-dev libcairo2-dev libpython3-dev swig \
python3-pip python3-numpy
@pcace
pcace / README.md
Last active November 20, 2023 09:54 — forked from philippkraft/README.md
Convert xyz elevation models to GeoTiff

Convert .xyz elevation models to GeoTiff

In Germany, more and more state agencies allow free access to high resolution elevation models. However, these are often released as xyz tables, which are not easily used in GIS environments. A standard method to convert this format to raster formats (eg. GeoTiff) is the GDAL function gdal_translate [1, 2]. However, converting 1M lines takes dozens of seconds and is not trivial to parallize.

This gist, using highly optimized Python library Pandas does the conversion on the same computer in less then 1 second.

@pcace
pcace / registry-caprover.json
Created December 20, 2022 14:37 — forked from alexgaribay/registry-caprover.json
Create a hosted docker registry on Caprover
{
"captainVersion": "2",
"documentation": "Based on https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-18-04",
"displayName": "Docker Container Registry",
"dockerCompose": {
"version": "3.3",
"services": {
"$$cap_appname": {
"image": "registry:2",
"containerHttpPort": "5000",
https://brouter.de/brouter-web/#map=9/52.6522/12.8431/osm-mapnik-german_style,HikeBike.HillShading,route-quality&lonlats=13.232315,52.866021;13.458619,52.821023&nogos=13.189204,50.551137,20;12.224128,51.223832,20&polylines=13.567695,52.341914,13.557602,52.350848,13.557559,52.351684,13.568768,52.366746,13.568808,52.366842,13.588786,52.373172,13.588912,52.373167,13.575926,52.358576;8.906007,51.760114,8.905782,51.757794;13.176713,53.247555,13.159909,53.240502,13.158295,53.239254,13.172917,53.212315,13.172224,53.203265,13.151805,53.19931,13.150925,53.199064,13.164885,53.207423,13.165874,53.2078,13.126918,53.219441,13.124126,53.219599,13.11281,53.238031,13.111609,53.240034,13.147062,53.229268,13.150635,53.229808,13.16786,53.249741;13.48664,53.080773,13.48956,53.078247;10.939279,53.210499,10.9361,53.212168;8.951675,51.796207,8.951203,51.796131;8.905782,51.757794,8.952981,51.787039;10.939823,53.211577,10.957115,53.203535,10.958927,53.202591,10.939279,53.210499;10.9361,53.212168,10.891327,53.233849,10.891758,53.23420