Template talk:Location

From Wikimedia Commons, the free media repository

Jump to: navigation, search

This Template is intended to complement Template:Information.

I would like to add location data to images. So new services will be possible later. E.g. "Show me all images in a radius of 50 km to my position." or "Show me all pictures of museums within 100 km." If this data will be available, I think new stuff hence unimaginable will become possible. It is basically the extension of the good work of WikiProjekt Georeferenzierung towards images or other media. It will be a lot of work, and I don't know if others would be interested. But it is worth a try.

It should be added to the image description pages on top of Template:Information. Else, the data would appear at the bottom beneath the licence information and could not possibly be found. It is too specialised to be included in the Template:Information itself. So, many times it would simply be left open without data, to the detriment of the appearance of the Template.

Longbow4u 14:14, 22 April 2006 (UTC)


Contents

[edit] Example for use

See: Image:Hildesheim-Hoher.Weg.Huckup.01.JPG

Syntax {{Location|Degree|Minute|Second|Latitude|Degree|Minute|Second|Longitude|Information attributes}}
Example {{Location|52|09|03.70|N|9|57|02.79|E|type:landmark_region:DE-NI_scale:5000}}

[edit] Explanation

The example is for a landmark in the region Germany (DE), Lower Saxony (Niedersachsen NI). By scale you request the mapping program to render the map in a scale of 1/5000.) Information attributes on landmark and region should always be added. Scale is an optional parameter and is not necessarily required. To find adequate parameters for other regions of the Earth, please look at the project pages in the English Wikipedia (w:en:Wikipedia:WikiProject Geographical coordinates or in the German Wikipedia (w:de:Wikipedia:WikiProjekt Georeferenzierung).

[edit] Discussion

Why don't we use {{coor_d}}, {{coor_dm}}, or {{coor_dms}}. Since with the possible applications you suggested the data would not need to be human-readable, just computer-readable, position on the image page would not matter at all. --Dschwen 14:41, 12 May 2006 (UTC)
Because the Template provides an extra link to the kvaleberg-server, where the users can find the place on a map or see an aerial picture of the area. It should be human AND machine-readable. I agree there should be a standard. But I think the other types are too cryptic. I got the idea when I shot a picture of a beautiful bridge Image:Walshausen-Lavesbridge.04.JPG in the countryside (the aerial photos currently used are not up to date and actually do not show the recently constructed bridge :-) ). But I immediately thought that it would be very difficult for another person without local knowledge to find this bridge to see for herself, because it was in thecountryside. So how could this problem be solved. The bridge did not warrant a proper article for itself (in de:wp articles are usually geocoded with link to kvaleberg-map-server). Then I set out to look for a useful template. I got a tip to "Template:Coor dms", but it was not self-explicatorily. So I changed it to Template:Location. I would love to talk about it on the next Stammtisch in Göttingen (Thursday, 18th May). I hope you will attend? Greetings, Longbow4u 18:16, 13 May 2006 (UTC)

[edit] Javascript Location-Template Generator

I'd like to draw some attention on my new javascript tool to generate and automatically insert filled-out Location-templates into your image descriptions. Check it out here: User:Dschwen#Coordinate_conversion_helper.

The tool adds a button and a textbox in edit mode. Paste a Google maps URL into the textbox and push the button, the GoogleMaps URL gets converted into a Location template and automatically inserted before the {{Information}}-box in your image description (or on top if no Infobox exists yet). --Dschwen 09:06, 15 May 2006 (UTC)

[edit] Region

More information on how to create the region would be nice. Regards, Ben Aveling 04:08, 11 November 2007 (UTC)

