This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import json | |
def dms2latlng(value): | |
""" | |
Degres Minutes Seconds to Decimal degres | |
""" | |
degres, minutes, seconds = value.split() | |
seconds, direction = seconds[:-1], seconds[-1] |