(value, reference)
| 20453 | return str(v) |
| 20454 | |
| 20455 | def _to_decimal_degrees(value, reference): |
| 20456 | try: |
| 20457 | vals = value.values if hasattr(value, "values") else value |
| 20458 | if not isinstance(vals, (tuple, list)) or len(vals) != 3: |
| 20459 | return None |
| 20460 | d = float(vals[0].num) / float(vals[0].den) |
| 20461 | m = float(vals[1].num) / float(vals[1].den) |
| 20462 | s = float(vals[2].num) / float(vals[2].den) |
| 20463 | result = d + (m / 60.0) + (s / 3600.0) |
| 20464 | if str(reference).upper() in ["S", "W"]: |
| 20465 | result *= -1 |
| 20466 | return result |
| 20467 | except Exception: |
| 20468 | return None |
| 20469 | |
| 20470 | try: |
| 20471 | import exifread |
no outgoing calls
no test coverage detected