Wikipedia talk:WikiProject Geographical coordinates/geolinks replacement

From Wikipedia, the free encyclopedia

[edit] Regular expressions for use in geolinks replacement

Template Usage Find Replace
Geolinks-Asia-cityscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:city_region:|display=title}}
Geolinks-AU-streetscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:AU|display=inline,title}}
Geolinks-buildingscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark|display=inline,title}}
Geolinks-Canada-cityscale uses {{t|([-\d.]+)|([-\d.]+)|([^\}]*) {{coord|\1|\2|\3_region:CA|display=inline,title}}
Geolinks-CanadaMore-cityscale uses unused
Geolinks-Canada-region uses unused
Geolinks-Canada-streetscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:CA|display=inline,title}}
Geolinks-Canada-townscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:CA|display=inline,title}}
Geolinks-cityscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:city|display=inline,title}}
Geolinks-cityscale-no-title uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:city}}
Geolinks-Europe-buildingscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark|display=inline,title}}
Geolinks-Europe-cityscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:city|display=inline,title}}
Geolinks-Europe-mountain uses unused
Geolinks-IN-landmarks uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:IN|display=inline,title}}
Geolinks-IN-streetscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:IN|display=inline,title}}
Geolinks-Ireland-streetscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:IE|display=inline,title}}
Geolinks-NZ-streetscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:NZ|display=inline,title}}
Geolinks-UK-buildingscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:GB|display=inline,title}}
Geolinks-UK-cityscale uses unused
Geolinks-UK-mountain uses unused
Geolinks-UK-streetscale uses {{t|([-\d.]+)|([-\d.]+)|([^\}]*) {{coord|\1|\2|\3_type:landmark_region:GB|display=inline,title}}
Geolinks-US-buildingscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:US|display=inline,title}}
Geolinks-US-buildingscale-no-title uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:US}}
Geolinks-US-cityscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:city_region:US|display=inline,title}}
Geolinks-US-cityscale-no-title uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:city_region:US}}
Geolinks-US-colorphoto uses unused
Geolinks-US-countyscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:city_region:US|display=inline,title}}
Geolinks-US-countyscale-no-title uses unused
Geolinks-US-hoodscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:US|display=inline,title}}
Geolinks-US-mountain uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:mountain_region:US|display=inline,title}}
Geolinks-US-photo uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:US|display=inline,title}}
Geolinks-US-river uses {{t|\(([^\|]*)\)|​([-\d.]+)|([-\d.]+)|​\(([^\|]*)\)|([-\d.]+)|([-\d.]*) * '''Mouth''' or other endpoint \1 is at coordinates {{coord|\2|\3|type:river_region:US|name=\1}}
* '''Source''' \4 is at coordinates {{coord|\5|\6|type:river_region:US|name=\4}}
Geolinks-US-streetscale uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:US|display=inline,title}}
Geolinks-US-streetscale-no-title uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:US}}
Geolinks-US-surrounds uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:US}}
Geolinks-US-trails uses {{t|([-\d.]+)|([-\d.]+) {{coord|\1|\2|type:landmark_region:US|display=inline,title}}
Mapit-AUS-suburbscale uses {{t|lat=([-\d.]+)|long=([-\d.]+) or {{t|long=([-\d.]+)|lat=([-\d.]+) {{coord|\lat|\long|type:landmark_region:AU|format=dms|​display=inline,title}}
Mapit-AUS-suburbscale old uses {{t|lat=([-\d.]+)|long=([-\d.]+) or {{t|long=([-\d.]+)|lat=([-\d.]+) {{coord|\lat|\long|type:landmark_region:AU|format=dms|​display=inline,title}}
WikiMapia uses {{t|([-\d.]+)|([-\d.]+) Verified in early January to have only been used in articles that have coordinates already
Australian railway station templates search MAP\s*=.*maps.google.*&ll=([-\d.]+),([-\d.]+) {{coord|\1|\2|type:landmark_region:AU|format=dms|​display=title}}
Transmitter uses {{t|([^|]*)|([-\d.]+)|([-\d.]+)}} {{coord|\2|\3|type:landmark|name=\1 Transmitter}}

Pipes and curlies are not yet escaped for clarity.

[edit] Notes

Following Wikipedia talk:WikiProject Geographical coordinates#Replace uses of Geolinks with a text and coord and Wikipedia talk:WikiProject Geographical coordinates#CLICK ON COORDINATES, all geolinks coordinates on a single line are to be preceded with the text:

* {{PAGENAME}} is at coordinates

When a page contains title coordinates already, and they're not the same as the geolinks coordinates, the bot should leave the page as it is. When it has gone through all the pages, the operator should make a note of that, so that the remaining uses can be reviewed manually.