Skip to content

Instantly share code, notes, and snippets.

@tobwen
tobwen / Dockerfile
Last active November 4, 2023 06:56
PostGIS Debian OCI
# commits to be built
ARG CGAL55_GIT_COMMIT=tags/v5.6 # https://github.com/CGAL/cgal/tags
ARG SFCGAL_GIT_COMMIT=tags/v1.5.0 # https://github.com/Oslandia/SFCGAL_CI/tags
ARG PROJ_GIT_COMMIT=tags/9.3.0 # https://github.com/OSGeo/PROJ/tags
ARG GEOS_GIT_COMMIT=tags/3.12.0 # https://github.com/libgeos/geos/tags
ARG GDAL_GIT_COMMIT=tags/v3.7.3 # https://github.com/OSGeo/gdal/tags
ARG POSTGIS_GIT_COMMIT=tags/3.4.0 # https://github.com/postgis/postgis/tags
# base container with build-dependencies
FROM docker://postgres:16-bookworm AS build-deps
@tobwen
tobwen / mindeps.py
Last active April 8, 2023 08:39 — forked from huitseeker/mindeps.py
Minimizes a list of debian packages by removing those implied as dependencies of the others
#!/usr/bin/env python3
#######################################################################
# This program is free software; you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation; either version 2 of the #
# License, or (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of #
@tobwen
tobwen / example-maplibre-gl-leaflet-html
Created November 8, 2022 00:06
basemap.de Web Vektor - MapLibre GL Leaflet Demo
<!DOCTYPE html>
<html>
<head>
<title>basemap.de Web Vektor - Leaflet Demo</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.8.0/dist/leaflet.css" />
<style>
body {
margin: 0;
padding: 0;
@tobwen
tobwen / INSPIRE Verwaltungseinheiten DE.md
Last active July 14, 2022 22:15
INSPIRE Verwaltungseinheiten DE

WFS-Download

dl_wfs_1() {
    curl --insecure --location --remote-time --create-dirs --get \
    --url "$1" \
    --data "service=WFS" \
    --data "request=GetFeature" \
    --data "version=1.1.0" \
 --data "resultType=results" \
@tobwen
tobwen / gdal-raster.md
Last active January 21, 2022 13:06
`.geoTransform` is off in different raster formats

version

GDAL 3.4.1, released 2021/12/27

get source cache (mbtile)

curl -kJLOR "https://daten.gdz.bkg.bund.de/produkte/topplus_open/TopPlusOpen/aktuell/mercator/9.mbtile"
cp 9.mbtile 9.mbtiles

create extracts

@tobwen
tobwen / nw_3035.md
Last active May 23, 2020 09:29
Variants to generate an INSPIRE-compliant grid in EPSG:3035 for Germany's federal state Northrhine-Westfalia in PostGIS
@tobwen
tobwen / wronxit.geojson
Created October 29, 2019 18:27
NEVER `buffer with 0`
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tobwen
tobwen / install_podman.sh
Last active April 1, 2019 01:52
HOWTO: install podman and dependencies rootless
#!/usr/bin/env bash
# for Debian 9: apt install -t stretch-backports uidmap [others will follow soon]
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH"
[ -d "$GOPATH" ] || mkdir -p "$GOPATH"
buildah_src="containers/buildah"
catatonit_src="openSUSE/catatonit"
cni_src="containernetworking/plugins"
@tobwen
tobwen / gist:c1fc1512458ce272aee2410e36cf1e21
Created March 7, 2019 19:30
HOWTO: backport fuse3 for Debian Stretch
# backport libfuse3 from Debian 10
apt install -t stretch-backports equivs meson mk-build-deps
mkdir "$HOME/build/libfuse3/" && cd "$HOME/build/libfuse3/"
(
dget -x http://deb.debian.org/debian/pool/main/f/fuse3/fuse3_3.4.1-1.dsc; \
cd fuse3-3.4.1; \
mk-build-deps --install --remove --tool "apt -o Debug::pkgProblemResolver=yes --no-install-recommends -t stretch-backports" --root-cmd "sudo"; \
sudo dpkg --remove fuse3-build-deps; \
dch --local ~bpo9+ --distribution stretch-backports "Rebuild for stretch-backports (local only)."; \
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -j4; \
@tobwen
tobwen / qgis-logo_fixed_straight_flat.svg
Last active March 31, 2017 01:50
fixed QGIS logo (straight gradients, flat design)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.