Template talk:GeoTemplate/Archive 7

Latest comment: 15 years ago by Ratarsed in topic Wrong UTM zone of WGS84
Archive 1 Archive 5 Archive 6 Archive 7 Archive 8 Archive 9 Archive 10

Map sources for multiple coordinates

In the revision page is a section for Map sources for multiple coordinates. Is there a reason to not add that section? Would that section not function when the page is accessed as a single coordinate? If that is the case, can a separate page be created for multiple coordinates? (SEWilco 16:17, 16 August 2007 (UTC))

The section works with any coordinates where the pagename of the containing article is passed to GeoHack, be the contents single or multiple coordinates. A separate page shouldn't be necessary, though the name of the section may need some rewording as the links are applicable for all coordinates. --Para 17:12, 16 August 2007 (UTC)
So it does not work when the pagename is not passed to GeoHack. When does that happen? (SEWilco 17:21, 16 August 2007 (UTC))
Right now with all coordinate templates. With {{coord}} until the editprotected request is fulfilled, and it can easily be added to the other templates as well. --Para 17:39, 16 August 2007 (UTC)
For the benefit of anyone not already familiar with that proposal, it should not be fulfilled, because it is faulty, as described. Andy Mabbett | Talk to Andy Mabbett 18:35, 16 August 2007 (UTC)
So if the multiple coordinates section is broken for all coordinate templates, why not add a GeoHackMultiple page which is oriented toward multiple coordinates? When a page name is given with no single coordinate, presenting single coordinates links makes no sense. (SEWilco 22:15, 16 August 2007 (UTC))
There's nothing preventing this from happening with my additions, just specify the page name with the &template= parameter. —Dispenser 23:05, 16 August 2007 (UTC)
The "production" GeoHack has the &title parameter already, doesn't it? That's what the current multiple coordinates section relies on. It would however make sense to have a separate parameter for cases where an editor wishes to have something more specific as the coordinate title than the pagename. To not overload &title, perhaps a &pagename parameter could be added, with the only functionality to replace {pagename} with it, and {title} as well if &title hasn't been given. --Para 17:27, 17 August 2007 (UTC)
Nope. Giving an article title to GeoHack [1] only produces the same list of services for single coordinates. (SEWilco 22:07, 18 August 2007 (UTC))
It makes sense when the method of entry is through one of the coordinates, which is the standard in Wikipedia. Whether a set contains one or more coordinates is such a small difference for services that support multiple coordinates, that it's not worth forking our list of geographical information services and the related GeoHack script in two. The section is broken only until the templates are modified to pass the pagename, and the edit is trivial with all templates. --Para 23:17, 16 August 2007 (UTC)
The past inability of Wikipedia to access multiple coordinates is a deficiency and limitation, not a standard. (SEWilco 21:50, 18 August 2007 (UTC))
The reason not to add it (as I thought you understood and, indeed, agreed) is that the page is about a single waypoint. The link may work, purely technically, but would be confusing to users. A separte page is needed for that reason. Andy Mabbett | Talk to Andy Mabbett 18:35, 16 August 2007 (UTC)

A little server problem

"Unable to connect … to the server at tools.wikimedia.de." I'm sure that will be working soon. (SEWilco 18:49, 22 August 2007 (UTC))

The server is still up, but they seem to be updating the OS. --Dschwen 19:04, 22 August 2007 (UTC)
A more accurate term then would be "The server is still on". It might be lit up but the heat it is generating is of little use to us. (SEWilco 19:44, 22 August 2007 (UTC))
:-). The still working SSH login is of use to me. Anyway, apache seems to be working again. Plus I thought it might be interesting to know it's maintnance and not a fatality... --Dschwen 19:51, 22 August 2007 (UTC)
For the benefit of less technical readers, "apache working" means the web services are again working. (SEWilco 20:54, 22 August 2007 (UTC))

Table of contents

is there a reason there isnt a table of contents? Blacksmith talkEditor Review 02:06, 25 August 2007 (UTC)

Probably because it's a very long list of contents. Are there any objections about having it? --Steinninn 05:15, 25 August 2007 (UTC)

hmm im just thinking it might be easier to navigate with one, but i wonder if theres a way to have the TOC only showing certain degrees of headings. e.g ==heading== nut not ===heading=== so only the main headings are shown in toc.Blacksmith talkEditor Review 07:23, 25 August 2007 (UTC)

Sorry. I read there is a table of contents. Well. There is one, and it says Contents: Global... --Steinninn 09:50, 25 August 2007 (UTC)

Named coordinates

