Wikipedia:WikiProject Geographical coordinates/coordinates search tool

class="wikitable"

|+Sample searches

! Description

! MySQL Regular expression query

Coordinates imported from the CSWiki

| {{code|source:cswiki}}

Settlements whose populations are under 1,000

| {{code|2=ragel|1=type:city\([0-9]{0,3}\)}}

South of the Antarctic Circle (approximate)

| {{code|2=ragel|1==(66_[3-9]|66.[6-9]|6[7-9]|[7-9][0-9])[0-9_.]*_S_}}

Coordinates equivalent to {{coord|0|0}}

| {{code|2=ragel|1==[-_0.]+[NS][-_0.]+[EW]}}

Coordinates in San Marino

| {{code|region:SM}}

Coordinates on Callisto

| {{code|2=ragel|1=globe:[Cc]allisto}}

To switch to other wikis, the site parameter can be added to the URL, e.g.

  • {{code|2=ragel|1=&site=commons}} for Commons
  • {{code|2=ragel|1=&site=pt}} for Portuguese Wikipedia

id="glupt-source" class="wikitable sortable"

|+ Searches to find problems

! Problem description

! Python regular expression

Excess precision (6 or more decimal places)

| {{code|2=ragel|1=[.][0-9]{6} }}

Excess precision (5 decimal places)

| {{code|2=ragel|1=[.][0-9]{5}[^0-9]}}

Coordinates lacking metadata (no type or region)

| {{code|2=ragel|1=_[WE]_+($|&title=|\{+[0-9]\}+)}}

Unexpected character in parameter name

| {{code|2=ragel|1=params=[^&=]*?[^_a-z][a-z]*:}}

Unsupported parameter elevation:

| {{code|2=ragel|1=params=[^&=]+?elevation:}}

Unsupported parameter other than elevation:

| {{code|2=ragel|1=params=[^&=]+?([^emn]|cation|me|om):}}

Malformed region code

| {{code|2=ragel|1=params=[^&=]+?region:([^A-Z]|[A-Z]([^A-Z]|[A-Z][^_&-]|[A-Z]-[^0-9A-Z]))}}

Unassigned top-level region code

| {{code|2=ragel|1=region:(A[ABCHJKPVY]|B[CKPX]|C[BEJPQT]|D[^EJKMOZ]|E[ABDI-LUW]|F[A-HLNPQS-Z]|G[CJKOVXZ]|H[A-JLOPQSV-Z]|I[A-CF-KPU-Z]|J[^EMOP]|K[A-DFJ-LOQS-VX]|L[D-HJL-QWXZ]|M[BIJ]|N[BDHJKMNQSV-Y]|O[^M]|P[B-DIJOPQUVXZ]|Q[^A]|R[^EOSUW]|S[PQUW]|T[ABEIPQSUXY]|U[^AGMSYZ]|W[^FS]|X[^AINPSZ]|Y[^ET]|Z[^AMW])}}

Unexpected character in dim or scale or typesize

| {{code|2=ragel|1=(dim:[0-9.]*([^0-9.k_&]|k[^m]))|(scale:[0-9]*[^0-9_&])|(city[(][0-9,]*[^0-9,)])}}

Incomplete parameter

| {{code|2=ragel|1=params=[^&=]*?(dim|globe|region|scale|source|type):?(&|_|$)}}

Invalid type

| {{code|2=ragel|1=type:(?!(adm(1st|2nd|3rd)|airport|city|country|edu|event|forest|glacier|isle|landmark|mountain|pass|railwaystation|river|satellite|waterbody)($|[&_()]))}}

City without type:

| {{code|2=ragel|1=params=[^&=]*?[^:]city}}

College with type: other than edu

| {{code|2=ragel|1=[Cc]ollege[&].*?type:(?!edu)}}

School with type: other than edu

| {{code|2=ragel|1=[Ss]chool[&].*?type:(?!edu)}}

University with type: other than edu

| {{code|2=ragel|1=[Uu]niversity[&].*?type:(?!edu)}}

United States broadcaster with type: other than landmark

| {{code|2=ragel|1=[^(][KW][A-Z][A-Z][A-Z].*?params=.*?type:(?!landmark)}}

Station with type: other than railwaystation

| {{code|2=ragel|1=ailway_[Ss]tation.*?type:(?!railwaystation)}}

Typesize provided for type other than city

| {{code|2=ragel|1=type:(?!city)[^&=_]*[(]}}

Unusual URL formatting

| {{code|2=ragel|1=geohack.php[?](?!pagename=)|&language=}}

class="sortbottom"

! colspan="2" style="text-align:left;" | Tallies