Template talk:Location/2011

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Archive This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.

Subterraneous photograps

Can be added an optional parameter for distinction of underground photographs from surface photographs? It can allow a locally relative altitude (in meters or "surface", "underground", "aerial" values - the default value should be "surface") or "absolute" altitude (elevation). It can be exploited for filtering of images. --ŠJů (talk) 16:15, 10 January 2011 (UTC)

What's the point? Altitude relative to the Ellipsoid should be enough. You can always obtain the local elevation from DEMs or ShottleTopography datasets. Keep it simple. --Dschwen (talk) 16:49, 10 January 2011 (UTC)
I don't think that ShottleTopography dataset helps to distinguish subterranean photos (e. g. from mines or metro) and surface photos. It is not always useful when signs of subterranean photos are mixed with surface ones at a map. --ŠJů (talk) 00:11, 21 March 2011 (UTC)

Change of type parameter

For technical reasons related to data extraction I would like to change the type parameter in the generated coordinate URL to camera. This would allow a distinction from object locations in the coordinate database maintained by User:Dispenser (tswiki:ghel). Until now I I used the class:object option, which I added to the Object location template to distinguish the two types of coordinates on commons in my own data extraction. However the use of type would be a more elegant solution and would allow to centralize the coordinate extraction efforts. Any objections? --Dschwen (talk) 01:21, 1 April 2011 (UTC)

ok. --  Docu  at 04:31, 1 April 2011 (UTC)
I do not think I was able to follow the explanation, but if you believe it will improve the template than I think we should trust your judgment. --Jarekt (talk) 16:46, 1 April 2011 (UTC)
Ok, roughly speaking, there is a set of parameters that are passed on to geohack in each coordinate url. Rather than inventing a new parameter name to distinguish object and camera locations , I'd like to add a new possible value to the type parameter (using it makes perfect sense to me). This should have no further side effects. The big deal is that the best supported coordinate data extraction effort can only parse known parameters (one db column per parameter). Changing the database schema would be a major pain, as there are many users of the db. Introducing a new type value (which is unused for camera locations anyways) would instantly solve the problem for me. I'm going ahead and change the two templates (removing the ugly class:object fix from Object location, and adding type:camera in Location). --Dschwen (talk) 00:44, 3 April 2011 (UTC)
The "type" parameter is used to determine map scale; if you change it to always be "camera" many existing uses of this template will no longer work correctly. Powers (talk) 12:28, 4 April 2011 (UTC)
If you want to supply a map scale you can use the dim parameter. Type was almost exclusively set to landmark (by hardcoded default) in existing uses of the Location template. All I did was changing this default to camera. Setting type to any different value than the default makes no sense in my opinion anyways. --Dschwen (talk) 13:03, 4 April 2011 (UTC)
Ah, I think I was confusing this one with the equivalent template on Wikipedia... still, though - looking at the template's use on one of my pictures, with type:landmark, the GeoHack page uses a scale of 1:10000; with type:camera, it uses 1:300000, which as you may guess is much less useful for most purposes. Isn't that a change to the default behavior? And an undesirable one at that? I don't want to have to go through all of my pictures and add a scale: parameter. Powers (talk) 15:03, 5 April 2011 (UTC)
Setting the default scale for camera to be the same as the default scale for landmark should be no problem. I'll talk to the GeoHack guys. --Dschwen (talk) 16:05, 5 April 2011 (UTC)
I've added a type:camera as requested in GEOHACK-9 with a 1:10,000 scale. Using type:landmark is in appropriate. We have dim:N, scale:N, and little used default:N to specify do that. Dispenser (talk) 21:06, 5 April 2011 (UTC)
Thanks, and I noticed less than a day after the template change the entries are already updated in your coord_commonsw table. Great. --Dschwen (talk) 02:26, 6 April 2011 (UTC)
It's not so much that type:landmark was being used but that it was the default and produced desirable results as the default. The current solution should be most acceptable. Powers (talk) 00:39, 8 April 2011 (UTC)

bug if seconds are 0?

{{Object location|2|41|0|S|107|35|0|E}}