A while ago support was added to pass article names to map services along with the coordinates, but it turned out that some services have trouble with the Wikipedia names even when they're urlencoded. For example, Google Maps can't handle parentheses in the name, and the coordinate link from Pyramid Mountain (volcano) for example didn't work at all because of this Google bug. There are no doubt other services as well where a separator collides with a character used in our article names. Other than stopping to use names at all, I see the following solutions:

  1. Contact service providers to allow any character in the name as long as they're urlencoded
  2. Add a new name parameter to GeoHack, where all non-alphanumeric characters (on which alphabet?) have been stripped
  3. Go through the entire list of services, find out which characters are problematic, and add a new name parameter to GeoHack, where only these characters have been removed or replaced

Any others? --Para 00:16, 3 September 2007 (UTC)

Both MapQuest and Live Maps work with regular HTML escaping (not sure about Google). So instead of underscores for spaces, how about percent 20's? Heptazane 16:25, 6 September 2007 (UTC)
Examples:
That can be done on the wiki side from Template:Coor URL, by replacing {{FULLPAGENAMEE}} with {{urlencode:{{FULLPAGENAME}}}}. It fixes Live support for multiword titles, since it uses underscore as a separator, but is otherwise just a cosmetic fix. --Para 16:24, 10 September 2007 (UTC)
The title is currently coming in with underscores, but Live Maps uses that as a separator, so it doesn't work properly. So even escaped underscores would be better... although escaped spaces would be ideal.Heptazane 16:26, 19 September 2007 (UTC)

How does one pass names to the current geohack.php at all? And how will they be passed to the new script when referencing the page from outside wikipedia? http://tools.wikimedia.de/~magnus/geo/geohack.php?params=32.536942591894_N_44.422224120113_E_&title=Babylon ?? Cush 18:58, 23 September 2007 (UTC)

Hello? Why does the title feature *NOT* work? --Cush 20:11, 28 September 2007 (UTC)
Your link seems to work fine with the services that support a title. What did you expect to happen? What is this "new script"? --Para 21:08, 28 September 2007 (UTC)
I thought there was a new GeoTemplate coming up... anyways, no title is passed to the GoogleMap link. Cush 18:51, 30 September 2007 (UTC)
I tried putting the title in the last part of the Google Maps link ("q=Babylon") and although the specified coordinate was displayed, search results are provided which are not relevant in this case. That's probably why it is not being done. (SEWilco 20:00, 30 September 2007 (UTC))
Titles for Google Maps can be given in the format "q=latitude,longitude (Title)" and this template did pass the title until it was noticed that Google is buggy. I mentioned this in my first post to this topic already, but when there are parentheses in the title as many articles on Wikipedia have, Google gives an error and doesn't show the placemark at all. If you remove the opening bracket from within the title, the link works, but it's not possible to do that with MediaWiki functions. In my opinion it's more valuable to have a working placemark for all links than a title. --Para 22:49, 30 September 2007 (UTC)
Then why not just replace parentheses with square brackets? I do that in my own php scripts that are linking to GoogleMaps. http://maps.google.com/maps?spn=0.3,0.3&ll=25.097664945575,32.779510383797&t=k&q=25.097664945575,32.779510383797(Nekhen%20%5BHierakonpolis%5D)

Cush 19:53, 1 October 2007 (UTC)

Yes, that would be part of solution #3 above. Do all the services we link to support square brackets, and what other characters do they have problems with? What should those other characters be replaced with? What if it's an "essential" character that's not supported by some service, such as a comma? Will that character then be filtered for all services? What if the problematic service is a minor one, can we just ignore it? Do we need special case variables with different characters replaced or removed in each, or a variable syntax that tells which characters need to be replaced and with which? --Para 19:53, 1 October 2007 (UTC)
?? How to pass parameters to the respective url entirely depends on what the particular service accepts, right? Why would there have to be a mechanism for all instead of one mechanism per output link? All you have to figure out is how to feed the parameters all into the geohack.php, and then individual solutions for each linked site can be implemented pretty easily. Cush 21:56, 1 October 2007 (UTC)
I think he's muttering to himself about how to code a general solution within geohack. Obviously geohack has some general rules but needs code for some exceptions. The obvious solution is to test for a few special cases, each with their own substitutions, and use the existing code for everything else. Usually after coding several such special cases, patterns become apparent which can be handled with simplified generalized code. He's trying to create the generalized code now. (SEWilco 22:03, 1 October 2007 (UTC))
See what has happened so far with the similar #Geographical Survey Institute Link does not work well section, which would also needs an exception variable with something much simpler. Cush is proposing the addition of a special case variable along the lines of {titlegoogle} or {title_parentheses_as_squarebrackets}, and for the Live problem above perhaps a {title_underscores_as_spaces}. While creating separate variables one by one in GeoHack might work, it would be putting the work on the person maintaining the script. We already have GeoTemplate so that that single person doesn't need to be handling all the link changes, and I think we should follow the same principle here. It might of course be overkill if there's really only two services that have problems with our titles, but that's what we'd need to find out before any coding. --Para 09:46, 2 October 2007 (UTC)

