Convert DMS to GeoPoint(将DMS转换为GeoPoint)¶
Supported in: Batch, Streaming
Converts a geospatial coordinate string in degrees, minutes, seconds (DMS) format to a GeoPoint in accordance to user-provided formats. The default formats are DDD*°MM*'SS*"H and DDD*MMSSssH. The formats are run in order, and the first matching format will be returned. See formatting guide on how to write user-generated formats.
Expression categories: Geospatial
Declared arguments¶
- Coordinates: DMS coordinates to convert to a GeoPoint.
Expression\ - optional Formats: Formats default to
DDD*°MM*'SS*"HandDDD*MMSSssH.
List\>
Output type: GeoPoint
Examples¶
Example 1: Base case¶
Argument values:
- Coordinates:
coordinates - Formats: null
| coordinates | Output |
|---|---|
| 078261594N075220923E | { latitude: 78.43776111111112, longitude: 75.36923055555555, } |
| 046115095S069524119W | { latitude: -46.19748611111111, longitude: -69.87810833333333, } |
| 023°45'55"N 069°52'11"W | { latitude: 23.76527777777777, longitude: -69.86972222222222, } |
| -123°55'55"N 069°53'00"W | { latitude: -123.93194444444445, longitude: -69.88333333333334, } |
| 123456789N23456789E | { latitude: 123.76885833333333, longitude: 23.768858333333334, } |
Example 2: Base case¶
Argument values:
- Coordinates:
coordinates - Formats: [H[orth][est][ast][outh] DDD*
degrees,MM*minutes, andSS*.sss*seconds]
| coordinates | Output |
|---|---|
| North 75 degrees, 3 minutes, and 0.33 seconds; East 123 degrees, 22 minutes, and 17.2 seconds | { latitude: 75.05009166666666, longitude: 123.37144444444444, } |
| South 75 degrees, 3 minutes, and 0.33 seconds; West 123 degrees, 22 minutes, and 17.2 seconds | { latitude: -75.05009166666666, longitude: -123.37144444444444, } |
Example 3: Base case¶
Argument values:
- Coordinates:
coordinates - Formats: null
| coordinates | Output |
|---|---|
| hSllo, World! | null |
| 02345N123456789E | null |
| 023456784R123456789E | null |
| 023456784N123456789 | null |
| 023456784R123456789 | null |
| 078261594N075220923E075220923N | null |
| 078261594N | null |
| 23°°45'55"N 069°52'11"W | null |
| 23° 45' 55"N 069° 52' 11"W | null |
| 23°55"N 069°52'11"W | null |
| 23°452233'55"N 069°52'11"W | null |
Example 4: Base case¶
Argument values:
- Coordinates:
coordinates - Formats: [DDD
``minutes:``MM``seconds:``SS]
| coordinates | Output |
|---|---|
degrees: 123 minutes: 45 seconds: 67, degrees: 087 minutes: 54 seconds: 32 |
{ latitude: 123.76861111111111, longitude: 87.9088888888889, } |
Example 5: Edge case¶
Argument values:
- Coordinates:
coordinates - Formats: [SSSSSSSSS*.sssssss*H]
| coordinates | Output |
|---|---|
| 123452.4222N 98544.333E | { latitude: 34.2923395, longitude: 27.373425833333332, } |
Example 6: Edge case¶
Argument values:
- Coordinates:
coordinates - Formats: [DDD*:MM:SSsss*H]
| coordinates | Output |
|---|---|
| 123:45:24222N 98:54:4333E | { latitude: 123.75672833333333, longitude: 98.91203611111112, } |
| 078261594N075220923E | null |
| -123°55'55"N 069°53'00"W | null |
中文翻译¶
将DMS转换为GeoPoint¶
支持:批处理(Batch)、流处理(Streaming)
将度分秒(DMS)格式的地理空间坐标字符串根据用户提供的格式转换为GeoPoint。默认格式为DDD*°MM*'SS*"H和DDD*MMSSssH。这些格式按顺序执行,将返回第一个匹配的格式。关于如何编写用户自定义格式,请参阅格式指南。
表达式类别: 地理空间(Geospatial)
声明的参数¶
- 坐标(Coordinates): 要转换为GeoPoint的DMS坐标。
表达式\ - 可选 格式(Formats): 默认格式为
DDD*°MM*'SS*"H和DDD*MMSSssH。
列表\<字面量\>
输出类型: GeoPoint
示例¶
示例1:基本情况¶
参数值:
- 坐标:
coordinates - 格式: null
| coordinates | 输出 |
|---|---|
| 078261594N075220923E | { latitude: 78.43776111111112, longitude: 75.36923055555555, } |
| 046115095S069524119W | { latitude: -46.19748611111111, longitude: -69.87810833333333, } |
| 023°45'55"N 069°52'11"W | { latitude: 23.76527777777777, longitude: -69.86972222222222, } |
| -123°55'55"N 069°53'00"W | { latitude: -123.93194444444445, longitude: -69.88333333333334, } |
| 123456789N23456789E | { latitude: 123.76885833333333, longitude: 23.768858333333334, } |
示例2:基本情况¶
参数值:
- 坐标:
coordinates - 格式: [H[orth][est][ast][outh] DDD*
degrees,MM*minutes, andSS*.sss*seconds]
| coordinates | 输出 |
|---|---|
| North 75 degrees, 3 minutes, and 0.33 seconds; East 123 degrees, 22 minutes, and 17.2 seconds | { latitude: 75.05009166666666, longitude: 123.37144444444444, } |
| South 75 degrees, 3 minutes, and 0.33 seconds; West 123 degrees, 22 minutes, and 17.2 seconds | { latitude: -75.05009166666666, longitude: -123.37144444444444, } |
示例3:基本情况¶
参数值:
- 坐标:
coordinates - 格式: null
| coordinates | 输出 |
|---|---|
| hSllo, World! | null |
| 02345N123456789E | null |
| 023456784R123456789E | null |
| 023456784N123456789 | null |
| 023456784R123456789 | null |
| 078261594N075220923E075220923N | null |
| 078261594N | null |
| 23°°45'55"N 069°52'11"W | null |
| 23° 45' 55"N 069° 52' 11"W | null |
| 23°55"N 069°52'11"W | null |
| 23°452233'55"N 069°52'11"W | null |
示例4:基本情况¶
参数值:
- 坐标:
coordinates - 格式: [DDD
``minutes:``MM``seconds:``SS]
| coordinates | 输出 |
|---|---|
degrees: 123 minutes: 45 seconds: 67, degrees: 087 minutes: 54 seconds: 32 |
{ latitude: 123.76861111111111, longitude: 87.9088888888889, } |
示例5:边界情况¶
参数值:
- 坐标:
coordinates - 格式: [SSSSSSSSS*.sssssss*H]
| coordinates | 输出 |
|---|---|
| 123452.4222N 98544.333E | { latitude: 34.2923395, longitude: 27.373425833333332, } |
示例6:边界情况¶
参数值:
- 坐标:
coordinates - 格式: [DDD*:MM:SSsss*H]
| coordinates | 输出 |
|---|---|
| 123:45:24222N 98:54:4333E | { latitude: 123.75672833333333, longitude: 98.91203611111112, } |
| 078261594N075220923E | null |
| -123°55'55"N 069°53'00"W | null |