CINXE.COM

View source for Module:Coordinates - Wikimedia Commons

<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>View source for Module:Coordinates - Wikimedia Commons</title> <script>(function(){var className="client-js";var cookie=document.cookie.match(/(?:^|; )commonswikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"4faa8935-e1ea-4f13-8aa7-c0e9ec9eefa1","wgCanonicalNamespace":"Module","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":828,"wgPageName":"Module:Coordinates","wgTitle":"Coordinates","wgCurRevisionId":912732891,"wgRevisionId":0,"wgArticleId":29471579,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"], "wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"Scribunto","wgRelevantPageName":"Module:Coordinates","wgRelevantArticleId":29471579,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":["templateeditor"],"wgRestrictionMove":["templateeditor"],"wgNoticeProject":"commons","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":false,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":40000,"wgCodeEditorCurrentLanguage":"lua","wgCentralAuthMobileDomain":false,"upwizPropertyTitles":{"P180":"Main subjects visible in this work"},"upwizPropertyPlaceholders":{"P180":"e.g., Angolan giraffe"},"upwizPropertyCopyLabels":{"P180":"Main subjects"},"wgEditSubmitButtonLabelPublish" :true,"wgULSPosition":"personal","wgULSisCompactLinksEnabled":true,"wgVector2022LanguageInHeader":false,"wgULSisLanguageSelectorEmpty":false,"wbmiDefaultProperties":["P180"],"wbmiPropertyTitles":{"P180":"Items portrayed in this file"},"wbmiPropertyTypes":{"P180":"wikibase-item"},"wbmiRepoApiUrl":"/w/api.php","wbmiHelpUrls":{"P180":"https://commons.wikimedia.org/wiki/Special:MyLanguage/Commons:Depicts"},"wbmiExternalEntitySearchBaseUri":"https://www.wikidata.org/w/api.php","wbmiSupportedDataTypes":["wikibase-item","string","quantity","time","monolingualtext","external-id","globe-coordinate","url"],"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={"ext.gadget.Long-Image-Names-in-Categories":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.codeEditor.styles":"ready", "skins.vector.styles.legacy":"ready","ext.charinsert.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","codex-search-styles":"ready","ext.uls.pt":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.codeEditor","ext.scribunto.edit","mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","skins.vector.legacy.js","ext.centralNotice.geoIP","ext.charinsert","ext.gadget.Slideshow","ext.gadget.ZoomViewer","ext.gadget.CollapsibleTemplates","ext.gadget.fastcci","ext.gadget.Stockphoto","ext.gadget.WatchlistNotice","ext.gadget.AjaxQuickDelete","ext.gadget.WikiMiniAtlas","ext.gadget.LanguageSelect","ext.gadget.PictureOfTheYearEnhancements","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.wikimediaEvents.wikibase","ext.navigationTiming","ext.uls.compactlinks","ext.uls.interface", "ext.checkUser.clientHints","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=codex-search-styles%7Cext.charinsert.styles%7Cext.codeEditor.styles%7Cext.uls.pt%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cskins.vector.styles.legacy&amp;only=styles&amp;skin=vector"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.gadget.Long-Image-Names-in-Categories&amp;only=styles&amp;skin=vector"> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,nofollow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="View source for Module:Coordinates - Wikimedia Commons"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//commons.m.wikimedia.org/wiki/Module:Coordinates"> <link rel="apple-touch-icon" href="/static/apple-touch/commons.png"> <link rel="icon" href="/static/favicon/commons.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikimedia Commons"> <link rel="EditURI" type="application/rsd+xml" href="//commons.wikimedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://commons.wikimedia.org/wiki/Module:Coordinates"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"> <link rel="alternate" type="application/atom+xml" title="Wikimedia Commons Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="codeeditor-loading skin-vector-legacy mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-828 ns-subject page-Module_Coordinates rootpage-Module_Coordinates skin-vector action-edit"><div id="mw-page-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div> <div id="content" class="mw-body" role="main"> <a id="top"></a> <div id="siteNotice"><!-- CentralNotice --></div> <div class="mw-indicators"> </div> <h1 id="firstHeading" class="firstHeading mw-first-heading">View source for Module:Coordinates</h1> <div id="bodyContent" class="vector-body"> <div id="contentSub"><div id="mw-content-subtitle">← <a href="/wiki/Module:Coordinates" title="Module:Coordinates">Module:Coordinates</a></div></div> <div id="contentSub2"></div> <div id="jump-to-nav"></div> <a class="mw-jump-link" href="#mw-head">Jump to navigation</a> <a class="mw-jump-link" href="#searchInput">Jump to search</a> <div id="mw-content-text" class="mw-body-content"><p>You do not have permission to edit this page, for the following reasons: </p> <ul class="permissions-errors"><li class="mw-permissionerror-protectedpagetext"><div class="mw-parser-output"> <div id="mw-protectedpagetext"> <style data-mw-deduplicate="TemplateStyles:r919301499">.mw-parser-output .fmbox{clear:both;margin:0.2em 0;width:100%;border:1px solid #a2a9b1;background-color:var(--background-color-interactive-subtle,#f8f9fa);box-sizing:border-box;color:var(--color-base,#202122)}.mw-parser-output .fmbox-warning{border:1px solid #bb7070;background-color:#ffdbdb}.mw-parser-output .fmbox-editnotice{background-color:transparent}.mw-parser-output .fmbox .mbox-text{border:none;padding:0.25em 0.9em;width:100%}.mw-parser-output .fmbox .mbox-image{border:none;padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .fmbox .mbox-imageright{border:none;padding:2px 0.9em 2px 0;text-align:center}.mw-parser-output .fmbox .mbox-invalid-type{text-align:center}@media screen{html.skin-theme-clientpref-night .mw-parser-output .fmbox-warning{background-color:#300}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .fmbox-warning{background-color:#300}}</style><table class="plainlinks fmbox fmbox-editnotice" role="presentation"><tbody><tr><td class="mbox-image"><figure class="mw-halign-left" typeof="mw:File"><a href="/wiki/File:Template-protection-shackle-brackets_2.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Template-protection-shackle-brackets_2.svg/100px-Template-protection-shackle-brackets_2.svg.png" decoding="async" width="100" height="100" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Template-protection-shackle-brackets_2.svg/150px-Template-protection-shackle-brackets_2.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Template-protection-shackle-brackets_2.svg/200px-Template-protection-shackle-brackets_2.svg.png 2x" data-file-width="512" data-file-height="512" /></a><figcaption></figcaption></figure></td><td class="mbox-text"><dl><dt style=""><strong style="font-size:130%">This page is currently protected, and can be edited only by <a href="/wiki/Commons:Template_editor" class="mw-redirect" title="Commons:Template editor">template editors</a> and <a href="/wiki/Commons:A" class="mw-redirect" title="Commons:A">administrators</a>.</strong></dt></dl> <ul><li>Some <a href="/wiki/Commons:Templates" title="Commons:Templates">templates</a> and site interface pages are permanently <a href="/wiki/Commons:Page_protection#Types_of_protection" class="mw-redirect" title="Commons:Page protection">protected</a> due to visibility or risk.</li> <li>The reason for protection can be found in the <span class="plainlinks"><a class="external text" href="https://commons.wikimedia.org/w/index.php?title=Special:Log&amp;type=protect&amp;page=Module:Coordinates">protection log</a></span>.</li> <li>You can <a href="/wiki/Module_talk:Coordinates" title="Module talk:Coordinates">discuss this page</a> with others. If you have noticed an error or have a suggestion for a simple change, start a <span class="plainlinks"><a class="external text" href="https://commons.wikimedia.org/w/index.php?title=Module_talk:Coordinates&amp;action=edit&amp;section=new">new section</a></span> and insert the text <code>&#123;{edit request}&#125;</code> followed by your request. A template editor or an administrator may then make the change on your behalf.</li> <li>You may also test proposed changes in the <a href="/wiki/Module:Coordinates/sandbox" title="Module:Coordinates/sandbox">template's sandbox</a>.</li> <li>You may <a href="/wiki/Commons:Administrators%27_noticeboard/Blocks_and_protections" title="Commons:Administrators&#39; noticeboard/Blocks and protections">request unprotection</a> of the page.</li></ul></td></tr></tbody></table></div></div></li></ul> <li class="mw-permissionerror-globalblocking-blockedtext-range"><b>Your IP address is in a range that has been <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Global_blocks" class="extiw" title="m:Special:MyLanguage/Global blocks">blocked on all Wikimedia Foundation wikis</a>.</b> <p>The block was made by <a href="/wiki/User:Jon_Kolbert" title="User:Jon Kolbert">‪Jon Kolbert‬</a>. The reason given is <i><a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/NOP" class="extiw" title="m:Special:MyLanguage/NOP">Open proxy/Webhost</a>: See the <a href="https://meta.wikimedia.org/wiki/WM:OP/H" class="extiw" title="m:WM:OP/H">help page</a> if you are affected </i>. </p> <ul><li>Start of block: 15:12, 27 August 2023</li> <li>Expiry of block: 15:12, 27 August 2028</li></ul> <p>Your current IP address is 8.222.208.146. The blocked range is 8.222.128.0/17. </p><p>Please include all above details in any queries you make. If you believe you were blocked by mistake, you can find additional information and instructions in the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/No_open_proxies" class="extiw" title="m:Special:MyLanguage/No open proxies">No open proxies</a> global policy. </p> Otherwise, to discuss the block please <a href="https://meta.wikimedia.org/wiki/Steward_requests/Global" class="extiw" title="m:Steward requests/Global">post a request for review on Meta-Wiki</a>. You could also send an email to the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Stewards" class="extiw" title="m:Special:MyLanguage/Stewards">stewards</a> <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/VRT" class="extiw" title="m:Special:MyLanguage/VRT">VRT</a> queue at <kbd>stewards@wikimedia.org</kbd> including all above details.</li><hr /> <p>You can view and copy the source of this page. </p><textarea readonly="" accesskey="," id="wpTextbox1" cols="80" rows="25" style="" class="mw-editfont-monospace" lang="en" dir="ltr" name="wpTextbox1">--[[ __ __ _ _ ____ _ _ _ | \/ | ___ __| |_ _| | ___ _ / ___|___ ___ _ __ __| (_)_ __ __ _| |_ ___ ___ | |\/| |/ _ \ / _` | | | | |/ _ (_) | / _ \ / _ \| '__/ _` | | '_ \ / _` | __/ _ \/ __| | | | | (_) | (_| | |_| | | __/_| |__| (_) | (_) | | | (_| | | | | | (_| | || __/\__ \ |_| |_|\___/ \__,_|\__,_|_|\___(_)\____\___/ \___/|_| \__,_|_|_| |_|\__,_|\__\___||___/ This module is intended to provide functionality of {{location}} and related templates. It was developed on Wikimedia Commons, so if you find this code on other sites, check there for updates and discussions. Please do not modify this code without applying the changes first at Module:Coordinates/sandbox and testing at Module:Coordinates/sandbox/testcases and Module talk:Coordinates/sandbox/testcases. Authors and maintainers: * User:Jarekt * User:Ebraminio Functions: *function p.LocationTemplateCore(frame) **function p.GeoHack_link(frame) ***function p.lat_lon(frame) ****function p._deg2dms(deg,lang) ***function p.externalLink(frame) ****function p._externalLink(site, globe, latStr, lonStr, lang, attributes) **function p._getHeading(attributes) **function p.externalLinksSection(frame) ***function p._externalLink(site, globe, latStr, lonStr, lang, attributes) *function p.getHeading(frame) *function p.deg2dms(frame) ]] -- ======================================= -- === Dependencies ====================== -- ======================================= require('strict') -- used for debugging purposes as it detects cases of unintended global variables local i18n = require('Module:I18n/coordinates') -- get localized translations of site names local core = require('Module:Core') -- ======================================= -- === Hardwired parameters ============== -- ======================================= -- =========================================================== -- Angles associated with each abbreviation of compass point names. See [[:en:Points of the compass]] local compass_points = { N = 0, NBE = 11.25, NNE = 22.5, NEBN = 33.75, NE = 45, NEBE = 56.25, ENE = 67.5, EBN = 78.75, E = 90, EBS = 101.25, ESE = 112.5, SEBE = 123.75, SE = 135, SEBS = 146.25, SSE = 157.5, SBE = 168.75, S = 180, SBW = 191.25, SSW = 202.5, SWBS = 213.75, SW = 225, SWBW = 236.25, WSW = 247.5, WBS = 258.75, W = 270, WBN = 281.25, WNW = 292.5, NWBW = 303.75, NW = 315, NWBN = 326.25, NNW = 337.5, NBW = 348.75, } -- =========================================================== -- files to use for different headings local heading_icon = { [ 1] = 'File:Compass-icon bb N.svg', [ 2] = 'File:Compass-icon bb NbE.svg', [ 3] = 'File:Compass-icon bb NNE.svg', [ 4] = 'File:Compass-icon bb NEbN.svg', [ 5] = 'File:Compass-icon bb NE.svg', [ 6] = 'File:Compass-icon bb NEbE.svg', [ 7] = 'File:Compass-icon bb ENE.svg', [ 8] = 'File:Compass-icon bb EbN.svg', [ 9] = 'File:Compass-icon bb E.svg', [10] = 'File:Compass-icon bb EbS.svg', [11] = 'File:Compass-icon bb ESE.svg', [12] = 'File:Compass-icon bb SEbE.svg', [13] = 'File:Compass-icon bb SE.svg', [14] = 'File:Compass-icon bb SEbS.svg', [15] = 'File:Compass-icon bb SSE.svg', [16] = 'File:Compass-icon bb SbE.svg', [17] = 'File:Compass-icon bb S.svg', [18] = 'File:Compass-icon bb SbW.svg', [19] = 'File:Compass-icon bb SSW.svg', [20] = 'File:Compass-icon bb SWbS.svg', [21] = 'File:Compass-icon bb SW.svg', [22] = 'File:Compass-icon bb SWbW.svg', [23] = 'File:Compass-icon bb WSW.svg', [24] = 'File:Compass-icon bb WbS.svg', [25] = 'File:Compass-icon bb W.svg', [26] = 'File:Compass-icon bb WbN.svg', [27] = 'File:Compass-icon bb WNW.svg', [28] = 'File:Compass-icon bb NWbW.svg', [29] = 'File:Compass-icon bb NW.svg', [30] = 'File:Compass-icon bb NWbN.svg', [31] = 'File:Compass-icon bb NNW.svg', [32] = 'File:Compass-icon bb NbW.svg' } -- =========================================================== -- URL definitions for different sites. Strings: $lat, $lon, $lang, $attr, $page will be -- replaced with latitude, longitude, language code, GeoHack attribution parameters and full-page-name strings. local SiteURL = { GeoHack = 'https://geohack.toolforge.org/geohack.php?pagename=$page&amp;params=$lat_N_$lon_E_$attr&amp;language=$lang', --GoogleEarth = '//geocommons.toolforge.org/earth.kml?latdegdec=$lat&amp;londegdec=$lon&amp;scale=10000&amp;commons=1', Proximityrama = 'https://tools.wmflabs.org/geocommons/proximityrama?latlon=$lat,$lon', WikimediaMap = 'https://maps.wikimedia.org/#16/$lat/$lon', --OpenStreetMap1 = '//wiwosm.toolforge.org/osm-on-ol/commons-on-osm.php?zoom=16&amp;lat=$lat&amp;lon=$lon', OpenStreetMap1 = 'https://wikimap.toolforge.org/?wp=false&amp;cluster=false&amp;zoom=16&amp;lat=$lat&amp;lon=$lon', --OpenStreetMap2 = 'https://tools.wmflabs.org/osm4wiki/cgi-bin/wiki/wiki-osm.pl?project=Commons&amp;article=$page&amp;l=$level', OpenStreetMap2 = 'https://osm4wiki.toolforge.org/cgi-bin/wiki/wiki-osm.pl?project=Commons&amp;article=$page&amp;l=$level', GoogleMaps = { Mars = 'https://www.google.com/mars/#lat=$lat&amp;lon=$lon&amp;zoom=8', Moon = 'https://www.google.com/moon/#lat=$lat&amp;lon=$lon&amp;zoom=8', Earth = 'https://wp-world.toolforge.org/googlmaps-proxy.php?page=http://kmlexport.toolforge.org/%3Fproject%3DCommons%26article%3D$page&amp;l=$level&amp;output=classic' } } -- =========================================================== -- Categories local CoorCat = { -- File = '[[Category:Media with locations]]', -- Gallery = '[[Category:Galleries with coordinates]]', -- Category = '[[Category:Categories with coordinates]]', strucData0 = '[[Category:Pages with %s coordinates from %s]]', strucData1 = '[[Category:Pages with local %s coordinates and matching %s coordinates]]', strucData2 = '[[Category:Pages with local %s coordinates and similar %s coordinates]]', strucData3 = '[[Category:Pages with local %s coordinates and mismatching %s coordinates]]', strucData4 = '[[Category:Pages with local %s coordinates and missing %s coordinates]]', sHeading3 = '[[Category:Pages with local %s heading and mismatching %s heading]]', sHeading4 = '[[Category:Pages with local %s heading and missing %s heading]]', sHeading5 = '[[Category:Pages with local %s heading:0 and missing %s heading]]', globe = '[[Category:Media with %s locations]]', default = '[[Category:Media with default locations]]', attribute = '[[Category:Media with erroneous geolocation attributes]]', erroneous = '[[Category:Media with erroneous locations]]', dms = '[[Category:Media with coordinates in DMS format]]' } local globeLUT = { Q2='Earth', Q111='Mars', Q405='Moon'} local NoLatLonString = 'latitude, longitude' -- ======================================= -- === Local Functions =================== -- ======================================= ------------------------------------------------------------------------------- local function getProperty(entity, prop) return (core.parseStatements(entity:getBestStatements( prop ), nil) or {nil})[1] end -- =========================================================== local function add_maplink(lat, lon, marker, text) local tstr = '' if text then tstr = string.format('text="%s" ', text) end return string.format('&lt;maplink %szoom="13" latitude="%f" longitude="%f" class="no-icon">{'.. ' "type": "Feature",'.. ' "geometry": { "type":"Point", "coordinates":[%f, %f] },'.. ' "properties": { "marker-symbol":"%s", "marker-size": "large", "marker-color": "0050d0" }'.. '}&lt;/maplink>', tstr, lat, lon, lon, lat, marker) end -- =========================================================== local function add_maplink2(lat1, lon1, lat2, lon2) return string.format('&lt;maplink zoom="13" latitude="%f" longitude="%f" class="no-icon">[{'.. ' "type": "Feature",'.. ' "geometry": { "type":"Point", "coordinates":[%f, %f] },'.. ' "properties": { "marker-symbol":"c", "marker-size": "large", "marker-color": "0050d0", "title": "Location on Wikimedia Commons" }'.. '},{'.. ' "type": "Feature",'.. ' "geometry": { "type":"Point", "coordinates":[%f, %f] },'.. ' "properties": { "marker-symbol":"w", "marker-size": "large", "marker-color": "228b22", "title": "Location on Wikidata" }'.. '}]&lt;/maplink>', lat2, lon2, lon1, lat1, lon2, lat2) end -- =========================================================== local function info_box(text) return string.format('&lt;table class="messagebox plainlinks layouttemplate" style="border-collapse:collapse; border-width:2px; border-style:solid; width:100%%; clear: both; '.. 'border-color:#f28500; background:#ffe;direction:ltr; border-left-width: 8px; ">'.. '&lt;tr>'.. '&lt;td class="mbox-image" style="padding-left:.9em;">'.. ' [[File:Commons-emblem-issue.svg|class=noviewer|45px]]&lt;/td>'.. '&lt;td class="mbox-text" style="">%s&lt;/td>'.. '&lt;/tr>&lt;/table>', text) end -- =========================================================== local function distance(lat1, lon1, lat2, lon2) -- calculate distance local dLat = math.rad(lat1-lat2) local dLon = math.rad(lon1-lon2) local d = math.pow(math.sin(dLat/2),2) + math.pow(math.sin(dLon/2),2) * math.cos(math.rad(lat1)) * math.cos(math.rad(lat2)) d = 2 * math.atan2(math.sqrt(d), math.sqrt(1-d)) -- angular distance in radians d = 6371000 * d -- radians to meters conversion d = math.floor(d+0.5) -- round it to even meters return d end -- =========================================================== local function getSDCoords(entity, prop) -- get coordinates from structured data (either wikidata or SDC) local coords = {id=entity.id, source=prop} if not entity or not entity.claims or not entity.claims[prop]then return coords end for _, statement in pairs( entity:getBestStatements( prop )) do local v = statement.mainsnak.datavalue.value -- get coordinates if v.latitude then coords.lat = v.latitude coords.lon = v.longitude coords.prec = v.precision or 1e-4 coords.prec = math.floor(coords.prec*111000) -- convert precision from degrees to meters and round coords.prec = math.max(math.min(coords.prec,111000),5) -- bound precision to a number between 5 meters and 1 degree coords.globe = string.gsub(v.globe, 'http://www.wikidata.org/entity/','') coords.globe = globeLUT[coords.globe] if statement.qualifiers and statement.qualifiers.P7787 then v = statement.qualifiers.P7787[1].datavalue.value if v.unit == "http://www.wikidata.org/entity/Q28390" then -- in degrees coords.heading = v.amount elseif v.unit == "http://www.wikidata.org/entity/Q33680" then -- in radians coords.heading = v.amount*57.2957795131 end end return coords end end return coords end -- =========================================================== local function compareCoords(loc, sd, mode, source) -- compare coordinates --INPUTS: -- * loc - local coordinates -- * sd - structured data coords local coord = loc local cat, dist_str = '', '' local case, dist, qs, mapLink, message dist=0 if not loc.lat or not loc.lon then -- structured data/wikidata coordinates only coord = sd --cat = string.format(CoorCat.strucData0, mode, source) case = 0 elseif loc.lat and loc.lon and not sd.lat and not sd.lon then cat = string.format(CoorCat.strucData4, mode, source) case = 4 -- local coordinates only elseif loc.lat and loc.lon and sd.lat and sd.lon then dist = distance(loc.lat, loc.lon, sd.lat, sd.lon) -- calculate distance dist_str = string.format(' (discrepancy of %i meters between the above coordinates and the ones stored on Wikidata)', dist) -- will be displayed when hovering a mouse above wikidata icon if dist&lt;20 or dist&lt;sd.prec then -- will consider location within 20 meters or precision distance as the same if source=='Wikidata' then cat = string.format(CoorCat.strucData1, mode, source) end case = 1 elseif (dist&lt;1000 or dist&lt;5*sd.prec) and mode=='object' then --cat = string.format(CoorCat.strucData2, mode, source) case = 2 else -- locations 1 km off and 5 precision distances away are likely wrong. The issue might be with wrong precission mapLink = mw.getCurrentFrame():preprocess(add_maplink2(loc.lat, loc.lon, sd.lat, sd.lon)) -- fancy link to OSM message = string.format("There is a discrepancy of %i meters between the above coordinates and the ones stored at %s (%s, precision: %i m). Please [[Commons:Structured data/Reconciliation|reconcile them]]. ", dist, source, mapLink, sd.prec) cat = string.format(CoorCat.strucData3, mode, source) .. info_box(message) case = 3 end end if not loc.heading and sd.heading then -- structured data/wikidata heading only coord.heading = sd.heading elseif loc.heading==0 and not sd.heading and sd.lat and sd.lon then -- local heading only cat = cat .. string.format(CoorCat.sHeading5, mode, source) elseif loc.heading and not sd.heading and sd.lat and sd.lon then -- local heading only cat = cat .. string.format(CoorCat.sHeading4, mode, source) elseif loc.heading and sd.heading then local dh = math.abs(math.fmod(loc.heading,360) - math.fmod(sd.heading,360)) if dh>1 and dh&lt;359 then message = string.format("There is a discrepancy of %i degrees between the above camera heading (set to %i) and the ones stored at %s (set to %i). Please [[Commons:Structured data/Reconciliation|reconcile them]]. ", dh, loc.heading, source, sd.heading) cat = cat .. string.format(CoorCat.sHeading3, mode, source) .. info_box(message) end end if source=='Wikidata' and case>=3 then local url = mw.title.getCurrentTitle():canonicalUrl() local today = '+' .. os.date('!%F') .. 'T00:00:00Z/11' -- today's date in QS format qs = string.format('%s|P625|@%09.5f/%09.5f|S143|Q565|S813|%s|S4656|"%s"', sd.wID, loc.lat, loc.lon, today, url) qs = string.gsub (mw.uri.encode(qs),'%%2520','%%20') qs = 'https://quickstatements.toolforge.org/#/v1=' .. qs -- create full URL link qs = string.format("[[File:Commons_to_Wikidata_QuickStatements.svg|15px|link=%s|Copy geo coordinates to Wikidata]]", qs) end local ret = {dist_str=dist_str, case=case, qs=qs } return coord, cat, ret end -- Check if location of creation (P1071) is set local function checkLocationOfCreation(entity, lat, lon) local cat = '' local latFloor, lonFloor, latAbs, lonAbs if entity and entity.statements and entity.statements['P1071'] then return cat end latFloor = math.floor(lat) lonFloor = math.floor(lon) latAbs = math.abs(latFloor) lonAbs = math.abs(lonFloor) -- This is a rough bounding box of the Netherlands and part of neighbor countries as a pilot if (48 &lt;= latFloor) and (latFloor &lt; 54) and (0 &lt;= lonFloor) and (lonFloor &lt; 12) then cat = string.format("[[Category:Files with coordinates missing SDC location of creation (%s° N, %s° E)]]", latAbs, lonAbs) return cat -- Part of the United Kingdom elseif (50 &lt;= latFloor) and (latFloor &lt; 56) and (-5 &lt;= lonFloor) and (lonFloor &lt; 0) then cat = string.format("[[Category:Files with coordinates missing SDC location of creation (%s° N, %s° W)]]", latAbs, lonAbs) return cat -- Canberra and Sydney elseif (-36 &lt;= latFloor) and (latFloor &lt; -33) and (149 &lt;= lonFloor) and (lonFloor &lt; 152 ) then cat = string.format("[[Category:Files with coordinates missing SDC location of creation (%s° S, %s° E)]]", latAbs, lonAbs) return cat -- Buenos Aires and Montevideo elseif (-36 &lt;= latFloor) and (latFloor &lt; -33) and (-58 &lt;= lonFloor) and (lonFloor &lt; -55) then cat = string.format("[[Category:Files with coordinates missing SDC location of creation (%s° S, %s° W)]]", latAbs, lonAbs) return cat end cat = '[[Category:Files with coordinates missing SDC location of creation]]' return cat end -- =========================================================== local function dms2deg_ ( d, m, s, h ) d,m,s = tonumber(d), tonumber(m), tonumber(s) if not (d and m and s and h) then return nil end local LUT = {N=1, S=-1, E=1, W=-1} -- look up table h = LUT[mw.ustring.upper( h )] if not h then return nil end return h * (d + m/60.0 + s/3600.0) end -- =========================================================== local function dms2deg ( dms ) local ltab = mw.text.split(dms:gsub("[°'′″\",%s]+" , "/" ):gsub("^%/", ""), "/") local degre = dms2deg_ (ltab[1], ltab[2], ltab[3], ltab[4]) --return dms .. '->' .. dms:gsub("[°'′″\",%s]+" , "/" ):gsub("^%/", "") .. '->' .. (degre or 'nil') return degre or dms end -- ======================================= -- === External Functions ================ -- ======================================= local p = {} p.debug = 'nothing' -- parse attribute variable returning desired field (used for debugging) function p.parseAttribute(frame) return string.match(mw.text.decode(frame.args[1]), mw.text.decode(frame.args[2]) .. ':' .. '([^_]*)') or '' end -- =========================================================== -- Helper core function for getHeading. function p._getHeading(attributes) if attributes == nil then return nil end local hStr = string.match(mw.text.decode(attributes), 'heading:([^_]*)') if hStr == nil then return nil end local hNum = tonumber( hStr ) if hNum == nil then hStr = string.upper (hStr) hNum = compass_points[hStr] end if hNum then hNum = hNum%360 end return hNum end --[[============================================================================ Parse attribute variable returning heading field. If heading is a string than try to convert it to an angle ==============================================================================]] function p.getHeading(frame) local attributes if frame.args[1] then attributes = frame.args[1] elseif frame.args.attributes then attributes = frame.args.attributes else return '' end local hNum = p._getHeading(attributes) if hNum == nil then return '' end return tostring(hNum) end --[[============================================================================ Helper core function for deg2dms. deg2dms can be called by templates, while _deg2dms should be called from Lua. Inputs: * degree - positive coordinate in degrees * degPrec - coordinate precision in degrees will result in different angle format * lang - language to used when formatting the number ==============================================================================]] function p._deg2dms(degree, degPrec, lang) local dNum, mNum, sNum, dStr, mStr, sStr, formatStr, secPrec, c, k, d, zero local Lang = mw.language.new(lang) -- adjust number display based on precision secPrec = degPrec*3600.0 -- coordinate precision in seconds if secPrec&lt;0.05 then -- degPrec&lt;1.3889e-05 formatStr = '%s°&amp;nbsp;%s′&amp;nbsp;%s″' -- use DD° MM′ SS.SS″ format c = 360000 elseif secPrec&lt;0.5 then -- 1.3889e-05&lt;degPrec&lt;1.3889e-04 formatStr = '%s°&amp;nbsp;%s′&amp;nbsp;%s″' -- use DD° MM′ SS.S″ format c = 36000 elseif degPrec*60.0&lt;0.5 then -- 1.3889e-04&lt;degPrec&lt;0.0083 formatStr = '%s°&amp;nbsp;%s′&amp;nbsp;%s″' -- use DD° MM′ SS″ format c = 3600 elseif degPrec&lt;0.5 then -- 0.0083&lt;degPrec&lt;0.5 formatStr = '%s°&amp;nbsp;%s′' -- use DD° MM′ format c = 60 else -- if degPrec>0.5 then formatStr = '%s°' -- use DD° format c = 1 end -- create degree, minute and seconds numbers and string d = c/60 k = math.floor(c*(degree%360)+0.49) -- convert float to an integer. This step HAS to be identical for all conversions to avoid incorrect results due to different rounding dNum = math.floor(k/c) % 360 -- degree number (integer in 0-360 range) mNum = math.floor(k/d) % 60 -- minute number (integer in 0-60 range) sNum = 3600*(k%d) / c -- seconds number (float in 0-60 range with 0, 1 or 2 decimal digits) dStr = Lang:formatNum(dNum) -- degree string mStr = Lang:formatNum(mNum) -- minute string sStr = Lang:formatNum(sNum) -- second string zero = Lang:formatNum(0) -- zero string in local language if mNum&lt;10 then mStr = zero .. mStr -- pad with zero if a single digit end if sNum&lt;10 then sStr = zero .. sStr -- pad with zero if less than ten end return string.format(formatStr, dStr, mStr, sStr); end --[[============================================================================ Convert degrees to degrees/minutes/seconds notation commonly used when displaying coordinates. Inputs: 1) latitude or longitude angle in degrees 2) georeference precision in degrees 3) language used in formatting of the number ==============================================================================]] function p.deg2dms(frame) local args = core.getArgs(frame) local degree = tonumber(args[1]) local degPrec = tonumber(args[2]) or 0-- precision in degrees if degree==nil then return args[1]; else return p._deg2dms(degree, degPrec, args.lang) end end function p.dms2deg(frame) return dms2deg(frame.args[1]) end --[[============================================================================ Format coordinate location string, by creating and joining DMS strings for latitude and longitude. Also convert precision from meters to degrees. INPUTS: * lat = latitude in degrees * lon = longitude in degrees * lang = language code * prec = geolocation precision in meters ==============================================================================]] function p._lat_lon(lat, lon, prec, lang) lat = tonumber(lat) lon = tonumber(lon) prec = math.abs(tonumber(prec) or 0) if lon then -- get longitude to be in -180 to 180 range lon=lon%360 if lon>180 then lon = lon-360 end end if lat==nil or lon==nil then return NoLatLonString else local nsew = core.langSwitch(i18n.NSEW, lang) -- find set of localized translation of N, S, W and E in the desired language local SN, EW, latStr, lonStr, lon2m, lat2m, phi if lat&lt;0 then SN = nsew.S else SN = nsew.N end -- choose S or N depending on latitude degree sign if lon&lt;0 then EW = nsew.W else EW = nsew.E end -- choose W or E depending on longitude degree sign lat2m=1 lon2m=1 if prec>0 then -- if user specified the precision of the geo location... phi = math.abs(lat)*math.pi/180 -- latitude in radiants lon2m = 6378137*math.cos(phi)*math.pi/180 -- see https://en.wikipedia.org/wiki/Longitude lat2m = 111000 -- average latitude degree size in meters end latStr = p._deg2dms(math.abs(lat), prec/lat2m, lang) -- Convert latitude degrees to degrees/minutes/seconds lonStr = p._deg2dms(math.abs(lon), prec/lon2m, lang) -- Convert longitude degrees to degrees/minutes/seconds return string.format('%s&amp;nbsp;%s, %s&amp;nbsp;%s', latStr, SN, lonStr, EW) --return string.format('&lt;span class="latitude">%s %s&lt;/span>, &lt;span class="longitude">%s %s&lt;/span>', latStr, SN, lonStr, EW) end end function p.lat_lon(frame) local args = core.getArgs(frame) return p._lat_lon(args.lat, args.lon, args.prec, args.lang) end --[[============================================================================ Helper core function for externalLink. Create URL for different sites: INPUTS: * site = Possible sites: GeoHack, GoogleEarth, Proximityrama, OpenStreetMap, GoogleMaps (for Earth, Mars and Moon) * globe = Possible options: Earth, Mars or Moon. Venus, Mercury, Titan, Ganymede are also supported but are unused as of 2013. * latStr = latitude string or number * lonStr = longitude string or number * lang = language code * attributes = attributes to be passed to GeoHack ==============================================================================]] function p._externalLink(site, globe, latStr, lonStr, lang, attributes, level) local URLstr = SiteURL[site]; level = level or 1 local pageName = mw.uri.encode( mw.title.getCurrentTitle().prefixedText, 'WIKI' ) pageName = mw.ustring.gsub( pageName, '%%', '%%%%') if site == 'GoogleMaps' then URLstr = SiteURL.GoogleMaps[globe] elseif site == 'GeoHack' then attributes = string.format('globe:%s_%s', globe, attributes) URLstr = mw.ustring.gsub( URLstr, '$attr', attributes) end URLstr = mw.ustring.gsub( URLstr, '$lat' , latStr) URLstr = mw.ustring.gsub( URLstr, '$lon' , lonStr) URLstr = mw.ustring.gsub( URLstr, '$lang' , lang) URLstr = mw.ustring.gsub( URLstr, '$level', level) URLstr = mw.ustring.gsub( URLstr, '$page' , pageName) URLstr = mw.ustring.gsub( URLstr, '+', '') URLstr = mw.ustring.gsub( URLstr, ' ', '_') return URLstr end --[[============================================================================ Create URL for different sites. INPUTS: * site = Possible sites: GeoHack, GoogleEarth, Proximityrama, OpenStreetMap, GoogleMaps (for Earth, Mars and Moon) * globe = Possible options: Earth, Mars or Moon. Venus, Mercury, Titan, Ganymede are also supported but are unused as of 2013. * lat = latitude string or number * lon = longitude string or number * lang = language code * attributes = attributes to be passed to GeoHack ==============================================================================]] function p.externalLink(frame) local args = core.getArgs(frame) return p._externalLink(args.site or 'GeoHack', args.globe or 'Earth', args.lat, args.lon, args.lang, args.attributes or '') end --[[============================================================================ Adjust GeoHack attributes depending on the template that calls it INPUTS: * attributes = attributes to be passed to GeoHack * mode = set by each calling template ==============================================================================]] function p.alterAttributes(attributes, mode, heading) -- indicate which template called it if mode=='camera' then -- Used by {{Location}} and {{Location dec}} if not string.find(attributes, 'type:camera') then attributes = 'type:camera_' .. attributes end elseif mode=='object' then -- Used by {{Object location}} if mode=='object' and not string.find(attributes, 'type:') then attributes = 'type:object_' .. attributes end if not string.find(attributes, 'class:object') then attributes = 'class:object_' .. attributes end elseif mode=='inline' then -- Used by {{Inline coordinates}} (actually that template does not set any attributes at the moment) elseif mode=='user' then -- Used by {{User location}} attributes = 'type:user_location' elseif mode=='institution' then --Used by {{Institution/coordinates}} (categories only) attributes = 'type:institution' end local hStr = '' if heading then -- if heading is a number hStr = string.format('heading:%6.2f', heading) end if not string.find(attributes, 'heading:') then attributes = attributes .. '_' .. hStr else attributes = string.gsub(attributes,'heading:[^_]*', hStr) -- replace heading in form heading:N with heading=0 attributes = string.gsub(attributes,'__', '_') end return string.gsub(attributes,' ', '') end --[[============================================================================ Create link to GeoHack tool which displays latitude and longitude coordinates in DMS format INPUTS: * globe = Possible options: Earth, Mars or Moon. Venus, Mercury, Titan, Ganymede are also supported but are unused as of 2013. * lat = latitude in degrees * lon = longitude in degrees * lang = language code * prec = geolocation precision in meters * attributes = attributes to be passed to GeoHack ==============================================================================]] function p._GeoHack_link(args) -- create link and coordintate string local latlon = p._lat_lon(args.lat, args.lon, args.prec, args.lang) if latlon==NoLatLonString then return latlon else local url = p._externalLink('GeoHack', args.globe or 'Earth', args.lat, args.lon, args.lang, args.attributes or '') return string.format('&lt;span class="plainlinksneverexpand">[%s %s]&lt;/span>', url, latlon) --&lt;span class="plainlinks nourlexpansion"> end end function p.GeoHack_link(frame) return p._GeoHack_link(core.getArgs(frame)) end --[[============================================================================ Create full external links section of {{Location}} or {{Object location}} templates, based on: * globe = Possible options: Earth, Mars or Moon. Venus, Mercury, Titan, Ganymede are also supported but are unused as of 2013. * mode = Possible options: - camera - call from {{location}} - object - call from {{Object location}} - globe - call from {{Globe location}} * lat = latitude in degrees * lon = longitude in degrees * lang = language code * namespace = namespace name: File, Category, (Gallery) ==============================================================================]] function p._externalLinksSection(args) local lang = args.lang if not args.namespace then args.namespace = mw.title.getCurrentTitle().nsText end local str, link1, link2, link3, link4 if args.globe=='Earth' and args.namespace~="Category" then -- Earth locations for files will have 2 links link1 = p._externalLink('OpenStreetMap1', 'Earth', args.lat, args.lon, lang, '') --link2 = p._externalLink('GoogleEarth' , 'Earth', args.lat, args.lon, lang, '') str = string.format('[%s %s]', link1, core.langSwitch(i18n.OpenStreetMaps, lang)) --link2, core.langSwitch(i18n.GoogleEarth, lang)) elseif args.globe=='Earth' and args.namespace=="Category" then -- Earth locations for categories will have 4 links link1 = p._externalLink('OpenStreetMap2', 'Earth', args.lat, args.lon, lang, '', args.catRecurse) --link2 = p._externalLink('GoogleMaps' , 'Earth', args.lat, args.lon, lang, '', args.catRecurse) --link3 = p._externalLink('GoogleEarth' , 'Earth', args.lat, args.lon, lang, '') --link4 = p._externalLink('Proximityrama' , 'Earth', args.lat, args.lon, lang, '') str = string.format('[%s %s]', link1, core.langSwitch(i18n.OpenStreetMaps, lang)) --link2, core.langSwitch(i18n.GoogleMaps, lang), --link3, core.langSwitch(i18n.GoogleEarth, lang), --link4, core.langSwitch(i18n.Proximityrama, lang)) elseif args.globe=='Mars' or args.globe=='Moon' then link1 = p._externalLink('GoogleMaps', args.globe, args.lat, args.lon, lang, '') str = string.format('[%s %s]', link1, core.langSwitch(i18n.GoogleMaps, lang)) end return str end function p.externalLinksSection(frame) return p._externalLinksSection(core.getArgs(frame)) end -- ============================================================================ local function P625_categories(args, entity) local cat = '' local data = {} if ((not entity.id:match( '^[Mm]%d+$' )) or (not getProperty(entity, 'P625'))) then return cat end local P625 = getSDCoords(entity,'P625') local P1259 = getSDCoords(entity,'P1259') local P9149 = getSDCoords(entity,'P9149') if (P1259.lat and distance(P625.lat, P625.lon, P1259.lat, P1259.lon)&lt;=1) then cat = '[[Category:Media with the same P625 and P1259 coordinates]]' elseif (P1259.lat) then cat = '[[Category:Media with P625 and P1259 coordinates]]' end if (P9149.lat and distance(P625.lat, P625.lon, P9149.lat, P9149.lon)&lt;=1) then cat = cat .. '[[Category:Media with the same P625 and P9149 coordinates]]' elseif (P9149.lat) then cat = cat .. '[[Category:Media with P625 and P9149 coordinates]]' end if (cat=='' and args.lat and distance(P625.lat, P625.lon, args.lat, args.lon)&lt;=1) then cat = cat .. string.format('[[Category:Media with the same P625 and %s coordinates]]', args.mode) end if (cat=='' and args.lat) then cat = string.format('[[Category:Media with P625 and %s coordinates]]', args.mode) else cat = '[[Category:Media with P625 coordinates]]' end return cat end --[[============================================================================ Core section of template:Location, template:Object location and template:Globe location. This method requires several arguments to be passed to it or it's parent method/template: * globe = Possible options: Earth, Mars or Moon. Venus, Mercury, Titan, Ganymede are also supported but are unused as of 2013. * mode = Possible options: - camera - call from {{location}} - object - call from {{Object location}} - globe - call from {{Globe location}} * lat = latitude in degrees * lon = longitude in degrees * attributes = attributes * lang = language code * namespace = namespace: File, Category, Gallery * prec = geolocation precision in meters ==============================================================================]] function p._LocationTemplateCore(args) -- prepare arguments if not (args.namespace) then -- if namespace not provided than look it up args.namespace = mw.title.getCurrentTitle().nsText end if args.namespace=='' then -- if empty than it is a gallery args.namespace = 'Gallery' end local bare = core.yesno(args.bare,false) local Status = 'primary' -- used by {{#coordinates:}} if core.yesno(args.secondary,false) then Status = 'secondary' end args.globe = mw.language.new('en'):ucfirst(args.globe or 'Earth') -- Convert coordinates from string to numbers local lat = tonumber(args.lat) local lon = tonumber(args.lon) local precission = tonumber(args.prec or '0') local heading = p._getHeading(args.attributes) -- get heading arrow section if lon then -- get longitude to be in -180 to 180 range lon=lon%360 if lon>180 then lon = lon-360 end end -- If wikidata link provided than compare coordinates local Categories, geoMicroFormat, coorTag, edit_icon, wikidata_link = '', '', '', '', '', '', '' local entity, coord, sd, cmp, locationCat local loc = {lat=lat, lon=lon, heading=heading, mode=args.mode, source='loc'} local ID = args.wikidata if (ID==nil) then entity = mw.wikibase.getEntity() if entity and args.namespace == 'Category' then -- this is category connected to Wikidata through sitelink ID = getProperty(entity, "P301") if getProperty(entity, "P31") == 'Q4167836' and ID then -- wikidata item is a "category item" with "category's main topic (P301)" -- follow P301 to the actual item for this category entity = mw.wikibase.getEntity(ID) end end elseif type(ID)=='string' and ID:match( '^[QqMm]%d+$' ) then entity = mw.wikibase.getEntity(ID) elseif type(ID)~='string' and ID.id then entity = ID -- entities can be passed from outside end if entity then if (args.mode=='object' or args.mode=='globe') then sd = getSDCoords(entity,'P9149') -- fetch coordinates of depicted place if not sd.lat then sd = getSDCoords(entity,'P625') -- fallback to coordinate location end elseif (args.mode=='camera') then sd = getSDCoords(entity,'P1259') -- fetch camera coordinates or coordinates of the point of view end if (args.namespace=='File') then -- look up lat/lon on SDC coord, Categories, cmp = compareCoords(loc, sd, args.mode, 'SDC') if coord.source~='loc' then edit_icon = core.editAtSDC(coord.source, args.lang) lat, lon, heading, precission = coord.lat, coord.lon, coord.heading, coord.prec end Categories = Categories .. P625_categories(loc, entity) elseif (args.namespace == 'Category') then -- look up lat/lon on wikidata sd.wID = entity.id coord, Categories, cmp = compareCoords(loc, sd, args.mode, 'Wikidata') if coord.source~='loc' then local str = "\n[[File:Wikidata-logo.svg|20px|Field with data from Wikidata's %s property&lt;br/>%s|link=wikidata:%s#%s]]" edit_icon = core.editAtWikidata(entity.id, coord.source, args.lang) lat, lon, heading, precission = coord.lat, coord.lon, coord.heading, coord.prec end if cmp.qs then wikidata_link = cmp.qs end end elseif (args.namespace=='File') then Categories = Categories .. string.format(CoorCat.strucData4, args.mode, 'SDC') end -- Check if location of creation (P1071) is set and if not, add tracker if args.namespace == 'File' and lat and lon then locationCat = checkLocationOfCreation(entity, lat, lon) if locationCat then Categories = Categories .. locationCat end end args.lat = string.format('%010.6f', lat or 0) args.lon = string.format('%011.6f', lon or 0) args.prec = precission args.attributes = p.alterAttributes(args.attributes or '', args.mode, heading) local frame = mw.getCurrentFrame() -- Categories, {{#coordinates}} and geoMicroFormat will be only added to File, Category and Gallery pages if (args.namespace == 'File' or args.namespace == 'Category' or args.namespace == 'Gallery') then if lat and lon then -- if lat and lon are numbers... if lat==0 and lon==0 then -- lat=0 and lon=0 is a common issue when copying from flickr and other sources Categories = Categories .. CoorCat.default end if args.attributes and string.find(args.attributes, '=') then Categories = Categories .. CoorCat.attribute end if (math.abs(lon)>180) or (math.abs(lat)>90) then -- check for errors ({{#coordinates:}} also checks for errors ) Categories = Categories .. '&lt;span style="color:red;font-weight:bold">Error: Invalid parameters! (coordinates are outside allowed range)&lt;/span>\n' .. CoorCat.erroneous end -- local cat = CoorCat[args.namespace] -- if cat then -- add category based on namespace -- Categories = Categories .. cat -- end -- if not earth than add a category for each globe if args.mode and args.globe and args.mode=='globe' and args.globe~='Earth' then Categories = Categories .. string.format(CoorCat[args.mode], args.globe) end -- add &lt;span class="geo"> Geo (microformat) code: it is included for machine readability geoMicroFormat = string.format('&lt;span class="geo" style="display:none">%10.6f; %11.6f&lt;/span>',lat, lon) -- add {{#coordinates}} tag, see https://www.mediawiki.org/wiki/Extension:GeoData if args.namespace == 'File' and Status == 'primary' and args.mode=='camera' then coorTag = frame:callParserFunction( '#coordinates', { 'primary', lat, lon, args.attributes } ) elseif args.namespace == 'File' and args.mode=='object' then coorTag = frame:callParserFunction( '#coordinates', { lat, lon, args.attributes } ) end else -- if lat and lon are not numbers then add error category Categories = Categories .. '&lt;span style="color:red;font-weight:bold">Error: Invalid parameters! (coordinates are missing or not numeric)&lt;/span>\n' .. CoorCat.erroneous end end -- Call helper functions to render different parts of the template local coor, info_link, inner_table, OSM = '','','','','','' coor = p._GeoHack_link(args) -- the p and link to GeoHack coor = string.format('&lt;span class=plainlinks>%s&lt;/span>%s', coor, edit_icon) if heading then local k = math.fmod(math.floor(0.5+math.fmod(heading+360,360)/11.25),32)+1 local fname = heading_icon[k] coor = string.format('%s&amp;nbsp;&amp;nbsp;&lt;span title="%s°">[[%s|25px|link=|alt=Heading=%s°]]&lt;/span>', coor, heading, fname, heading) end if args.globe=='Earth' then local icon = 'marker' if args.mode=='camera' then icon = 'camera' end OSM = frame:preprocess(add_maplink(args.lat, args.lon, icon, '[[File:Openstreetmap logo.svg|20px|link=|Kartographer map based on OpenStreetMap.]]')) -- fancy link to OSM end local external_link = p._externalLinksSection(args) -- external link section if external_link and args.namespace == 'File' then external_link = core.langSwitch(i18n.LocationTemplateLinkLabel, args.lang) .. ' ' .. external_link -- header of the link section for {{location}} template elseif external_link then external_link = core.langSwitch(i18n.ObjectLocationTemplateLinkLabel, args.lang) .. ' ' .. external_link -- header of the link section for {{Object location}} template end info_link = string.format('[[File:OOjs UI icon help.svg|18x18px|alt=info|link=%s|class=skin-invert]]', core.langSwitch(i18n.COM_GEO, args.lang) ) inner_table = string.format('&lt;td style="border:none;">%s&amp;nbsp;%s&lt;/td>&lt;td style="border:none;">%s&lt;/td>&lt;td style="border:none;">%s%s%s&lt;/td>', coor, OSM, external_link or '', wikidata_link, info_link, geoMicroFormat) -- combine strings into a table local templateText if bare then templateText = string.format('&lt;table style="width:100%%">&lt;tr>%s&lt;/tr>&lt;/table>', inner_table) else -- choose name of the field and create row local field_name = 'Location' if args.mode=='camera' then field_name = core.langSwitch(i18n.CameraLocation, args.lang) elseif args.mode=='object' then field_name = core.langSwitch(i18n.ObjectLocation, args.lang) elseif args.mode=='globe' then local field_list = core.langSwitch(i18n.GlobeLocation, args.lang) if args.globe and i18n.GlobeLocation['en'][args.globe] then -- verify globe is provided and is recognized field_name = field_list[args.globe] end end templateText = string.format('&lt;tr>&lt;th class="type fileinfo-paramfield">%s&lt;/th>%s&lt;/tr>', field_name, inner_table) --Create HTML text local dir = mw.language.new( args.lang ):getDir() -- get text direction local style = 'class="toccolours layouttemplate commons-file-information-table" style="width: 100%%;" dir="%s" lang="%s"' style = string.format(style, dir, args.lang) templateText = string.format('&lt;table %s>\n%s\n&lt;/table>', style, templateText) end return templateText, Categories, coorTag end function p.LocationTemplateCore(frame) local args = core.getArgs(frame) args.namespace = mw.title.getCurrentTitle().nsText if not args.lat and not args.lon then -- if no lat and lon but numbered arguments present if args[4] then -- DMS with pipes format, ex. "34|5|32.36|N|116|9|24|55|W" args.lat = dms2deg_ ( args[1], args[2], args[3], args[4] ) args.lon = dms2deg_ ( args[5], args[6], args[7], args[8] ) args.attributes = args.attributes or args[9] elseif args[2] and not (type(args[2])=='string' and args[2]:find(":")) then -- decimal format or DMS with one pipe, ex. "34° 05′ 32.36″ N| 116° 09′ 24.55″ W" args.lat = args[1] args.lon = args[2] args.attributes = args.attributes or args[3] elseif args[1] then -- detect a single argument in the form "34° 05′ 32.36″ N, 116° 09′ 24.55″ W" or similar local v = mw.text.split(args[1]:gsub("([NnSs])", "%1/" ), "/") -- split into lat and lon using splitting point after any letter args.lat, args.lon = v[1], v[2] args.attributes = args.attributes or args[2] end end local cat = '' if args.lat and args.lon then local lat = tonumber(args.lat) local lon = tonumber(args.lon) if not lat or not lon then args.lat = dms2deg(args.lat or '') args.lon = dms2deg(args.lon or '') if (args.namespace == 'File' or args.namespace == 'Category') then cat = CoorCat.dms end end end local templateText, Categories, coorTag = p._LocationTemplateCore(args) return templateText .. Categories .. cat .. coorTag end return p </textarea><div id="mw-scribunto-console"></div><div class="templatesUsed"><div class="mw-templatesUsedExplanation"><p>Templates used on this page: </p></div><ul> <li><a href="/wiki/Template:Border-radius" title="Template:Border-radius">Template:Border-radius</a> (<a href="/w/index.php?title=Template:Border-radius&amp;action=edit" title="Template:Border-radius">view source</a>) (protected)</li><li><a href="/wiki/Template:Fallback" title="Template:Fallback">Template:Fallback</a> (<a href="/w/index.php?title=Template:Fallback&amp;action=edit" title="Template:Fallback">view source</a>) (protected)</li><li><a href="/wiki/Template:LangSwitch" title="Template:LangSwitch">Template:LangSwitch</a> (<a href="/w/index.php?title=Template:LangSwitch&amp;action=edit" title="Template:LangSwitch">view source</a>) (protected)</li><li><a href="/wiki/Template:Linear-gradient" title="Template:Linear-gradient">Template:Linear-gradient</a> (<a href="/w/index.php?title=Template:Linear-gradient&amp;action=edit" title="Template:Linear-gradient">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:LuaLogo" title="Template:LuaLogo">Template:LuaLogo</a> (<a href="/w/index.php?title=Template:LuaLogo&amp;action=edit" title="Template:LuaLogo">view source</a>) (protected)</li><li><a href="/wiki/Template:Mbox" title="Template:Mbox">Template:Mbox</a> (<a href="/w/index.php?title=Template:Mbox&amp;action=edit" title="Template:Mbox">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Mbox/styles.css" title="Template:Mbox/styles.css">Template:Mbox/styles.css</a> (<a href="/w/index.php?title=Template:Mbox/styles.css&amp;action=edit" title="Template:Mbox/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Module-nav" title="Template:Module-nav">Template:Module-nav</a> (<a href="/w/index.php?title=Template:Module-nav&amp;action=edit" title="Template:Module-nav">view source</a>) (protected)</li><li><a href="/wiki/Template:Module-nav/i18n" title="Template:Module-nav/i18n">Template:Module-nav/i18n</a> (<a href="/w/index.php?title=Template:Module-nav/i18n&amp;action=edit" title="Template:Module-nav/i18n">edit</a>) </li><li><a href="/wiki/Template:Module-nav/tab" title="Template:Module-nav/tab">Template:Module-nav/tab</a> (<a href="/w/index.php?title=Template:Module-nav/tab&amp;action=edit" title="Template:Module-nav/tab">view source</a>) (protected)</li><li><a href="/wiki/Template:Module-nav/tab2" title="Template:Module-nav/tab2">Template:Module-nav/tab2</a> (<a href="/w/index.php?title=Template:Module-nav/tab2&amp;action=edit" title="Template:Module-nav/tab2">view source</a>) (protected)</li><li><a href="/wiki/Template:Module-nav/tab3" title="Template:Module-nav/tab3">Template:Module-nav/tab3</a> (<a href="/w/index.php?title=Template:Module-nav/tab3&amp;action=edit" title="Template:Module-nav/tab3">view source</a>) (protected)</li><li><a href="/wiki/Template:Module_rating" title="Template:Module rating">Template:Module rating</a> (<a href="/w/index.php?title=Template:Module_rating&amp;action=edit" title="Template:Module rating">edit</a>) </li><li><a href="/wiki/Template:Module_rating/i18n/en" title="Template:Module rating/i18n/en">Template:Module rating/i18n/en</a> (<a href="/w/index.php?title=Template:Module_rating/i18n/en&amp;action=edit" title="Template:Module rating/i18n/en">edit</a>) </li><li><a href="/wiki/Template:Ombox" class="mw-redirect" title="Template:Ombox">Template:Ombox</a> (<a href="/w/index.php?title=Template:Ombox&amp;action=edit" class="mw-redirect" title="Template:Ombox">view source</a>) (autopatroller protected)</li><li><a href="/wiki/Template:T/main" title="Template:T/main">Template:T/main</a> (<a href="/w/index.php?title=Template:T/main&amp;action=edit" title="Template:T/main">view source</a>) (protected)</li><li><a href="/wiki/Template:Tl" title="Template:Tl">Template:Tl</a> (<a href="/w/index.php?title=Template:Tl&amp;action=edit" title="Template:Tl">view source</a>) (protected)</li><li><a href="/wiki/Module:Autotranslate" title="Module:Autotranslate">Module:Autotranslate</a> (<a href="/w/index.php?title=Module:Autotranslate&amp;action=edit" title="Module:Autotranslate">view source</a>) (protected)</li><li><a href="/wiki/Module:Coordinates" title="Module:Coordinates">Module:Coordinates</a> (<a href="/w/index.php?title=Module:Coordinates&amp;action=edit" title="Module:Coordinates">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Coordinates/doc" title="Module:Coordinates/doc">Module:Coordinates/doc</a> (<a href="/w/index.php?title=Module:Coordinates/doc&amp;action=edit" title="Module:Coordinates/doc">edit</a>) </li><li><a href="/wiki/Module:Core" title="Module:Core">Module:Core</a> (<a href="/w/index.php?title=Module:Core&amp;action=edit" title="Module:Core">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Effective_protection_level" title="Module:Effective protection level">Module:Effective protection level</a> (<a href="/w/index.php?title=Module:Effective_protection_level&amp;action=edit" title="Module:Effective protection level">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:I18n/coordinates" title="Module:I18n/coordinates">Module:I18n/coordinates</a> (<a href="/w/index.php?title=Module:I18n/coordinates&amp;action=edit" title="Module:I18n/coordinates">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:LangSwitch" title="Module:LangSwitch">Module:LangSwitch</a> (<a href="/w/index.php?title=Module:LangSwitch&amp;action=edit" title="Module:LangSwitch">view source</a>) (protected)</li></ul></div><p id="mw-returnto">Return to <a href="/wiki/Module:Coordinates" title="Module:Coordinates">Module:Coordinates</a>.</p> <!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://commons.wikimedia.org/wiki/Module:Coordinates">https://commons.wikimedia.org/wiki/Module:Coordinates</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </div> <div id="mw-navigation"> <h2>Navigation menu</h2> <div id="mw-head"> <nav id="p-personal" class="mw-portlet mw-portlet-personal vector-user-menu-legacy vector-menu" aria-labelledby="p-personal-label" > <h3 id="p-personal-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Personal tools</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-uls" class="mw-list-item active"><a class="uls-trigger" href="#"><span>English</span></a></li><li id="pt-anonuserpage" class="mw-list-item"><span title="The user page for the IP address you are editing as">Not logged in</span></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li><li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-createaccount" class="mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=Module%3ACoordinates&amp;returntoquery=action%3Dedit" title="You are encouraged to create an account and log in; however, it is not mandatory"><span>Create account</span></a></li><li id="pt-login" class="mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Module%3ACoordinates&amp;returntoquery=action%3Dedit" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span>Log in</span></a></li> </ul> </div> </nav> <div id="left-navigation"> <nav id="p-namespaces" class="mw-portlet mw-portlet-namespaces vector-menu-tabs vector-menu-tabs-legacy vector-menu" aria-labelledby="p-namespaces-label" > <h3 id="p-namespaces-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Namespaces</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-module" class="selected mw-list-item"><a href="/wiki/Module:Coordinates" title="View the module page [c]" accesskey="c"><span>Module</span></a></li><li id="ca-talk" class="mw-list-item"><a href="/wiki/Module_talk:Coordinates" rel="discussion" title="Discussion about the content page [t]" accesskey="t"><span>Discussion</span></a></li> </ul> </div> </nav> <nav id="p-variants" class="mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown vector-menu" aria-labelledby="p-variants-label" > <input type="checkbox" id="p-variants-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-variants" class="vector-menu-checkbox" aria-labelledby="p-variants-label" > <label id="p-variants-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">English</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </nav> </div> <div id="right-navigation"> <nav id="p-views" class="mw-portlet mw-portlet-views vector-menu-tabs vector-menu-tabs-legacy vector-menu" aria-labelledby="p-views-label" > <h3 id="p-views-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Views</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="mw-list-item"><a href="/wiki/Module:Coordinates"><span>View</span></a></li><li id="ca-viewsource" class="selected mw-list-item"><a href="/w/index.php?title=Module:Coordinates&amp;action=edit" title="This page is protected.&#10;You can view its source [e]" accesskey="e"><span>View source</span></a></li><li id="ca-history" class="mw-list-item"><a href="/w/index.php?title=Module:Coordinates&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>History</span></a></li> </ul> </div> </nav> <nav id="p-cactions" class="mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown vector-menu" aria-labelledby="p-cactions-label" title="More options" > <input type="checkbox" id="p-cactions-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-cactions" class="vector-menu-checkbox" aria-labelledby="p-cactions-label" > <label id="p-cactions-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">More</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </nav> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box"> <h3 >Search</h3> <form action="/w/index.php" id="searchform" class="vector-search-box-form"> <div id="simpleSearch" class="vector-search-box-inner" data-search-loc="header-navigation"> <input class="vector-search-box-input" type="search" name="search" placeholder="Search Wikimedia Commons" aria-label="Search Wikimedia Commons" autocapitalize="sentences" title="Search Wikimedia Commons [f]" accesskey="f" id="searchInput" > <input type="hidden" name="title" value="Special:MediaSearch"> <input id="mw-searchButton" class="searchButton mw-fallbackSearchButton" type="submit" name="fulltext" title="Search the pages for this text" value="Search"> <input id="searchButton" class="searchButton" type="submit" name="go" title="Go to a page with this exact name if it exists" value="Go"> </div> </form> </div> </div> </div> <div id="mw-panel" class="vector-legacy-sidebar"> <div id="p-logo" role="banner"> <a class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"></a> </div> <nav id="p-navigation" class="mw-portlet mw-portlet-navigation vector-menu-portal portal vector-menu" aria-labelledby="p-navigation-label" > <h3 id="p-navigation-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Navigate</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-welcome" class="mw-list-item"><a href="/wiki/Commons:Welcome"><span>Welcome</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Commons:Community_portal" title="About the project, what you can do, where to find things"><span>Community portal</span></a></li><li id="n-village-pump" class="mw-list-item"><a href="/wiki/Commons:Village_pump"><span>Village pump</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Help:Contents" title="The place to find out"><span>Help center</span></a></li> </ul> </div> </nav> <nav id="p-participate" class="mw-portlet mw-portlet-participate vector-menu-portal portal vector-menu" aria-labelledby="p-participate-label" > <h3 id="p-participate-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Participate</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-uploadbtn" class="mw-list-item"><a href="/wiki/Special:UploadWizard"><span>Upload file</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-latestfiles" class="mw-list-item"><a href="/wiki/Special:NewFiles"><span>Latest files</span></a></li><li id="n-randomimage" class="mw-list-item"><a href="/wiki/Special:Random/File" title="Load a random file [x]" accesskey="x"><span>Random file</span></a></li><li id="n-contact" class="mw-list-item"><a href="/wiki/Commons:Contact_us"><span>Contact us</span></a></li> </ul> </div> </nav> <nav id="p-tb" class="mw-portlet mw-portlet-tb vector-menu-portal portal vector-menu" aria-labelledby="p-tb-label" > <h3 id="p-tb-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Tools</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Module:Coordinates" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Module:Coordinates" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Module:Coordinates&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fcommons.wikimedia.org%2Fw%2Findex.php%3Ftitle%3DModule%3ACoordinates%26action%3Dedit"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fcommons.wikimedia.org%2Fw%2Findex.php%3Ftitle%3DModule%3ACoordinates%26action%3Dedit"><span>Download QR code</span></a></li> </ul> </div> </nav> <nav id="p-wikibase-otherprojects" class="mw-portlet mw-portlet-wikibase-otherprojects vector-menu-portal portal vector-menu" aria-labelledby="p-wikibase-otherprojects-label" > <h3 id="p-wikibase-otherprojects-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">In other projects</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q7348344" title="Link to connected data repository item [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </nav> </div> </div> <footer id="footer" class="mw-footer" > <ul id="footer-info"> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Commons:Welcome">About Wikimedia Commons</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Commons:General_disclaimer">Disclaimers</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/commons.wikimedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//commons.m.wikimedia.org/w/index.php?title=Module:Coordinates&amp;action=edit&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> <script>(RLQ=window.RLQ||[]).push(function(){mw.log.warn("This page is using the deprecated ResourceLoader module \"codex-search-styles\".\n[1.43] Use a CodexModule with codexComponents to set your specific components used: https://www.mediawiki.org/wiki/Codex#Using_a_limited_subset_of_components");mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-68pwz","wgBackendResponseTime":262,"wgPageParseReport":{"limitreport":{"cputime":"0.050","walltime":"0.074","ppvisitednodes":{"value":172,"limit":1000000},"postexpandincludesize":{"value":14250,"limit":2097152},"templateargumentsize":{"value":1716,"limit":2097152},"expansiondepth":{"value":17,"limit":100},"expensivefunctioncount":{"value":0,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":1026,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 59.171 1 Template:Protectedpagetext/PageTemplateProtected","100.00% 59.171 1 -total"," 90.87% 53.769 1 Template:Editnotice"," 57.44% 33.985 1 Template:Fmbox"," 29.17% 17.259 2 Template:FULLROOTPAGENAME"," 25.57% 15.132 1 Template:Namespace_has_subpages"," 6.78% 4.013 1 Template:Image"," 2.94% 1.738 1 Template:Str_left"]},"scribunto":{"limitreport-timeusage":{"value":"0.018","limit":"10.000"},"limitreport-memusage":{"value":715789,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-f69cdc8f6-68pwz","timestamp":"20241124204801","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10