Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View aberenyi's full-sized avatar

Attila Berényi aberenyi

View GitHub Profile
@aberenyi
aberenyi / stream.js
Created February 11, 2020 15:44
Stream to a Jitsi room using an RPi and a webcam
// Based on https://code.saghul.net/2017/09/streaming-a-webcam-to-a-jitsi-meet-room/
// extended to work on ARM (RPi)
const puppeteer = require('puppeteer');
// Streams the first webcam in the system to the specified Jitsi Meet room. Audio is currently
// not sent, but it can be easily enabled by disabling the corresponding setting in `meetArgs`.
//
// TODO
// - Detect if we are kicked from the room
@aberenyi
aberenyi / postgis_proj_bug.md
Last active December 8, 2020 09:22
ST_Transform fails when both +geoidgrids and +nadgrids are present

The following works just fine using cs2cs.

$ echo 16.582941335 47.710445103 291.7692| cs2cs -f "%.3f" +init=epsg:4326 +to +proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +nadgrids=etrs2eov_notowgs.gsb +geoidgrids=geoid_eht2014.gtx +units=m +no_defs

However, the same transformation fails in PostGIS.

$ psql -d db -c "SELECT ST_AsEWKT(ST_Transform(ST_GeomFromText('POINT(16.582941335 47.710445103 291.7692)', 4326), '+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +nadgrids=etrs2eov_notowgs.gsb +geoidgrids=geoid_eht2014.gtx +units=m +no_defs'))"