{{Object location}} displayed -2° 40' 0" S 107° 34' 0" E [Live template replaced with example of problem -Dispenser (talk) 03:11, 2 September 2011 (UTC)]

should display (2º 41’ 0" S, 107º 35’ 0" E) but it doesn't. A bug? Or did I miss something on the doc page. Cheers --Saibo (Δ) 02:30, 14 August 2011 (UTC)

The link works correctly, FYI. So it appears to just be a display issue. Powers (talk) 01:21, 16 August 2011 (UTC)
Pictogram voting keep.svg Fixed Thanks for finding that one - it was rather tricky rounding error. See the fix. I think most wikipedia templates should have the same issue. --Jarekt (talk) 16:53, 30 August 2011 (UTC)
Thanks Jarekt! :-) de:Vorlage:Coordinate seems to be correctly displaying 0 seconds. Probably it is not in the same template family. Does our template here come from enwp? Cheers --Saibo (Δ) 00:31, 2 September 2011 (UTC)
This is a bug with the modulo operator in PHP (see MediaWiki bug 6068) which discards decimals. In this instances 107.58333333333 * 60 = 6454.9999999998 which was truncated to 6454, modulo 60 to come out to 34. w:en:Template:Coord/dec2dms/dms uses round 0 instead of truncat(x+0.49). Dispenser (talk) 03:11, 2 September 2011 (UTC)
I do not remember where that subtemplate come from. I think I wrote original Template:Location/deg2dms from scratch, but looked on other templates for future improvements. The issue was partially due to the bug/feature mentioned above, that bug does not produce errors of one degree. The big error was due to the fact that minutes and seconds were applying rounding to different numbers. Most of the time if one rounded up the other also rounded up but occasionally one rounded up and the other down. That is how you get errors of one degree.--Jarekt (talk) 03:56, 2 September 2011 (UTC)

Should {{Location}} template be placed below or above {{Information}}?

Lately in Commons:Bots/Requests/Krdbot discussion a question of placement of {{Location}} template come up. User:Krd's Bot is planning on adding {{Object location}} templates to a lot of monument files (which I think is a great think to do), but plans to add them above {{Information}} template. I personally always add them below, and I think I mostly see them below. Do we have consensus on template location, or is it placed according to uploader preferences? --Jarekt (talk) 13:04, 1 September 2011 (UTC)

I feel this should be placed below. Esby (talk) 13:58, 1 September 2011 (UTC)
This has been discussed before in the context of User:DschwenBot. It originally added the template above information, because that is the simple thing to program. I put in a bit of effort, as the placement was not appreciated back then. I'd be happy to share my code. So there is no reason to go with the ugly and lazy option. --Dschwen (talk) 15:22, 1 September 2011 (UTC)
Ok, will make it so. Thank you. --Krd (talk) 18:18, 1 September 2011 (UTC)

Linking to Google Street View

Commons:Village_pump#Linking_to_Google_Street_View has interesting suggestion of adding link to Google_Street_View. I think it can be added to current location template, or a new template can be created. Any suggestions? --Jarekt (talk) 02:42, 17 September 2011 (UTC)

G Streetview can be called from the google link. I do not like to advertise Google here with more than one link. Maybe a direct link can be included in the big list at Geohack. Cheers --Saibo (Δ) 04:08, 18 September 2011 (UTC)
w:en:Wikipedia talk:WikiProject Geographical coordinates/Archive 25#Linking to panoramic views and GeoHack does support custom JavaScript. Dispenser (talk) 05:02, 25 September 2011 (UTC)

Add an optionnal parameter for OpenStreetMap

Please merge {{Object location}} with {{On OSM}} according to Commons:Village_pump#New_template_On_OSM. There is no need to have two links for OpenStreetMap so when we have the parameter OSM_ID (this parameter could be renamed) we can just replace the one with coordinates by this one. The explanations are on the talk above and here. Then we should also merge the documentations. The template should also work if there is the parameter OSM_ID but without latitude and longitude ones. Otourly (talk) 18:08, 7 November 2011 (UTC)

