Skip to content

Instantly share code, notes, and snippets.

@djanisch
djanisch / osm-laengste-gerade.sql
Created Feb 28, 2021
Berechnung der längsten Gerade im Schienennetz der ÖBB mittels OpenStreetMap Daten
View osm-laengste-gerade.sql
-- alle Zuglinien als Relation abfragen
with recursive get_lines as (
select osm_id, way, row_number() over() as tmp_id from at_osm.planet_osm_line
where route in ('train', 'railway')
),
-- die einzenen Punkte der Relationen ermitteln
dump_points as (
select tmp_id, osm_id, path[1] as path_id, geom from get_lines as a inner join lateral st_dumppoints(way) as b on true
),
-- den Winkel zwischen den einzelnen Punkten berechnen
View keybase.md

Keybase proof

I hereby claim:

  • I am djanisch on github.
  • I am domjisch (https://keybase.io/domjisch) on keybase.
  • I have a public key ASC9XhoA533079SkXuKIm-USu8MnWP4S3Ok1AcZ56TV-fgo

To claim this, I am signing this object: