Skip to content

Commit 900f59d

Browse files
author
Vectura Games Maps
committed
Revise conversion from cardinal to degrees for pois direction property
1 parent 0b00eb1 commit 900f59d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

vectordatasource/transform.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,12 @@ def _to_int_degrees(x):
129129
# trim whitespace to simplify further matching
130130
x = x.strip()
131131

132-
cardinals = { 'N' : 0, 'NNE' : 22, 'NE' : 45, 'ENE' : 67,
133-
'E' : 90, 'ESE' : 112, 'SE' : 135, 'SSE' : 157,
134-
'S' : 180, 'SSW' : 202, 'SW' : 225, 'WSW' : 247,
135-
'W' : 270, 'WNW' : 292, 'NW' : 315, 'NNW' : 337 }
132+
cardinals = {
133+
'north' : 0 , 'N' : 0 , 'NNE' : 22 , 'NE' : 45 , 'ENE' : 67 ,
134+
'east' : 90 , 'E' : 90 , 'ESE' : 112, 'SE' : 135, 'SSE' : 157,
135+
'south' : 180, 'S' : 180, 'SSW' : 202, 'SW' : 225, 'WSW' : 247,
136+
'west' : 270, 'W' : 270, 'WNW' : 292, 'NW' : 315, 'NNW' : 337
137+
}
136138

137139
return cardinals[x]
138140

0 commit comments

Comments
 (0)