Template talk:Coord

From Wikipedia, the free encyclopedia
  (Redirected from Template talk:Coor title dm)
Jump to: navigation, search

Wikipedia API ignoring inline coordinates[edit]

I see the caveat that "Tools which read Wikipedia database dumps (such as Google Earth) often ignore inline coordinates.", but I'm surprised that this extends to the Wikipedia API itself! Asking the API for the geocoordinates of, say, the Somerset House article (which includes an inline {{coord}} in the infobox, but not beside the title) returns no coordinates.

I don't know how common it is for infoboxes to be inadvertently written like this, but it seems like a potentially large hole in Wikipedia's data. Should this be addressed, perhaps through clever templating (if an article has no title coords and the first infobox on the page includes inline-only coordinates, add those coordinates to the title) or a bot that searches for and flags articles that appear to have this oversight? --Gapfall (talk) 08:46, 26 May 2017 (UTC)

Actually it looks like a bot by User:JJMC89 is doing a very similar thing at Wikipedia:Coordinates in infoboxes, converting deprecated "latd"-type infobox fields into coord templates, and (possibly?) adding display=title to all of these in the process. If this bot has found a logical way to add display=title to infoboxes where it's appropriate, would it be useful to extend that to infoboxes with coord templates which lack it? --Gapfall (talk) 10:15, 26 May 2017 (UTC)
@Gapfall: by default the api only returns primary coordinates (those presented next to the title, the only way to indicate atm a coordinate applies to an entire article). By setting coprimary option, you can change this. ResultTheDJ (talkcontribs) 11:11, 26 May 2017 (UTC)
@TheDJ: Thanks, I hadn't seen that option!
What about queries where I'm searching for articles near to an article which lacks primary coordinates? https://en.wikipedia.org/w/api.php?action=query&list=geosearch&gspage=Somerset%20House&gsradius=10000&gslimit=10 returns "Page coordinates unknown". --Gapfall (talk) 11:58, 26 May 2017 (UTC)
@Gapfall: you can't. You are searching by article. The article has no primary coordinates, so there is no starting point to search from. Either provide coordinates manually, or fix the article. —TheDJ (talkcontribs) 12:22, 26 May 2017 (UTC)
Okay, thanks, so it's really "fix the article" territory. Does this sound like a safe thing for a bot to do automatically? --Gapfall (talk) 12:26, 26 May 2017 (UTC)
I support the general idea here, but a bot is not the first step. Not all coordinates in infoboxes should have "title" added to the display automatically. You would first need an RFC to gain sitewide approval to display coords in the title of any article with coordinates (which I would support). Then you would need to discuss how to write a very clever bot to avoid duplicated or conflicting coordinates. Take a look at Fenway Park as an example: there are two sets of coordinates, one inline and one both inline and title. – Jonesey95 (talk) 15:15, 26 May 2017 (UTC)
It wouldn't be too difficult for a write a bot to add/change to |display=inline,title once the process at Wikipedia:Coordinates in infoboxes is complete. Though, as Jonesey95 said, a RfC is needed to establish consensus for such a change. The issue that I see coming up is how to select which set of coordinates should be primary when there is more than one set on a page. — JJMC89(T·C) 20:47, 26 May 2017 (UTC)
@Jonesey95 and JJMC89: Sorry, missed these replies until now. Thanks for the feedback, and I agree that multi-coordinate articles would be tricky. How and where could I start an RfC on this? --Gapfall (talk) 16:51, 18 July 2017 (UTC)
See Wikipedia:Requests for comment for the process. I would post the RfC at WP:VPR. Something to consider: Should |primary= be added to the template for cases where we want to set primary coordinates without having them with the title. FYI, |nosave= prevents coordinates from being designated as primary. — JJMC89(T·C) 04:47, 20 July 2017 (UTC)
Thanks. I raised it following the style of other discussions on that page and it got archived after only one person responded. Not sure what to do next. --Gapfall (talk) 09:46, 3 August 2017 (UTC)
That other person being Anomie (talk · contribs). One possible problem is that you didn't actually start a formal RfC (as advised by two people above), in that you didn't use the {{rfc}} template, so it wasn't publicised to anybody who wasn't already watching VPR; and those who were watching it weren't aware of its status. --Redrose64 🌹 (talk) 20:17, 3 August 2017 (UTC)
It felt wrong to format it as an RFC once I'd read the page, because there weren't any others there (but plenty of support/oppose votes anyway), and I wasn't sure I could get it down to the suggested brevity of the "Should the History section contain a photograph of the ship?" example. I see now there's a suggestion for cases where the poster has "lots to say on the issue", so okay, thanks, I'll try raising it again some time. --Gapfall (talk) 08:13, 4 August 2017 (UTC)
@Gapfall: To see examples of currently-open RfCs, have a look at WP:RFC/A. This is subdivided into the various RfC categories, and for each category, all of the open RfCs in that category are listed. Each list entry comprises a link to the RfC proper, followed by the RfC opening statement, an optional signature and mandatory timestamp. You may notice that some of these RfCs are listed more than once, this happens when they are in more than one RfC category. --Redrose64 🌹 (talk) 19:09, 4 August 2017 (UTC)
The bot only adds |display=inline,title if the infobox was already doing so. — JJMC89(T·C) 20:47, 26 May 2017 (UTC)

