Skip to content

Commit

Permalink
Fix sign of long/lats
Browse files Browse the repository at this point in the history
  • Loading branch information
Moult authored and yorikvanhavre committed Jan 29, 2020
1 parent 3803406 commit ddc1555
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Mod/Arch/importIFCHelper.py
Expand Up @@ -46,12 +46,13 @@ def dd2dms(dd):

"converts decimal degrees to degrees,minutes,seconds"

sign = 1 if dd >= 0 else -1
dd = abs(dd)
minutes,seconds = divmod(dd*3600,60)
degrees,minutes = divmod(minutes,60)
if dd < 0:
degrees = -degrees
return (int(degrees),int(minutes),int(seconds))
return (int(degrees)*sign,int(minutes)*sign,int(seconds)*sign)


# used in import
Expand Down

0 comments on commit ddc1555

Please sign in to comment.