I am proposing what? There is no need at all to change the parameters that are fed *into* the geohack.php, only the links that this script produces need to be adjusted. And what's this about the GeoTemplate? Cush 11:49, 2 October 2007 (UTC)

Ok, perhaps some explanation of GeoHack is in order. It takes two inputs: the coordinate data from Wikipedia coordinate templates in the http link, and the "link template" Template:GeoTemplate, where it replaces certain keywords ("variables") with values computed from the given data. If GeoHack is changed to process the data differently, the change will affect all uses of that variable. GeoHack does not handle html links, it handles keywords with a simple search & replace. Perhaps then you are suggesting that after all the replacing has been done, GeoHack should find every link on the page, filter out parentheses within parentheses from all Google links, and from Live links find the title from between all the separating underscores and replace underscores within the title with spaces, etc? --Para 12:26, 2 October 2007 (UTC)
Then add new keywords for GoogleMaps and Live in the GeoTemplate, and the geohack.php can subsequently perform the replacement of characters. 4 minutes max. Cush 21:01, 16 October 2007 (UTC)
Note that both MapQuest and Live Maps would benefit from having the title with escaped spaces rather than underscores. Heptazane (talk) 17:29, 14 January 2008 (UTC)

MapQuest {zoom} values

I have restored {zoom} to the MapQuest links in Template:GeoTemplate. It was removed in two edits on 11 July 2007, first changed to 9 in this edit and then to 7 in this edit. For those not familiar with this, the GeoTemplate can be supplied with a {type} that has an associated {scale}. For example, city is associated with a scale of 1 : 100,000 and landmark has a scale of 1: 10,000. The script uses that to calculate other scaling values: {mmscale} is used for Multimap, {span} for Google Maps, {altitude} for MSN Maps and {zoom} for MapQuest. These are documented at Template:GeoTemplate/doc#Scaling and calculated in mapsources.php. -- Zyxw 15:18, 19 September 2007 (UTC)

I also made this correction in Template:GeoTemplate/sandbox, which was created on 25 July 2007 and therefore picked up the previous changes to Template:GeoTemplate. -- Zyxw 15:53, 19 September 2007 (UTC)

Parameters?

Can somebody please add a list of all possible parameters that can be passed to the geohack.php? Including lists of valid parameter values (i.e. for type). Cush 22:02, 13 October 2007 (UTC)

The input from Wikipedia articles is described on the project page for coordinates, Wikipedia:WikiProject Geographical coordinates#Implementation details, and the input variables for map service links in GeoTemplate is linked at the top of this page and on GeoTemplate itself, Template:GeoTemplate/doc. --Para 10:33, 15 October 2007 (UTC)

What's going on?

Clicking on any coordinates in Wikipedia leads to this message "The tools by this user is deactivated. The author should email the roots." Cush 21:10, 26 October 2007 (UTC)

Please read Wikipedia:Village pump (technical)#Mapping tool broken?. - Erik Baas 00:27, 27 October 2007 (UTC)

Wrong UTM zone of WGS84

E.g. Las Vegas is located at WGS84 UTM 11S; which should be 11N --cwb —Preceding unsigned comment added by 62.154.250.75 (talk) 10:49, 5 November 2007 (UTC) Dallas has same problem 3629041 706044 14S should be 14N

Dallas should be 14S, going by Image:Utm-zones.jpg (see also Universal Transverse Mercator coordinate system) -- Ratarsed (talk) 17:25, 27 May 2008 (UTC)

Limited number of template uses per page?

Is the number of template uses in a page limited? Because on my user page the list of coordinates breaks down at the end and either "Template:Coord/display/inline" or "Template:Coord" are displayed instead of the clickable coordinates link to the geohack.php. Cush 23:07, 7 November 2007 (UTC)

There is a limit (2048000 bytes) to the total size of transcluded templates, so it depends not only on the number templates, but also on their size. This was in the source of your user page:
Pre-expand include size: 2047934 bytes
Post-expand include size: 689079 bytes
Template argument size: 608435 bytes
Maximum: 2048000 bytes

- Erik Baas 01:36, 8 November 2007 (UTC)

So what would I have to do? Cush 10:49, 8 November 2007 (UTC)
I think the only solution is to split it up into two or more separate pages. - Erik Baas 15:05, 8 November 2007 (UTC)
You can create subpages in userspace, such as User talk:Cush/Ancient Sites/Asia and then just put an index on your page. Your page will also load much faster. (SEWilco 15:08, 8 November 2007 (UTC))