I believe region is not necessary in this template, because this information is redundant with the coordinates or the categories and usages is relative low. An other problem is that the input can't be automatical or supported by software. If you want to see a manual, look at en:Wikipedia:WikiProject_Geographical_coordinates#region:R. We have region since a long time in German Wikipedia but I can not see a real usage. So if nobody dissents me I will remove the parameter from the template-example. --Kolossos 09:17, 11 November 2007 (UTC)
Now that GeoHack finds the region automatically [1], a region parameter is only really needed in cases where it's not obvious from the coordinates (near borders, probably). So I think we can stop advertising the parameter here. I don't know how much effect it will have though, as many people are still using type:landmark too even though it's the default. --Para 12:15, 11 November 2007 (UTC)
Please do NOT remove this parameter: the scripts on the toolserver as well as the one on nsesoftware.nl are able to show or hide links to regional sites, depending on that parameter. - Erik Baas 16:09, 11 November 2007 (UTC)
But how many images have this parameter? --Kolossos 19:13, 14 November 2007 (UTC)
Is there no tool to check this? I cannot speak for everybody but I always use it (for own photographs and others I localize). --тнояsтеn 19:53, 14 November 2007 (UTC)
Answer from para: "4275 out of 22198, 19%" of the images have this information. I think this is too little to promote this parameter in future. @тнояsтеn: Do you only input the parameter or do you really use this information? And if yes, how do you use it? --Kolossos 20:32, 14 November 2007 (UTC)
Unfortunately, I am not an expert in analyzing templates or any other information given by geocodes images or articles. If there is no use for the region tags I will not use them in the future anymore. But is there any disadvantage if some use it and others don't? --тнояsтеn 21:08, 14 November 2007 (UTC)

[edit] Heading

What does this field actually do? Is heading info used in any interesting ways? --Padraic 20:50, 17 May 2008 (UTC)

It shows the view direction in Google Earth and Google maps and I think it's really interessting information. I hope this answer your question. --Kolossos 22:39, 17 May 2008 (UTC)
Ah, hadn't noticed that. --Padraic 16:25, 18 May 2008 (UTC)

[edit] Toolserver.org

Isn't be useful to change http://tools.wikimedia.de/~para/GeoCommons/GeoCommons-simple.kml to http://toolserver.org/~para/GeoCommons/GeoCommons-simple.kml ? --Ragimiri (talk) 11:52, 7 July 2008 (UTC)

Yes. ✓ Done. --Dschwen (talk) 13:07, 30 August 2008 (UTC)

[edit] Documentation

{{Editprotected}} I created a Documentation /doc sub-page.

✓ Done Forrester [[ hate+love letters ]] 21:25, 28 August 2008 (UTC)

Thank You. LeheckaG (talk) 00:16, 30 August 2008 (UTC)

[edit] Google Earth link

Would it be possible to change the google earth link so it DOESN'T add the wikimedia layers to your temporary folder? I end up with the same layer loaded about 20 times. -mattbuck (Talk) 23:19, 2 November 2008 (UTC)

