CodeToolProCodeToolPro
GitHub

Coordinates Converter

Decimal Degrees (DD)

  • Latitude
    Longitude

    Degrees Minutes Seconds (DMS)

  • Latitude
    Longitude

    技术详情

    坐标转换器的工作原理

    工具功能

    坐标转换器在十进制度(DD,Decimal Degrees)和度分秒(DMS,Degrees Minutes Seconds)两种地理坐标格式之间双向转换。支持纬度和经度的独立输入与转换:在 DD 区域输入经纬度时自动转换为 DMS 格式并标注方向(N/S/E/W),在 DMS 区域输入度分秒值时自动转换为 DD 格式。转换精度高达6位小数(约0.11米的精度)。


    常见开发者使用场景

    坐标格式转换在地理信息系统(GIS)和地图应用开发中非常重要。Google Maps API、Mapbox、Leaflet 等现代地图库使用十进制度(DD)格式;而航空、航海和传统测绘领域常用度分秒(DMS)格式。GPS 设备可能输出任一格式的数据。地理数据转换、边界计算、距离测量等场景都需要在不同坐标格式间切换。

    坐标数据可以配合 单位转换器 进行距离单位换算(如海里到公里),或配合 日期时间转换器 处理带有时间戳的 GPS 轨迹数据。


    DD 与 DMS 格式详解

    十进制度(DD)格式使用单个浮点数表示位置:纬度范围 -90 到 +90(正值表示北纬),经度范围 -180 到 +180(正值表示东经)。例如 40.7128° N, -74.0060° W。

    度分秒(DMS)格式将度的小数部分进一步分解为分(1度=60分)和秒(1分=60秒):格式为 40° 42' 46.08" N。纬度方向标识为 N(北)或 S(南),经度方向标识为 E(东)或 W(西)。转换公式为:DD = 度 + 分/60 + 秒/3600,符号由方向决定。


    常见陷阱与注意事项

    • 方向符号:DD 格式用正负号表示方向(负号表示南/西),DMS 格式用字母 N/S/E/W。转换时需正确处理正负号与方向字母的对应关系。
    • DMS 格式:DMS 输入需要包含度、分、秒符号(如 40°42'46"N),工具支持常见的变体(空格分隔、使用 d/m/s 缩写等)。
    • 精度损失:DD 和 DMS 之间的转换可能因浮点精度引入微小误差。工具取整到6位小数,在实际应用中足够精确。
    • 输入范围:纬度需在 ±90°内,经度需在 ±180°内。超出范围的输入不会产生有效结果。

    何时使用此工具而非代码

    在需要快速转换个别坐标值、验证 GPS 数据格式、或理解不同坐标表示之间的对应关系时使用此工具。对于需要批量处理大量 GPS 数据点的场景,应使用 GIS 软件(如 QGIS)或编程库(如 Python 的 pyproj、JavaScript 的 proj4js),它们支持基准面转换和投影变换等高级地理处理功能。

    How to Use Coordinates Converter

    1. 1Paste or type your input data into the input field
    2. 2Configure any conversion options if available
    3. 3Click the Convert button to see the transformed output instantly
    4. 4Copy the result or download it as a file

    Frequently Asked Questions

    • What formats are supported?

      This converter supports bidirectional conversion between popular data formats. Simply paste your input and get instant output — no software installation needed.

    • Is Coordinates Converter free?

      Yes, 100% free. No registration, no credit card required. All tools are freely available for developers worldwide.

    • Does this tool upload my data to any server?

      No. All processing runs locally in your browser using client-side JavaScript. Your input data, code, or files never leave your device. We do not store, log, or transmit any user data.