Fy

Fy: is implementing coordinates more seriously now. How/where do I translated this page into Frysk/Frisian? Aliter 02:07, 10 November 2007 (UTC)

The way these pages are connecting may make the question above somewhat unclear: I'm asking about: http://tools.wikimedia.de/~magnus/geo/geohack.php?pagename=No_title&params=0_N_0_E_. Aliter 23:25, 11 November 2007 (UTC)

You can translate the page to fy:Template:GeoTemplate, and make all coordinate links in the wiki point to the above url with &language=fy added (like has been done with de:Vorlage:KoordinateURL for example). --Para 00:02, 12 November 2007 (UTC)

Thanks, I made a small page as a start, with a further link to the large English one. (A complete translation would go over our size limit anyway.)

There's always one more question, of course: Those types, can we get those localised somehow, or should we parse the value on the page and select the relevant translation based on that? Aliter 01:13, 13 November 2007 (UTC)

You can make them template parameters (|name=value) as localised names and values, which the template can then convert to GeoHack supported names and values. Or you can do what's been done on the German Wikipedia; enter the data twice, once for localised display and again for GeoHack. These parameter translations break machine readability across Wikipedias by making coordinate entry inconsistent, but I don't think there's been any effort on that anyway. --Para 17:16, 13 November 2007 (UTC)

I was merely trying to localise the type on the result page: where {type} is included, it's replaced by the type that was passed in. So I tried using {{#switch:{type}|city=bewenning|et=c.|oars: {type}}}. Unfortunately, this always hits the default value. I don't know what's wrong there, but for now we apparently have to accept a type in English on a page in Frisian. Aliter 01:35, 14 November 2007 (UTC)

Right. Then we have to ask what the type parameter is for: people or machines? It has been visible on GeoTemplate only for a few weeks [2] - before that only Wikipedia editors saw the parameter while editing articles. It would be possible to change the parameter support and make GeoHack understand more types, where many correspond to the same scale, or to just change the display and add a translation table chosen by the language parameter. But personally I think the GeoTemplate doesn't need to be showing other information of the coordinates than just the coordinates themselves, and that would be the easiest solution here. --Para 16:53, 14 November 2007 (UTC)

Coordinates for Newland mistaken

Geog co-ordinates are wrong - for Newland Gloucestershire, not Newland Worcestershire. Neil, Bristol 82.32.33.113 12:40, 14 November 2007 (UTC)

Coordinates for both villiages fixed. This is not really the correct place to raise errors of data entry though. :) Oosoom Talk to me 13:46, 14 November 2007 (UTC)

Don't say "Find this location" a million times

  • Find this location (Satellite, Hybrid) on Google Maps [1].
  • Find this location (Satellite, Hybrid) on MapQuest [2]. Roads and driving directions.
  • Find this location (Satellite, Hybrid) on Yahoo! Maps [3]

should be a table,

Find this location on:
Google Maps  Sat Hyb Sitepage
MapQuest     Sat Hyb Sitepage
Yahoo! Maps  Sat Hyb Sitepage

Or

Google Maps  Map Sat Hyb Sitepage
MapQuest     Map Sat Hyb Sitepage
Yahoo! Maps  Map Sat Hyb Sitepage

where the first word is not a link. Jidanni (talk) 20:13, 20 November 2007 (UTC)

You'll notice this was discussed at length above, with mostly the same results as you've lined out here. There are multiple proposals at Template:GeoTemplate/sandbox, but unfortunately the demo link to render them isn't working anymore. I put my own proposal as static html to GeoTemplate test with icons, what do you think? Incidentally, would anyone who understands CSS floating know how to make the local and global sections arrange themselves like in this screenshot, if there's enough screen space? --Para (talk) 18:55, 21 November 2007 (UTC)

Don't say "Map of all coordinates in the article" without checking first

Don't say to the browser "Map of all coordinates in the article" unless you have first checked to see that you have been passed valid input! E.g., my http://jidanni.org/location/coordinates.html links to GeoTemplate/Archive 7, even if you didn't expect it to. Jidanni (talk) 20:26, 20 November 2007 (UTC)

But tools on the toolserver are for Wikimedia use, and all Wikimedia projects I know of that use the English GeoTemplate also pass a pagename. I don't think Wikimedia tools need to be adapted to general use that isn't from any Wikimedia project. Anyway, at the moment there's no functionality in GeoHack for selective display; the tool always gives the entire GeoTemplate. --Para (talk) 19:13, 21 November 2007 (UTC)