Template:ParseWDCoords
Appearance
Error: element request '' out of range (1–8)
This template uses the Wikidata property:
String format = 99°[99'[99"]] A 999°[99'[99"]]) and parses it into its 8 constituents
- latitude degrees
- latitude minutes
- latitude seconds
- latitide hemisphere (N or S)
- longitude degrees
- longitude minutes
- longitude seconsd
- longitude hemisphere (E or W)
- Notes
- Even though it was designed for output from wikidata, any character string with the correct format may be parsed. It is assumed that minutes (seconds) occur in pairs - so either both coordinate minutes (seconds) are present or neither is. Although seconds ought not appear without minutes, this rule is immaterial for this routine.
- Output from wikidata contains the actual character string ' rather than literal apostrophe ' or any other symbol for arcminutes
- Output from wikidata contains the actual character string " rather than literal quotes " or any other symbol for arcseconds
- Template is invoked with two unnamed parameters:
|1=number of element to return from list above (1–8)
|2=optional character string – default is {{#property:P625}}
Example: Working on 89°39'48"N, 123°52'1"E gives:
- S1 latd= 89
- S2 latm= 39
- S3 lats= 48
- S4 latNS= N
- S5 longd= 123
- S6 longm= 52
- S7 longs= 1
- S8 longEW= E