Coordinates not available through API when fetching them from Wikidata through this template?[edit]

@Gapfall: has pointed out that the coordinates in Royal Observatory, Greenwich aren't currently accessible through the Wikipedia API (example URL). The coordinates in that article are now provided from Wikidata through {{Infobox Observatory}}, which in turn uses this template to fetch and display the coordinates. I don't know how the coordinates are normally provided to the API, but something in this system seems to be breaking it. The code in Infobox Observatory is:

{{#if:{{{coordinates|{{{coords|{{{coord|}}}}}}}}} | {{#invoke:Coordinates|coordinsert|{{{coordinates|{{{coords|{{{coord}}}}}}}}}|type:landmark|{{#if:{{{location_country|}}}|region:{{CountryAbbr|{{{location_country}}}}}}}}} | {{#if:{{#Property:P625}} | {{Coord|3=type:landmark{{#if:{{{location_country|}}}|_region:{{CountryAbbr|{{{location_country}}}}}}}|nosave=1|display=inline,title|format=dms}} }} }}

Is there anything missing here that's needed to make the API work correctly, or is this an issue with this template? (Also @Jc3s5h, who brought this to my attention.) Thanks. Mike Peel (talk) 23:26, 26 June 2017 (UTC)

See #Wikipedia API ignoring inline coordinates above. I haven't decoded the wikitext you posted but apparently it is necessary that title be specified to say that the coordinates are "primary", that is, they refer to the location of the subject of the article. Johnuniq (talk) 00:07, 27 June 2017 (UTC)
@Johnuniq: I'm setting display=inline,title in this case - does the order need to be changed here? Sorry for the messy code, it's mostly for legacy reasons, and I'll try to tidy it up at some point. Thanks. Mike Peel (talk) 00:19, 27 June 2017 (UTC)
I do not think the order matters. By "haven't decoded", I just meant I was too lazy to read it; I wasn't suggesting the code was unduly complex! Now that I've looked at it a little, I see my comment was redundant. Searching the template for "wikidata" shows mention of {{WikidataCoord}}. Perhaps that should be used? Johnuniq (talk) 00:49, 27 June 2017 (UTC)
I'm happy to switch to that template, but I'm not sure if that would fix this issue. (Also, the functionality of that template should be merged in here at some point - but that's a different topic!) Thanks. Mike Peel (talk) 01:25, 27 June 2017 (UTC)
For what it's worth I'm getting the same problem (coincidentally related to the thread below) on Template:Infobox World Heritage Site. On an article such as Ajanta Caves, which gets all of its infobox data from Wikidata, the API returns no coordinates at all (not even secondary ones). --Gapfall (talk) 09:47, 3 August 2017 (UTC)

Use Wikidata ranks?[edit]

At Kasubi Tombs (Q309426) there is now a deprecated coordinate (from a database that appears to contain an error) and a normal rank coodinate (the corrected coords). However, it seems that using this template at Kasubi Tombs (via the inclusion of this template in {{Infobox World Heritage Site}}) fetches the deprecated value (since it is the first in the list) rather than following the ranking. Please could that be changed so that the ranking is followed? For now there is a local override in place in the article for the coordinates. Thanks. Mike Peel (talk) 00:17, 10 July 2017 (UTC)

More info at User talk:RexxS#Preferred ranks problem (informing RexxS). --Redrose64 🌹 (talk) 09:40, 10 July 2017 (UTC)
I thought this and Module:Wikidata use different code / were developed by different people? Thanks. Mike Peel (talk) 11:44, 10 July 2017 (UTC)
No Mike, you upgraded {{Infobox World Heritage Site}} to be Wikidata-aware on 5 May 2017, using the calls in Wikidata & WikidataIB. --RexxS (talk) 13:02, 10 July 2017 (UTC)
@RexxS: For the coordinates it uses {{Coord|nosave=1|display=inline|format=dms}} though - not Module:Wikidata/Module:WikidataIB. Thanks. Mike Peel (talk) 13:20, 10 July 2017 (UTC)

Degrees and decimal minutes[edit]

I've been doing a bit of experimenting in my sandbox and found that degrees and decimal minutes work: {{coord|51|25.813|N|0|43.945|E}} -> 51°25.813′N 0°43.945′E / 51.430217°N 0.732417°E / 51.430217; 0.732417. This of use in navigation where charts and almanacs are conventionally marked up in degrees and decimal minutes. Is everyone happy if I go ahead and update the documentation to reflect this?Martin of Sheffield (talk) 21:04, 30 July 2017 (UTC)

Minus sign[edit]

This template produces a circle (globe?) that says "Show location on an interactive map" when the mouse rolls over. At the lower right is a horizontal line that looks like a minus sign, although several features above and below that line can make it look more like a plus sign. For several minutes I thought I had discovered a major coordinates problem, because I was misreading Southern Hemisphere locations as Northern Hemisphere, based on squinting at the phantom minus/plus sign. I didn't figure it out until I tried looking at the edit page code. Am I the only one having that problem? If not, can we remove that line? Art LaPella (talk) 20:20, 11 August 2017 (UTC)

Please give an example page where you see this problem. --Redrose64 🌹 (talk) 21:55, 11 August 2017 (UTC)
And name your browser. The globe has a down-pointing triangle at the lower right: File:WMA button2b.png. Is it the triangle which looks like a plus or minus in your browser? It's clearly a triangle for me, also at the size used in articles, and its top is at the bottom of the coordinates so there is no risk of confusion. PrimeHunter (talk) 22:17, 11 August 2017 (UTC)
Your own template document page, and all other examples I looked at. Firefox, but it looks the same in Chrome. Yes, it clearly looks like a triangle, now that you told me, but before that insight I thought it was a line with a red dot under it. The top of the triangle is just above the bottom of the coordinates because my font size is set to 26. It goes to the bottom by setting the font size to 12, which I think is the default. Font size 26 makes several Wikipedia things look wrong, so maybe we shouldn't worry about it. Art LaPella (talk) 01:49, 12 August 2017 (UTC)
So, the problem is that the triangle looks like something else... but red? Anyway, the triangle has been misunderstood before, see e.g. Template talk:Coord/Archive 12#Better icon?. --Redrose64 🌹 (talk) 06:07, 12 August 2017 (UTC)

Tracking category[edit]

Is there any tracking category, which gives a list of articles using this template directly and not through any infobox? -- Pankaj Jain Capankajsmilyo (talk · contribs · count) 07:24, 23 August 2017 (UTC)

No. It would be difficult to implement such a category—the only way would be for the template to always add a category, and for each infobox to remove the category. If there is a demonstrable need to get a one-off list of such articles, you could ask at WP:VPT and someone might have a suggestion regarding searching, probably by a script searching a dump of all articles. One problem is that it might be hard to provide a definition of what is an infobox, although I suppose any template containing "infobox" in its title would do. Johnuniq (talk) 07:45, 23 August 2017 (UTC)

coord not appearing on Thornton Chase[edit]

at the top of the article, any ideas? I've tried fewer decimals, using sec/min, without the minus… Smkolins (talk) 13:49, 19 September 2017 (UTC)

Smkolins, looks like the problem was fixed for you. Frietjes (talk) 14:21, 19 September 2017 (UTC)
Yes, |display= did not have a valid value. — JJMC89(T·C) 14:24, 19 September 2017 (UTC)
thanks - I took the option to be asking for visible text, not placement. Thanks again. Smkolins (talk) 14:32, 19 September 2017 (UTC)