web / lib/services/import/coordinate-parser
lib/services/import/coordinate-parser
Provides utility functions for parsing geographic coordinates from various string formats.
This module contains a set of helper functions designed to interpret different representations of coordinate data that might be found in imported files. It supports common formats such as:
- Decimal Degrees (e.g., "40.7128")
- Degrees Minutes Seconds (DMS) (e.g., "40°26'46"N")
- Coordinates with a directional suffix (e.g., "40.7128 N")
The main export, parseCoordinate
, attempts to parse a value using these different strategies,
returning a standardized decimal degree number if successful.