Skip to content

Instantly share code, notes, and snippets.

View Gustry's full-sized avatar
😇

Étienne Trimaille Gustry

😇
View GitHub Profile
-- Open These views with QGIS
-- You can label the ticks view with this expression : "CASE WHEN m % 5 = 0 THEN h END" to get hour numbers
-- Set categorized styles on typ and unit to set different styles for dials, and for the hands
-- Please tweet your best clock designs with #PostGISClock hashtag
create or replace view ticks as
select
m as id
, case when m % 5 = 0 then 'h' else 'm' end as typ
, m % 5 as h
@leplatrem
leplatrem / wmo2geojson.py
Last active December 4, 2023 13:01
Convert list of WMO weather stations to GeoJSON
import csv
import json
def dms2latlng(value):
"""
Degres Minutes Seconds to Decimal degres
"""
degres, minutes, seconds = value.split()
seconds, direction = seconds[:-1], seconds[-1]