Where do you propose to add the link? Separate field below Location field, or some extra text below "This and other images at their locations on ...." line? --Jarekt (talk) 18:47, 7 November 2011 (UTC)
I think we should just replace the current OSM link only if the parameter OSM_ID is filled. But the template should also work with only the OSM_ID filled (and no latitude/longitude). Otourly (talk) 18:58, 7 November 2011 (UTC)
Is it more precise ? Is it possible ? Otourly (talk) 18:35, 9 November 2011 (UTC)
I do not think we should replace current link to OSM. Current link goes with "This and other images at their locations on ...." statement and adds a layer to OSM map of locations of Commons geocoded images. We do not want to replace that capability with some totally different information. --Jarekt (talk) 00:18, 10 November 2011 (UTC)
Ok, so we could add a link near the OpenStreetMap one with something like "center view of the object" Otourly (talk) 17:58, 10 November 2011 (UTC)
No, the current OSM link is already a "center view of the object". ;-) Maybe ". This object in OSM." as new text after the current text? Cheers --Saibo (Δ) 20:43, 10 November 2011 (UTC)
The new feature is a center and well-scaled view on map, two things that a manually-added coordinate can't be. It's long to load but it works also for countries like France. Otourly (talk) 21:47, 10 November 2011 (UTC)
Okay, after having a chat with otourly - this example:
This and other images at their locations on: Google Maps - Google Earth - OpenStreetMap - Proximityrama. View the outline on: OSM.
The link text is changed and the link URL. The metadata page http://www.openstreetmap.org/browse/way/58975404 is probably not very interesting for most users and the link to the bigger map with outline on the right side hard to find.
Cheers --Saibo (Δ) 22:57, 10 November 2011 (UTC)
For information [1] It's interesting about Otourly (talk) 23:11, 10 November 2011 (UTC)

Okay so what we do ? Otourly (talk) 19:15, 16 November 2011 (UTC)

It seems to me that we can link to 2 resources on OSM: outline and database page. I think that the outline should be added to {{GeoPolygon}}. --Jarekt (talk) 14:28, 1 December 2011 (UTC)
I have corrected the current template {{GeoPolygon}}. Contrary to the classic link of OSM this one goes directly to the OpenStreetMap's official servers (not fair). But User:Kolossos is working on a better system. Otourly (talk) 20:01, 1 December 2011 (UTC)
Ah, nice - we already have a template for the outline. We could think about merging (text see my example above) this functionality with the location templates to get a more clean appearance. Cheers --Saibo (Δ) 22:22, 1 December 2011 (UTC)
Yes we can :) Otourly (talk) 18:02, 2 December 2011 (UTC)
I think it would make more sense to merge {{On OSM}} and {{GeoPolygon}} and advice users to use {{Object location}} and {{GeoPolygon}} next to each other, as it is done on Category:Place du parlement de Bretagne that way we would not be messing with template used on 2.5 million pages to add functionality used on dozen pages. --Jarekt (talk) 20:19, 5 December 2011 (UTC)
Absolutely agree with this. --Dschwen (talk) 21:05, 5 December 2011 (UTC)
I think we need for the OSM link to enable the switch of type (way, node, relation) like I did on Template:GeoPolygon/link but not activated on Template:GeoPolygon. Because a way could be only a part of the object and not necessary the whole object. Otourly (talk) 18:53, 11 December 2011 (UTC)
The Template:GeoPolygon is not protected, so you can alter it. But if you do please alter Template:GeoPolygon/doc as well to explain why the change is useful and provide examples. --Jarekt (talk) 21:59, 11 December 2011 (UTC)

Default value for {{{9}}}

I suggest putting a default valuea for the 9th parameter. That is, change

| attributes = type:camera_{{{9}}}

to either

| attributes = type:camera_{{{9|}}}

or rather

| attributes = type:camera{{#if:{{{9|}}}|_{{{9}}}|}}

.

This helps avoid links like the one from File:Biserica_Mănăstirii_Brâncoveanu_(1).jpg.--Strainu (talk) 17:19, 26 December 2011 (UTC)

Pictogram voting keep.svg Fixed Thanks for finding this issue. The links were clearly incorrect, although I do not know if that made much of the difference to the final performance. --Jarekt (talk) 03:55, 28 December 2011 (UTC)