Sometimes when I click some link somewhere (don't remember where, probably not on a Wikimedia site then), Google Earth tells me I already have it and asks if I want to reload it. Currently the link in this template gives a KML Folder element with the LookAt point to the coordinates and links to the Wikimedia layers. Perhaps there is some way to split the contents of the KML file so that it doesn't load duplicates? You can try finding out a way by copying the folder from Google Earth, pasting it to a text editor, editing it appropriately, and then copying and pasting back to Google Earth. I tried taking the LookAt point outside the folder, hoping that it would then notice that the content of the folder is an exact duplicate, but that didn't seem to change anything...
I think we should aim for maximum visibility, that the links lead to a view with all Commons content directly available, unlike the coordinates link. If it's not possible to make GE load the layers only once, it's a nuisance for people like us who use the link a lot, but instead of dropping it for users who have loaded it during the last five minutes or some other odd hack like that, how about we make a userscript that adds a simple placemark link? An additional link for all users might be confusing. --Para (talk) 21:42, 3 November 2008 (UTC)
Maybe just add a second link after it to just go to the coords. -mattbuck (Talk) 21:55, 3 November 2008 (UTC)
This ought to work in your Special:Mypage/monobook.js:
function addGoogleEarthLink() {
	var links = document.getElementsByTagName('A');
	var gelinks = new Array();
 
	for (var i=0; i<links.length; i++) {
		if (links[i].href.match(/GeoCommons\/earth.php/))
			gelinks.push(links[i]);
	}
 
	for (var i=0; i<gelinks.length; i++) {
		var latlon = gelinks[i].href.match(/latdegdec=([-.\d]+)&londegdec=([-.\d]+)/);
		if (latlon && latlon.length>2) {
			var a = document.createElement('A');
			a.href = 'http://maps.google.com/maps?&q=' + latlon[1] + ',' + latlon[2] + '&output=kml';
			a.innerHTML = ' (locate)';
			gelinks[i].parentNode.insertBefore(a, gelinks[i].nextSibling);
		}
	}
}
 
addOnloadHook(addGoogleEarthLink);
--Para (talk) 00:36, 4 November 2008 (UTC)

[edit] Geo microformat link typo

The Geo microformat link ought to be en:WP:GEOUF. Benchill (talk) 07:36, 3 November 2008 (UTC)

[edit] (Camera) Location ?

Hello,
is it necessary to write "Camera Location" in the template ? If it would just be "Location", it could be used also to specify, where music files were recorded. This information is present in many classical music files.
Teebeutel (talk) 19:31, 9 December 2008 (UTC)

[edit] Help with broken instance

I am new to the template, and made some errors using it, at File:Diner on Route 40 Delaware by Rothstein OWI.jpg. (I wanted to use decimal coordinates, and to specify a small mapping scale, as I don't know where on Route 40 the photo was taken. The Google Maps and Google Earth links ended up broken.) Could you guide me in correcting the page, please? --InfantGorilla (talk) 16:09, 16 December 2008 (UTC)

I still need help. --InfantGorilla (talk) 11:03, 26 January 2009 (UTC)

Yes check.svg Done. Thanks Para. --InfantGorilla (talk) 14:42, 26 January 2009 (UTC)

[edit] why an additional links

There is already a link to stable.toolserver.org, why linking to google maps and earth? please use the toolserver only, or link live maps, yahoo maps etc.

Because more people use those tools - google earth it adds wikimedia layers which is helpful. -mattbuck (Talk) 21:52, 19 December 2008 (UTC)

[edit] Category: Templates generating Geo ‎

{{editprotected}} Please add Category: Templates generating Geo. Thank you. Andy Mabbett (talk) 15:00, 24 January 2009 (UTC)

Added. --Dschwen (talk) 18:03, 24 January 2009 (UTC)
Thank you. Andy Mabbett (talk) 20:30, 25 January 2009 (UTC)

[edit] direction: "heading"

shouldn't we add point of the compass of the image? --W!B: (talk) 22:27, 4 March 2009 (UTC)

We should, and we are. At least people who know that the heading parameter does exist :-). example. --Dschwen (talk) 23:53, 4 March 2009 (UTC)
fine, i added some minor descriptions --W!B: (talk) 20:50, 11 March 2009 (UTC)

[edit] Internationalization of {{Location}} template

I created internationalized versions of 4 location templates:

Here is test image with those 4 templates: in english and polish version. All 4 templates use the same set of translation phrases and the same layout template. I am seeking comments before asking for upload of the first 2 templates. --Jarekt (talk) 12:56, 10 March 2009 (UTC)

✓ Done The above 4 templates are now internationalized --Jarekt (talk) 02:23, 17 March 2009 (UTC)
Nice work! --Dschwen (talk) 02:35, 17 March 2009 (UTC)

[edit] vcard

Original {{location}} source code had the following line: <span style="display:none" class="fn org">{{{name|{{PAGENAME}}}}}</span> which was copied to the current Template:Location/layout. Whatever was its intended use it is probably currently not working since {{{name}}} argument is not passes to the template. This can be fixed, but I was wandering what is the purpose of that line. w:HCard mentions "If the hCard is for an organization or venue, the fn and org classes are used on the same element, as in Wikipedia or Wembley Stadium." However this use do not make much sense in relation to {{location}}. Does anybody know if we need to keep this line?--Jarekt (talk) 13:31, 16 March 2009 (UTC)

The <span style="display:none" class="fn org">{{{name|{{PAGENAME}}}}}</span> line was removed from the template. --Jarekt (talk) 15:32, 18 March 2009 (UTC)
In a microformats aware browser, a page with fn org on it will enable the map button that when pressed would launch an internet map application for the location(s). Multiple locations can be emitted for a single article, and in the most popular implementation, the "fn" (full name) values appear as items in a menu when the map button is pressed. Without the fn org info, no items will appear. Currently, the only browser that I am aware of that handles microformats reliably is Firefox with the en:Operator (extension) installed. Major browsers have made noises about having full support for microformats in their coming version, but though Firefox (and possibly IE) has it implemented in native internal functions so far this has not materialized in the UI. Info on setup of Operator and example use for location as well as dates working on WP may be found here. Do you guys want this functionality back in this template? If so I will create a sandboxed version of location so that it will work again. -J JMesserly (talk) 17:13, 5 April 2009 (UTC)
I would like to see the microformat syntax back, it makes a lot of sense to have a microformat attached to a location. Note that images using the {{description}} template, already have a vcalendar microformat attached. Adding vcard (with geo) only incresases the usability. --Qyd (talk) 02:26, 7 April 2009 (UTC)
It does make sense, and my personal opinion is to have it back too, but the reality is that all commons visitors can use the Geohack links, whereas the only users that can navigate using the microformat emitted coords are those with firefox with the operator extension installed. Microformats is something that few template writers understand or care about and it keeps getting tripped over. I'd be happy to fix it, but if there are objections, I'd rather not waste time on something that's only going to get ripped out again. -J JMesserly (talk) 17:26, 7 April 2009 (UTC)
I removed it because I was cleaning up the location template family and could not find the purpose of this tag, and could not test if it works properly. Also, I merged 6 templates into one and I think only one of them had it. If it does serve a purpose please put it back in and verify that it works properly. Maybe add a note in the documentation about it. This discussion will (hopefully) prevent future removals. --Jarekt (talk) 01:58, 8 April 2009 (UTC)

(undent) Ok, I will take a look at it tomorrow. Is there any objection to adding an optional parameter #10 to all variants? This would be the proper name that corresponds to the geo location, and so there should be minimal internationalization issues (other than non latin transliterations). I cannot implicitly assume PAGENAME, since uploaded file names are usually poor candidates, and may refer not to the location, but the subject matter of the image. The name parameter can be optional because in these instances Operator for example gracefully degrades, displaying just the coordinates in the menu. Not too helpful to the commons user, but better than no text at all. -J JMesserly (talk) 17:52, 8 April 2009 (UTC)

About optional parameter #10 - I do not have objection, but it should be probably named parameter, since each template has different number of parameters, and some are optional. If I understand it correctly it will be a name of the object in the image, is it correct? If so than this tag will not be desired in case of geo-tagging plants, animals, landscapes, intersections, etc. Should this tag be applied only if this optional parameter is provided? Should we have a way to populate this field in old images? I assume that in majority of images it will not be provided since most people do not type the coordinates in directly but use one of the several processes to generate the text of this template. --Jarekt (talk) 13:20, 9 April 2009 (UTC)

[edit] More proposed changes to {{Location}} template family

✓ Done --Jarekt (talk) 12:35, 13 April 2009 (UTC)
  • I would like to propose unifying the output of {{Location}} and {{Location dec}} so both templates display numbers in degrees-minutes-seconds notation no matter what the input.
✓ Done --Jarekt (talk) 13:11, 23 March 2009 (UTC)
  • I would like to propose to slim down the look of the {{Location}} template to one line:
Camera location Coordinates This and other images at their location on: Google Maps - Google Earth (Info)
✓ Done --Jarekt (talk) 13:11, 23 March 2009 (UTC)

--Jarekt (talk) 15:53, 18 March 2009 (UTC)

All instances of {{Location dms}} and {{Location d}} are replaced now with {{Location}} and {{Location dec}}. Should we delete those redirects or keep them as is. Deleting would simplify maintenance and cut down on clutter, but some people like (and use) the alternative names. --Jarekt (talk) 16:40, 9 April 2009 (UTC)

Delete them. --Slomox (talk) 11:37, 10 April 2009 (UTC)
Ok, I marked {{Location d}} as a duplicate, but {{Location dms}} is protected so I can not mark it for deletion. An admin will have to do it.--Jarekt (talk) 12:16, 10 April 2009 (UTC)
Done. --Slomox (talk) 14:05, 10 April 2009 (UTC)

Also, for anyone interested in location templates. Please voice your opinion in:

--Jarekt (talk) 03:20, 11 April 2009 (UTC)

[edit] altitude/depth yet?

Has the status on altitude changed yet? That is, can I add altitude as one of the extended parameters. Eg. so that google earth altitude (absolute mode) will use it? -J JMesserly (talk) 18:17, 4 April 2009 (UTC)

Changed from what? You can add altitude~(the same way you specify heading), and User:DschwenBot does extract it from GPS data. Whether Google uses it is something that someone at Google should answer. --Dschwen (talk) 18:50, 4 April 2009 (UTC)
I'm refering to the geohack code. Your extraction looks great. Changed from what? Well, Geohack from not passing anything. For example, File:Acanthogorgia- Gold coral- noaa.jpg has an alt of -1950 or so meters (deepsea photo). The value is not passed to any of the sites on the geohack page (as far as I can see). I am putting alt:-1950 as the last param. -J JMesserly (talk) 00:17, 5 April 2009 (UTC)
can any of the sites use it? --Dschwen (talk) 00:49, 5 April 2009 (UTC)
I know Google Earth can. Turn on the Ocean layer, click on the google earth link from my gold coral page, and you will be able to dive under the water and view the davidson mount from the side. Click the commons pushpin for the image, and you will see that you can set the altitude- I think its the last tab. I don't know what their parameter is so that it may be passed from geohack page. -J JMesserly (talk) 01:39, 5 April 2009 (UTC)

[edit] More Error checking

In order to catch more types of incorrectly formatted input parameters I would like to add and {{#if: {{{10|}}} |0|1}} to {{location}} to catch templates with too many parameters. Other 3 templates already check for that condition. --Jarekt (talk) 13:23, 21 July 2009 (UTC)

Done. --Slomox (talk) 19:33, 21 July 2009 (UTC)
thanks --Jarekt (talk) 20:04, 21 July 2009 (UTC)

[edit] OpenStreetMap

I know this is a totally freetarded comment but...

Should this template be designed to give a little more link-love to the free and open collaborative wiki-style project OpenStreetMap.org, and little less to google.inc?

-- Harry Wood (talk) 00:00, 23 September 2009 (UTC)

+1 Raymond 07:34, 23 September 2009 (UTC)
+2 OSM is in a state where it is starting to make sense to include it. --Dschwen (talk) 23:14, 23 September 2009 (UTC)
+3 I also want to see images in OSM. But who write a tool like para's in OpenLayers? Or could we live with OSM-tiles and GoogleMaps-API in the backround? Than I could provide such a thing fast. --Kolossos (talk) 19:45, 24 September 2009 (UTC)
I assume most people realize that OpenStreetMap is on the long list of sites any geo-taged file can use for visualizing its location (by clicking on coordinates and choosing OpenStreetMap). However it is not on a short list of sites for which more specialized tools are written, like the one by Para. I am all for collaboration with OpenStreetMap.org but this site still have rather limited capabilities. I tried search for my home address - and got an error. I viewed location some of my files, like File:Joshua Tree - Room to Shroom.jpg and the results are quite disappointing due to lack of satellite images. That is one reason I will likely still favor Google Maps or WikiMapia. But may be we can convince OpenStreetMap.org people to directly use images from commons, like Google is using images from Panoramio? this kind of collaboration might help both projects. --Jarekt (talk) 21:07, 24 September 2009 (UTC)

[edit] Recent changes

As some of you might have noticed there were several changes to the location template mainly template:location/layout :

  1. A link to OpenStreetMap was added, see Template_talk:Location#OpenStreetMap - at the moment it displays only the location of a single image but hopefully we will have in the future support for displaying many Commons images on the same map the way we do it in Google Maps.
  2. {{Globe location}} template was added for geotagging other globes than earth, see Commons_talk:Geocoding#Geocodding_mars. {{Globe location}} can take coordinates as 2 numbers {{location dec}} style and as 8 fields {{location}} and adds an extra parameter to specify globe. Supported values are: moon, mars, venus, mercury, ganymede, and titan. (see w:Template:Coord#globe:G for details). In addition direct links to google maps are supported for Mars and Moon.
  3. Better support for languages other than English with direct links to language specific versions of Google Maps and GeoHack (link behind coordinates)
  4. More error checking was added which populates Category:Media with erroneous locations. This time it was range checking on final latitude and longitude.

As a result of addition of {{Globe location}} more text has to be translated and added to all language subtemplates Беларуская (тарашкевіца) | Català | Česky | Deutsch | English | Español | Eesti | Euskara | Suomi | Français | Galego | עברית | Magyar | Italiano | 한국어 | Lietuvių | Македонски | Plattdüütsch | Nederlands | Polski | Português | Română | Русский | Српски / Srpski | ไทย | Vèneto | +/− . See Template:Location/doc#Translation for details. --Jarekt (talk) 05:01, 8 November 2009 (UTC)