Template talk:WikidataCoord

Strange error
Noticed some strange error in template or module. See Statue_of_Lutgardis,_Charles_Bridge, correct coordinates from wikidata (https://tools.wmflabs.org/geohack/geohack.php?params=50.086845_N_14.4085239_E_globe:earth&language=en) are rendered wrongly (https://tools.wmflabs.org/geohack/geohack.php?pagename=Statue_of_Lutgardis,_Charles_Bridge&params=50_4_49_N_14_24_24_E_type:landmark).Jklamo (talk) 18:37, 24 June 2019 (UTC)
 * , could you take a look into this. In the above article, the associated entry at wikidata says the coords are 50 4 49, 14 24 24 which is the right place on the small wikimedia preview map shown in wikidata. But in the version of the article that used this template, those same coordinates are in a different location on the OSM map there.


 * Before I knew about this thread, I assumed the WD coords were just wrong; I found the location on google maps and put those coords (in decimal format) into the article (which located the statue correctly on the OSM map). I thought that was a good fix, but apparently there is more going on here. MB 05:24, 30 June 2019 (UTC)
 * , 50.0869°N, 14.4085°W is not what is in WD (50.08028°N, 14.40667°W). Frietjes (talk) 13:23, 30 June 2019 (UTC)
 * , yes, I am aware of that. But 50.08028°N, 14.40667°W appears in a different location on the map in WD than it does here. MB 15:22, 30 June 2019 (UTC)

Changing
'coordinate parameters' are passed through to Coord. Thus we can edit 'region': such as through, 'type': adm1st / adm2nd / adm3rd, and 'dim': "a number connected to √"

region is used only for adm1st / adm2nd, type is only for the three types allowed (there is no adm4th (for barangay), but dim: is used for every place (with a positive area).

'template parameters' are passed through to Coord no problem.

Thus for 1a dim:000|format=dms|display=i}}

1b Alang-alang, Mandaue is fourth order

https://geohack.toolforge.org/geohack.php?pagename=Template_talk:WikidataCoord&params=10_19_55_N_123_57_13_E__dim:1000

Well that's OK, and when it gets to GeoHack it's the same too.

2a type:adm3rd_dim:000|format=dms|display=i}}

2b Argao is third order

https://geohack.toolforge.org/geohack.php?pagename=Template_talk:WikidataCoord&params=9_53_N_123_36_E_

There are no coordinate parameters at all

3a region:PH-SIG_type:adm2nd_dim:000|format=dms|display=i}}

3b Siquijor is second order https://geohack.toolforge.org/geohack.php?pagename=Template_talk:WikidataCoord&params=9_11_N_123_34_E_

There are no coordinate parameters at all

4a region:PH-07_type:adm1st_dim:000|format=dms|display=i}}

4b Central Visayas is first order

https://geohack.toolforge.org/geohack.php?pagename=Template_talk:WikidataCoord&params=10_0_N_123_30_E_

There are no coordinate parameters at all

Try with region=no and type=yes:

2c

https://geohack.toolforge.org/geohack.php?pagename=Template_talk:WikidataCoord&params=9_53_N_123_36_E_

Try with region=yes and type=no:

2e

https://geohack.toolforge.org/geohack.php?pagename=Template_talk:WikidataCoord&params=9_53_N_123_36_E_

Try with both region=no and type=no:

2f

https://geohack.toolforge.org/geohack.php?pagename=Template_talk:WikidataCoord&params=9_53_N_123_36_E_

That doesn't work either! Now I guess that means that GeoHack doesn't work because the coordinates in wikidata are only dm not dms. Now to try that, if I can.

So I change the wikidata coordinate to have arcseconds to:

4c https://geohack.toolforge.org/geohack.php?pagename=Template_talk:WikidataCoord&params=10_0_0_N_123_30_0_E_region:PH-07_type:adm1st_dim:1000000

At last I worked what is wrong and what is to be done. But I can't do it – wikidataCoord, GeoHack and Wikidata between them have to agree what is to be done. (It is a bit confused, as I had to change a couple of coordinate, and that means the older coordinates have been wiped.) Maybe I'll send this to Village pump.

Overprecise Records of wikidata
In Flaminio Obelisk another user replaced my WikidataCoord with coord saying "adding coord to replace overprecise Wikidata coords". Why are wikidata coords overprecise? Why does it matter? I just wanted to use the database wikidata instead of adding the coords again manually for OSM.Ruedi33a (talk) 17:21, 8 October 2021 (UTC)
 * Explained in WP:OPCOORD. MB 18:26, 8 October 2021 (UTC)
 * Not the fault of the template.  merely renders the coordinates that are stored at Wikidata:
 * the raw information from wikidata:
 * and the rendered output of :
 * —Trappist the monk (talk) 18:35, 8 October 2021 (UTC)
 * and the rendered output of :
 * —Trappist the monk (talk) 18:35, 8 October 2021 (UTC)
 * —Trappist the monk (talk) 18:35, 8 October 2021 (UTC)

Template:WikidataCoord and Category:Coordinates_on_Wikidata
Please check Village_pump_(technical). --Tim Wu (talk) 15:49, 14 May 2022 (UTC)

Error
Used on Villa Park (in preview; I did not save), the markup:

generates an error:.

What's up? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 14:43, 12 June 2023 (UTC)
 * That error message occurs because  is assigned the value   which is not a QID so the call into wikidata returns nothing and nothing is not valid coordinate data.  Rewriting the template to include the QID works:
 * See the template documentation...
 * —Trappist the monk (talk) 15:27, 12 June 2023 (UTC)
 * See the template documentation...
 * —Trappist the monk (talk) 15:27, 12 June 2023 (UTC)