File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,7 +221,8 @@ def parse_location_coordinate(string, type)
221221 # 1. Degrees
222222 # 2. Minutes
223223 # 3. Seconds
224- sg_coord = /(#{ num } ) *°(?: *(#{ num } ) *['′](?: *(#{ num } ) *(?:"|″|''|′′))?)?/
224+ sg_coord =
225+ /(#{ num } ) *°(?: *(#{ num } ) *['′](?: *(#{ num } ) *(?:"|″|''|′′))?)?/
225226 # A generic coordinate (complete), captures:
226227 # 1. Sign (plus, minus, or nil)
227228 # 2. The numeric part of the coordinate (decimal or sexagesimal)
@@ -263,7 +264,8 @@ def location_coordinate_to_string(float, type)
263264 min = ( base * 60 ) . floor
264265 y += ' %i′' % min
265266 base -= min . to_f / 60
266- y += ' %.2g″' % ( base * 60 * 60 ) . round ( 2 ) unless base . zero?
267+ sec = ( base * 60 * 60 ) . round ( 2 )
268+ y += ' %.2g″' % sec unless sec . zero?
267269 end
268270 y + ' ' + dir
269271 end
You can’t perform that action at this time.
0 commit comments