CINXE.COM
Mostra la font per a Mòdul:Coordenades - Viquipèdia, l'enciclopèdia lliure
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available" lang="ca" dir="ltr"> <head> <meta charset="UTF-8"> <title>Mostra la font per a Mòdul:Coordenades - Viquipèdia, l'enciclopèdia lliure</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available";var cookie=document.cookie.match(/(?:^|; )cawikimwclientpreferences=([^;]+)/);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":"3d19a36a-aa6c-4933-8270-0fdbbe28182f","wgCanonicalNamespace":"Module","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":828,"wgPageName":"Mòdul:Coordenades","wgTitle":"Coordenades","wgCurRevisionId":31142927,"wgRevisionId":0,"wgArticleId":1079657,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"Scribunto","wgRelevantPageName":"Mòdul:Coordenades","wgRelevantArticleId":1079657,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":["sysop"],"wgRestrictionMove":["sysop"],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode": "en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"wgCodeEditorCurrentLanguage":"lua","wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"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.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.charinsert.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.data-bridge.externalModifiers":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.codeEditor","ext.scribunto.edit","mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","skins.vector.js","ext.centralNotice.geoIP","ext.charinsert","ext.gadget.UkensKonkurranse","ext.gadget.refToolbar","ext.gadget.charinsert","ext.gadget.AltresViccionari","ext.gadget.purgetab","ext.gadget.DocTabs","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns", "wikibase.client.data-bridge.init","ext.checkUser.clientHints","oojs-ui.styles.icons-media","oojs-ui-core.icons","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=ca&modules=ext.charinsert.styles%7Cext.codeEditor.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.data-bridge.externalModifiers&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=ca&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=ca&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <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="Mostra la font per a Mòdul:Coordenades - Viquipèdia, l'enciclopèdia lliure"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//ca.m.wikipedia.org/wiki/M%C3%B2dul:Coordenades"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Viquipèdia (ca)"> <link rel="EditURI" type="application/rsd+xml" href="//ca.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://ca.wikipedia.org/wiki/M%C3%B2dul:Coordenades"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.ca"> <link rel="alternate" type="application/atom+xml" title="Canal de sindicació Atom Viquipèdia" href="/w/index.php?title=Especial:Canvis_recents&feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="codeeditor-loading skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-828 ns-subject page-Mòdul_Coordenades rootpage-Mòdul_Coordenades skin-vector-2022 action-edit"><a class="mw-jump-link" href="#bodyContent">Vés al contingut</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Lloc"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Menú principal" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Menú principal</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Menú principal</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">mou a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">amaga</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navegació </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Portada" title="Visiteu la pàgina principal [z]" accesskey="z"><span>Portada</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Especial:Article_aleatori" title="Carrega una pàgina a l’atzar [x]" accesskey="x"><span>Article a l'atzar</span></a></li><li id="n-Articles-de-qualitat" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Articles_de_qualitat"><span>Articles de qualitat</span></a></li> </ul> </div> </div> <div id="p-Comunitat" class="vector-menu mw-portlet mw-portlet-Comunitat" > <div class="vector-menu-heading"> Comunitat </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-portal" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Portal" title="Sobre el projecte, què podeu fer, on trobareu les coses"><span>Portal viquipedista</span></a></li><li id="n-Agenda-d'actes" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Trobades"><span>Agenda d'actes</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Especial:Canvis_recents" title="Una llista dels canvis recents al wiki [r]" accesskey="r"><span>Canvis recents</span></a></li><li id="n-La-taverna" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:La_taverna"><span>La taverna</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Contacte"><span>Contacte</span></a></li><li id="n-Xat" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Canals_IRC"><span>Xat</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Ajuda" title="El lloc per a saber més coses"><span>Ajuda</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Portada" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Viquipèdia" src="/static/images/mobile/copyright/wikipedia-wordmark-ca.svg" style="width: 7.5em; height: 1.4375em;"> <img class="mw-logo-tagline" alt="l'Enciclopèdia Lliure" src="/static/images/mobile/copyright/wikipedia-tagline-ca.svg" width="120" height="14" style="width: 7.5em; height: 0.875em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Especial:Cerca" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Cerca a la Viquipèdia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Cerca</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Cerca a Viquipèdia" aria-label="Cerca a Viquipèdia" autocapitalize="sentences" title="Cerca a la Viquipèdia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Especial:Cerca"> </div> <button class="cdx-button cdx-search-input__end-button">Cerca</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Eines personals"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Aparença"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Aparença" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Aparença</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_ca.wikipedia.org&uselang=ca" class=""><span>Donatius</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Especial:Crea_compte&returnto=M%C3%B2dul%3ACoordenades&returntoquery=action%3Dedit" title="Us animem a crear un compte i iniciar una sessió, encara que no és obligatori" class=""><span>Crea un compte</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Especial:Registre_i_entrada&returnto=M%C3%B2dul%3ACoordenades&returntoquery=action%3Dedit" title="Us animem a registrar-vos, però no és obligatori [o]" accesskey="o" class=""><span>Inicia la sessió</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Més opcions" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Eines personals" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Eines personals</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Menú d'usuari" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_ca.wikipedia.org&uselang=ca"><span>Donatius</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Especial:Crea_compte&returnto=M%C3%B2dul%3ACoordenades&returntoquery=action%3Dedit" title="Us animem a crear un compte i iniciar una sessió, encara que no és obligatori"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Crea un compte</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Especial:Registre_i_entrada&returnto=M%C3%B2dul%3ACoordenades&returntoquery=action%3Dedit" title="Us animem a registrar-vos, però no és obligatori [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Inicia la sessió</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pàgines per a editors no registrats <a href="/wiki/Ajuda:Introducci%C3%B3" aria-label="Vegeu més informació sobre l'edició"><span>més informació</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Especial:Contribucions_pr%C3%B2pies" title="Una llista de les modificacions fetes des d'aquesta adreça IP [y]" accesskey="y"><span>Contribucions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Especial:Discussi%C3%B3_personal" title="Discussió sobre les edicions per aquesta adreça ip. [n]" accesskey="n"><span>Discussió per aquest IP</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Lloc"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <h1 id="firstHeading" class="firstHeading mw-first-heading">Mostra la font per a Mòdul:Coordenades</h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Aquest article només existeix en aquesta llengua. Afegiu l'article per a altres llengües" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-0" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">Afegeix llengües</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="uls-after-portlet-link"></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Espais de noms"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-module" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/M%C3%B2dul:Coordenades" title="Mostra la pàgina del mòdul [c]" accesskey="c"><span>Mòdul</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/M%C3%B2dul_Discussi%C3%B3:Coordenades" rel="discussion" title="Discussió sobre el contingut d'aquesta pàgina [t]" accesskey="t"><span>Discussió</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Canvia la variant de llengua" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Vistes"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="vector-tab-noicon mw-list-item"><a href="/wiki/M%C3%B2dul:Coordenades"><span>Mostra</span></a></li><li id="ca-viewsource" class="selected vector-tab-noicon mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Coordenades&action=edit" title="Aquesta pàgina està protegida. Podeu veure'n el codi font. [e]" accesskey="e"><span>Mostra el codi</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Coordenades&action=history" title="Versions antigues d'aquesta pàgina [h]" accesskey="h"><span>Mostra l'historial</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Eines de la pàgina"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Eines" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Eines</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Eines</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">mou a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">amaga</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Més opcions" > <div class="vector-menu-heading"> Accions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="vector-more-collapsible-item mw-list-item"><a href="/wiki/M%C3%B2dul:Coordenades"><span>Mostra</span></a></li><li id="ca-more-viewsource" class="selected vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Coordenades&action=edit"><span>Mostra el codi</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Coordenades&action=history"><span>Mostra l'historial</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Especial:Enlla%C3%A7os/M%C3%B2dul:Coordenades" title="Una llista de totes les pàgines wiki que enllacen amb aquesta [j]" accesskey="j"><span>Què hi enllaça</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Especial:Seguiment/M%C3%B2dul:Coordenades" rel="nofollow" title="Canvis recents a pàgines enllaçades des d'aquesta pàgina [k]" accesskey="k"><span>Canvis relacionats</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Especial:P%C3%A0gines_especials" title="Llista totes les pàgines especials [q]" accesskey="q"><span>Pàgines especials</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Coordenades&action=info" title="Més informació sobre aquesta pàgina"><span>Informació de la pàgina</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Especial:UrlShortener&url=https%3A%2F%2Fca.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DM%25C3%25B2dul%3ACoordenades%26action%3Dedit"><span>Obtén una URL abreujada</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Especial:QrCode&url=https%3A%2F%2Fca.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DM%25C3%25B2dul%3ACoordenades%26action%3Dedit"><span>Descarrega el codi QR</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> En altres projectes </div> <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="Enllaç a l'element del repositori de dades connectat [g]" accesskey="g"><span>Element a Wikidata</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Eines de la pàgina"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Aparença"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Aparença</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">mou a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">amaga</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> </div> <div id="contentSub"><div id="mw-content-subtitle">← <a href="/wiki/M%C3%B2dul:Coordenades" title="Mòdul:Coordenades">Mòdul:Coordenades</a></div></div> <div id="mw-content-text" class="mw-body-content"><p>No teniu permís per a modificar aquesta pàgina, pels motius següents: </p> <ul class="permissions-errors"><li class="mw-permissionerror-protectedpagetext">Aquesta pàgina està protegida per evitar modificacions. Comproveu la pàgina de discussió per si el tema que voleu modificar ja s'ha discutit. En cas contrari, exposeu la qüestió i assegureu-vos d'arribar a un consens sobre els canvis a fer. Si es tracta d'un canvi menor o no controvertit, podeu demanar la modificació clicant l'enllaç a continuació i explicant els canvis i els motius de forma que pugui ser atès per algú sense coneixements del tema. <center> <p><a class="external text" href="https://ca.wikipedia.org/w/index.php?title=M%C3%B2dul_Discussi%C3%B3:Coordenades&action=edit&preload=Plantilla:Modificació_protegida/Preload&preloadtitle=Sol%C2%B7licitud+de+modificaci%C3%B3+protegida+29-11-2024&section=new">Sol·licita una modificació</a> </p> </center></li><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/Usuari:Jon_Kolbert" title="Usuari: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: 16:12, 27 ago 2023</li> <li>Expiry of block: 16:12, 27 ago 2028</li></ul> <p>Your current IP address is 8.222.208.146. The blocked range is 8.222.128.0/17. </p><p>Incloeu els detalls de dalt en totes les consultes que feu. Si penseu que heu estat blocat per error, trobareu més informació i instruccions al reglament global <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/No_open_proxies" class="extiw" title="m:Special:MyLanguage/No open proxies">No proxys oberts</a>. </p> Altrament, per a discutir sobre el blocatge, <a href="https://meta.wikimedia.org/wiki/Steward_requests/Global" class="extiw" title="m:Steward requests/Global">publiqueu una sol·licitud de revisió a 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></ul><hr /> <p>Podeu veure i copiar el codi font d’aquesta pàgina. </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 replace the functionality of {{Coord}} and related templates. It provides several methods, including {{#Invoke:Coordenades | coord }} : General function formatting and displaying coordinate values. {{#Invoke:Coordenades | dec2dms }} : Simple function for converting decimal degree values to DMS format. {{#Invoke:Coordenades | dms2dec }} : Simple function for converting DMS format to decimal degree format. {{#Invoke:Coordinates | link }} : Export the link used to reach the tools ]] local math_mod = require( "Module:Math" ); local coordinates = {}; local current_page = mw.title.getCurrentTitle() local page_name = mw.uri.encode( current_page.prefixedText, 'WIKI' ); local coord_link = '//geohack.toolforge.org/geohack.php?pagename=' .. page_name .. '&language=ca&params=' --[[ Helper function, replacement for {{coord/display/title}} ]] local function displaytitle (s, notes) local l = '<span title="Coordenades geogràfiques WGS84">Coord.:</span> ' .. s local co = '<span id="coordinates">' .. l .. notes .. '</span>' local frame = mw.getCurrentFrame() return frame:extensionTag( 'indicator', co, { name = 'coordinates-ind' } ) end --[[ Helper function, Replacement for {{coord/display/inline}} ]] local function displayinline (s, notes) return s .. notes end --[[ Helper function, used in detecting DMS formatting ]] local function dmsTest (first, second) if type(first) ~= 'string' or type(second) ~= 'string' then return nil end local s = (first .. second):upper() return s:find('^[NS][EWO]$') or s:find('^[EWO][NS]$') end --[[ Wrapper function to grab args, see Module:Arguments for this function's documentation. ]] local function makeInvokeFunc(funcName) return function (frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Plantilla:Coord' }) return coordinates[funcName](args) end end --[[ Helper function, handle optional args. ]] local function optionalArg(arg, suplement) return arg and arg .. suplement or '' end --[[ Formats any error messages generated for display ]] local function errorPrinter(errors) local result = "" for i,v in ipairs(errors) do local errorHTML = '<strong class="error">Coordenades: ' .. v[2] .. '</strong>' result = result .. errorHTML .. "<br />" end return result end --[[ Determine the required CSS class to display coordinates Usually geo-nondefault is hidden by CSS, unless a user has overridden this for himself default is the mode as specificied by the user when calling the {{coord}} template mode is the display mode (dec or dms) that we will need to determine the css class for ]] local function displayDefault(default, mode) if default == "" then default = "dms" end if default == mode then return "geo-default" else return "geo-nondefault" end end --[[ specPrinter Output formatter. Takes the structure generated by either parseDec or parseDMS and formats it for inclusion on Wikipedia. ]] local function specPrinter(args, coordinateSpec) local uriComponents = coordinateSpec["param"] if uriComponents == "" then -- RETURN error, should never be empty or nil return "ERROR param és buit" end if coordinateSpec["name"] then uriComponents = uriComponents .. "&title=" .. mw.uri.encode(coordinateSpec["name"]) end local geodmshtml = '<span class="geo-dms" title="Mapes, fotos aèries i altres informacions per a aquesta localització">' .. coordinateSpec["dms-lat"] .. ', ' .. coordinateSpec["dms-long"] .. '</span>' local lat = tonumber( coordinateSpec["dec-lat"] ) or 0 local geodeclat if lat < 0 then -- FIXME this breaks the pre-existing precision geodeclat = tostring(coordinateSpec["dec-lat"]):sub(2) .. "°S" else geodeclat = (coordinateSpec["dec-lat"] or 0) .. "°N" end local long = tonumber( coordinateSpec["dec-long"] ) or 0 local geodeclong if long < 0 then -- FIXME does not handle unicode minus geodeclong = tostring(coordinateSpec["dec-long"]):sub(2) .. "°O" else geodeclong = (coordinateSpec["dec-long"] or 0) .. "°E" end local geodechtml = '<span class="geo-dec" title="Mapes, fotos aèries i altres informacions per a aquesta localització">' .. '<span class="latitude">' .. geodeclat .. '</span>,' .. '<span class="longitude">' .. geodeclong .. '</span>' .. '</span>' local geonumhtml = '<span class="geo">' .. coordinateSpec["dec-lat"] .. '; ' .. coordinateSpec["dec-long"] .. '</span>' local inner = '<span class="' .. displayDefault(coordinateSpec["default"], "dms" ) .. '">' .. geodmshtml .. '</span>' .. '<span class="geo-multi-punct">&#xfeff; / &#xfeff;</span>' .. '<span class="' .. displayDefault(coordinateSpec["default"], "dec" ) .. '">'; if not args["name"] then inner = inner .. geodechtml .. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span></span>' else inner = inner .. '<span class="vcard">' .. geodechtml .. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span>' .. '<span style="display:none">&#xfeff; (<span class="fn org">' .. args["name"] .. '</span>)</span></span></span>' end return '<span class="plainlinks nourlexpansion">' .. '[' .. coord_link .. uriComponents .. ' ' .. inner .. ']' .. '</span>' end --[[ Helper function, convert decimal to degrees ]] local function convert_dec2dms_d(coordinate) local d = math_mod._round( coordinate, 0 ) .. "°" return d .. "" end --[[ Helper function, convert decimal to degrees and minutes ]] local function convert_dec2dms_dm(coordinate) coordinate = math_mod._round( coordinate * 60, 0 ); local m = coordinate % 60; coordinate = math.floor( (coordinate - m) / 60 ); local d = coordinate % 360 .."°&nbsp;" return d .. string.format( "%02d′", m ) end --[[ Helper function, convert decimal to degrees, minutes, and seconds ]] local function convert_dec2dms_dms(coordinate) coordinate = math_mod._round( coordinate * 60 * 60, 0 ); local s = coordinate % 60 coordinate = math.floor( (coordinate - s) / 60 ); local m = coordinate % 60 coordinate = math.floor( (coordinate - m) / 60 ); local d = coordinate % 360 .."°&nbsp;" return d .. string.format( "%02d′", m ) .. "&nbsp;" .. string.format( "%02d″", s ) end --[[ Helper function, convert decimal latitude or longitude to degrees, minutes, and seconds format based on the specified precision. ]] local function convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision) local coord = tonumber(coordinate) or 0 local postfix if coord >= 0 then postfix = "&nbsp;" .. firstPostfix else postfix = "&nbsp;" .. secondPostfix end precision = precision:lower(); if precision == "dms" then return convert_dec2dms_dms( math.abs( coord ) ) .. postfix; elseif precision == "dm" then return convert_dec2dms_dm( math.abs( coord ) ) .. postfix; elseif precision == "d" then return convert_dec2dms_d( math.abs( coord ) ) .. postfix; end end --[[ Convert DMS format into a N or E decimal coordinate ]] local function convert_dms2dec(direction, degrees_str, minutes_str, seconds_str) local degrees = tonumber(degrees_str) or 0 local minutes = tonumber(minutes_str) or 0 local seconds = tonumber(seconds_str) or 0 local factor = 1 direction = direction:gsub('^ *(.-) *$', '%1'); if direction == "S" or direction == "W" or direction == "O" then factor = -1 end local precision = 0 if seconds_str then precision = 5 + math.max( math_mod._precision(seconds_str), 0 ); elseif minutes_str then precision = 3 + math.max( math_mod._precision(minutes_str), 0 ); else precision = math.max( math_mod._precision(degrees_str), 0 ); end local decimal = factor * (degrees+(minutes+seconds/60)/60) return string.format( "%." .. precision .. "f", decimal ) -- not tonumber since this whole thing is string based. end --[[ Checks input values to for out of range errors. ]] local function validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, source, strong ) local errors = {}; lat_d = tonumber( lat_d ) or 0; lat_m = tonumber( lat_m ) or 0; lat_s = tonumber( lat_s ) or 0; long_d = tonumber( long_d ) or 0; long_m = tonumber( long_m ) or 0; long_s = tonumber( long_s ) or 0; if strong then if lat_d < 0 then table.insert(errors, {source, "latitud negativa i amb direcció"}) end if long_d < 0 then table.insert(errors, {source, "longitud negativa i amb direcció"}) end --[[ #coordinates is inconsistent about whether this is an error. If globe: is specified, it won't error on this condition, but otherwise it will. For not simply disable this check. if long_d > 180 then table.insert(errors, {source, "longitude degrees > 180 with hemisphere flag"}) end ]] end if lat_d > 90 then table.insert(errors, {source, "graus de latitud > 90"}) end if lat_d < -90 then table.insert(errors, {source, "graus de latitud < -90"}) end if lat_m >= 60 then table.insert(errors, {source, "minuts de latitud >= 60"}) end if lat_m < 0 then table.insert(errors, {source, "minuts de latitud < 0"}) end if lat_s >= 60 then table.insert(errors, {source, "segons de latitud >= 60"}) end if lat_s < 0 then table.insert(errors, {source, "segons de latitud < 0"}) end if long_d >= 360 then table.insert(errors, {source, "graus de longitud >= 360"}) end if long_d <= -360 then table.insert(errors, {source, "graus de longitud <= -360"}) end if long_m >= 60 then table.insert(errors, {source, "minuts de longitud >= 60"}) end if long_m < 0 then table.insert(errors, {source, "minuts de longitud < 0"}) end if long_s >= 60 then table.insert(errors, {source, "segons de longitud >= 60"}) end if long_s < 0 then table.insert(errors, {source, "segons de longitud < 0"}) end return errors; end --[[ parseDec Transforms decimal format latitude and longitude into the a structure to be used in displaying coordinates ]] local function parseDec( lat, long, format ) local coordinateSpec = {} local errors = {} if not long then return nil, {{"parseDec", "falta la longitud"}} elseif not tonumber(long) then return nil, {{"parseDec", "La longitud no és numèrica: " .. long}} end errors = validate( lat, nil, nil, long, nil, nil, 'parseDec', false ); coordinateSpec["dec-lat"] = lat; coordinateSpec["dec-long"] = long; local mode = coordinates.determineMode( lat, long ); coordinateSpec["dms-lat"] = convert_dec2dms( lat, "N", "S", mode) -- {{coord/dec2dms|{{{1}}}|N|S|{{coord/prec dec|{{{1}}}|{{{2}}}}}}} coordinateSpec["dms-long"] = convert_dec2dms( long, "E", "O", mode) -- {{coord/dec2dms|{{{2}}}|E|W|{{coord/prec dec|{{{1}}}|{{{2}}}}}}} if format then coordinateSpec.default = format else coordinateSpec.default = "dms" -- a diferència de l'anglesa, per defecte sempre dms end return coordinateSpec, errors end --[[ parseDMS Transforms degrees, minutes, seconds format latitude and longitude into the a structure to be used in displaying coordinates ]] local function parseDMS( lat_d, lat_m, lat_s, lat_f, long_d, long_m, long_s, long_f, format ) local coordinateSpec = {} local errors = {} lat_f = lat_f:upper(); long_f = long_f:upper(); -- Check if specified backward if lat_f == 'E' or lat_f == 'W' or lat_f == "O" then local t_d, t_m, t_s, t_f; t_d = lat_d; t_m = lat_m; t_s = lat_s; t_f = lat_f; lat_d = long_d; lat_m = long_m; lat_s = long_s; lat_f = long_f; long_d = t_d; long_m = t_m; long_s = t_s; long_f = t_f; end errors = validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, 'parseDMS', true ); if not long_d then return nil, {{"parseDMS", "falta la longitud"}} elseif not tonumber(long_d) then return nil, {{"parseDMS", "La longitud no és numèrica:" .. long_d }} end if not lat_m and not lat_s and not long_m and not long_s and #errors == 0 then if math_mod._precision( lat_d ) > 0 or math_mod._precision( long_d ) > 0 then if lat_f:upper() == 'S' then lat_d = '-' .. lat_d; end if long_f:upper() == 'W' or long_f:upper() == 'O' then long_d = '-' .. long_d; end return parseDec( lat_d, long_d, format ); end end if long_f == "W" then long_f = "O" -- direcció a mostrar, excepte a coordinateSpec["param"] end coordinateSpec["dms-lat"] = lat_d.."°&nbsp;"..optionalArg(lat_m,"′&nbsp;") .. optionalArg(lat_s,"″&nbsp;") .. lat_f coordinateSpec["dms-long"] = long_d.."°&nbsp;"..optionalArg(long_m,"′&nbsp;") .. optionalArg(long_s,"″&nbsp;") .. long_f coordinateSpec["dec-lat"] = convert_dms2dec(lat_f, lat_d, lat_m, lat_s) -- {{coord/dms2dec|{{{4}}}|{{{1}}}|0{{{2}}}|0{{{3}}}}} coordinateSpec["dec-long"] = convert_dms2dec(long_f, long_d, long_m, long_s) -- {{coord/dms2dec|{{{8}}}|{{{5}}}|0{{{6}}}|0{{{7}}}}} if format then coordinateSpec.default = format else coordinateSpec.default = "dms" end return coordinateSpec, errors end --[[ Funció auxiliar per convertir coma decimal a punt decimal ]] local function formatPunt(num) return mw.ustring.gsub(num, ",", ".") end --[[ Funció auxilar per convertir longitud O a W ]] local function formatLongW(dir) if dir:upper() == "O" then return "W" end return dir end --[[ Check the input arguments for coord to determine the kind of data being provided and then make the necessary processing. ]] local function formatTest(args) local result, errors local primary = false if not args[1] then -- no lat logic return errorPrinter( {{"formatTest", "falta la latitud"}} ) elseif not tonumber(args[1]) then -- bad lat logic return errorPrinter( {{"formatTest", "La latitud no és numèrica:" .. args[1]}} ) elseif not args[4] and not args[5] and not args[6] then -- dec logic result, errors = parseDec(formatPunt(args[1]), formatPunt(args[2]), args.format) if not result then return errorPrinter( errors ); end result.param = table.concat({formatPunt(args[1]), 'N', formatPunt(args[2]) or '', 'E', args[3] or ''}, '_') elseif dmsTest(args[4], args[8]) then -- dms logic result, errors = parseDMS(args[1], args[2], formatPunt(args[3]), args[4], args[5], args[6], formatPunt(args[7]), args[8], args.format) if args[10] then table.insert(errors, {'formatTest', 'sobren paràmetres'}) end if not result then return errorPrinter(errors) end result.param = table.concat({args[1], args[2], formatPunt(args[3]), args[4], args[5], args[6], formatPunt(args[7]), formatLongW(args[8]), args[9]}, '_') elseif dmsTest(args[3], args[6]) then -- dm logic result, errors = parseDMS(args[1], formatPunt(args[2]), nil, args[3], args[4], formatPunt(args[5]), nil, args[6], args['format']) if args[8] then table.insert(errors, { 'formatTest', 'sobren paràmetres' }) end if not result then return errorPrinter(errors) end result.param = table.concat({args[1], formatPunt(args[2]), args[3], args[4], formatPunt(args[5]), formatLongW(args[6]), args[7]}, '_') elseif dmsTest(args[2], args[4]) then -- d logic result, errors = parseDMS(formatPunt(args[1]), nil, nil, args[2], formatPunt(args[3]), nil, nil, args[4], args['format']) if args[6] then table.insert(errors, {'formatTest', 'sobren paràmetres' }) end if not result then return errorPrinter(errors) end result.param = table.concat({formatPunt(args[1]), args[2], formatPunt(args[3]), formatLongW(args[4]), args[5]}, '_') else -- Error return errorPrinter({{"formatTest", "format no reconegut"}}) end result.name = args.name or args.nom local extra_param = {'dim', 'globe', 'scale', 'region', 'source', 'type'} for _, v in ipairs(extra_param) do if args[v] then table.insert(errors, {'formatTest', 'Paràmetre: "' .. v .. '=" hauria de ser "' .. v .. ':"'}) end end local ret = specPrinter(args, result) if #errors > 0 then ret = ret .. " " .. errorPrinter(errors) .. '[[Categoria:Manteniment plantilla coord]]' end return ret end --[[ Generate Wikidata tracking categories. Aquesta funció no s'està utilitzant. Pendent de revisar les categories de seguiment necessàries. ]] local function makeWikidataCategories() local ret if mw.wikibase and current_page.namespace == 0 then local entity = mw.wikibase.getEntityObject() if entity and entity.claims and entity.claims.P625 and entity.claims.P625[1] then local snaktype = entity.claims.P625[1].mainsnak.snaktype if snaktype == 'value' then -- coordinates exist both here and on Wikidata, and can be compared. ret = 'Articles amb coordenades' elseif snaktype == 'somevalue' then ret = 'Coordenades de Wikidata amb valor desconegut' elseif snaktype == 'novalue' then ret = 'Coordenades de Wikidata sense cap valor definit' end else -- We have to either import the coordinates to Wikidata or remove them here. ret = 'Articles amb coordenades sense coordenades a Wikidata' end end if ret then return string.format('[[Categoria:%s]]', ret) else return '' end end --[[ link Simple function to export the coordinates link for other uses. Usage: {{ Invoke:Coordinates | link }} ]] function coordinates.link(frame) return coord_link; end --[[ dec2dms Wrapper to allow templates to call dec2dms directly. Usage: {{ Invoke:Coordinates | dec2dms | decimal_coordinate | positive_suffix | negative_suffix | precision }} decimal_coordinate is converted to DMS format. If positive, the positive_suffix is appended (typical N or E), if negative, the negative suffix is appended. The specified precision is one of 'D', 'DM', or 'DMS' to specify the level of detail to use. ]] coordinates.dec2dms = makeInvokeFunc('_dec2dms') function coordinates._dec2dms(args) local coordinate = args[1] local firstPostfix = args[2] or '' local secondPostfix = args[3] or '' local precision = args[4] or '' return convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision) end --[[ Helper function to determine whether to use D, DM, or DMS format depending on the precision of the decimal input. ]] function coordinates.determineMode( value1, value2 ) local precision = math.max( math_mod._precision( value1 ), math_mod._precision( value2 ) ); if precision <= 0 then return 'd' elseif precision <= 2 then return 'dm'; else return 'dms'; end end --[[ dms2dec Wrapper to allow templates to call dms2dec directly. Usage: {{ Invoke:Coordinates | dms2dec | direction_flag | degrees | minutes | seconds }} Converts DMS values specified as degrees, minutes, seconds too decimal format. direction_flag is one of N, S, E, W, and determines whether the output is positive (i.e. N and E) or negative (i.e. S and W). ]] coordinates.dms2dec = makeInvokeFunc('_dms2dec') function coordinates._dms2dec(args) local direction = args[1] local degrees = args[2] local minutes = args[3] local seconds = args[4] return convert_dms2dec(direction, degrees, minutes, seconds) end --[[ coord Main entry point for Lua function to replace {{coord}} Usage: {{ Invoke:Coordinates | coord }} {{ Invoke:Coordinates | coord | lat | long }} {{ Invoke:Coordinates | coord | lat | lat_flag | long | long_flag }} ... Refer to {{coord}} documentation page for many additional parameters and configuration options. Note: This function provides the visual display elements of {{coord}}. In order to load coordinates into the database, the {{#coordinates:}} parser function must also be called, this is done automatically in the Lua version of {{coord}}. ]] coordinates.coord = makeInvokeFunc('_coord') function coordinates._coord(args) --[[ Intent de carregar de Wikidata. Pendent de solucionar {{#coordinates:}} afegit per la plantilla, no el mòdul if not args[1] and not args[2] and mw.wikibase.getEntityObject() then local entity = mw.wikibase.getEntityObject() if entity and entity.claims and entity.claims.P625 and entity.claims.P625[1].mainsnak.snaktype == 'value' then local precision = entity.claims.P625[1].mainsnak.datavalue.value.precision args[1]=entity.claims.P625[1].mainsnak.datavalue.value.latitude args[2]=entity.claims.P625[1].mainsnak.datavalue.value.longitude if precision then precision=-math_mod._round(math.log(precision)/math.log(10),0) args[1]=math_mod._round(args[1],precision) args[2]=math_mod._round(args[2],precision) end end end ]] local contents = formatTest(args) local Notes = args.notes or "" local Display = args.display and args.display:lower() or 'inline' local function isInline(s) -- Finds whether coordinates are displayed inline. return s:find('inline') ~= nil or s == 'i' or s == 'it' or s == 'ti' end local function isInTitle(s) -- Finds whether coordinates are displayed in the title. return s:find('title') ~= nil or s == 't' or s == 'it' or s == 'ti' end local text = '' if isInline(Display) then text = text .. displayinline(contents, Notes) end if isInTitle(Display) then text = text .. displaytitle(contents, Notes) -- .. makeWikidataCategories() end return text end --[[ coord2text Extracts a single value from a transclusion of {{Coord}}. IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED. Usage: {{#invoke:Coordinates | coord2text | {{Coord}} | parameter }} Valid values for the second parameter are: lat (signed integer), long (signed integer), type, scale, dim, region, globe, source ]] function coordinates.coord2text(frame) if frame.args[1] == '' or frame.args[2] == '' or not frame.args[2] then return nil end frame.args[2] = mw.text.trim(frame.args[2]) if frame.args[2] == 'lat' or frame.args[2] == 'long' then local coord_text = string.gsub(frame.args[1], "<s.->(.-)</span>", "%1") -- remove spans local coord_text = string.gsub(coord_text, ',', ' ') -- change default separator local result, positive = mw.text.split((mw.ustring.match(coord_text,'[%.%d]+°[NS] [%.%d]+°[EWO]') or ''), ' ') if frame.args[2] == 'lat' then result, positive = result[1], 'N' else result, positive = result[2], 'E' end result = mw.text.split(result, '°') if result[2] ~= positive then result[1] = '-' .. result[1] end return result[1] else return mw.ustring.match(frame.args[1], 'params=.-_'..frame.args[2]..':(.-)[ _]') end end return coordinates </textarea><div id="mw-scribunto-console"></div><div class="templatesUsed"><div class="mw-templatesUsedExplanation"><p>Aquesta pàgina fa servir les següents plantilles: </p></div><ul> <li><a href="/wiki/Plantilla:Ml" title="Plantilla:Ml">Plantilla:Ml</a> (<a href="/w/index.php?title=Plantilla:Ml&action=edit" title="Plantilla:Ml">modifica</a>) </li><li><a href="/wiki/Plantilla:Plantilla_protegida" title="Plantilla:Plantilla protegida">Plantilla:Plantilla protegida</a> (<a href="/w/index.php?title=Plantilla:Plantilla_protegida&action=edit" title="Plantilla:Plantilla protegida">mostra el codi font</a>) (semiprotegida)</li><li><a href="/wiki/Plantilla:Red_link_preload" title="Plantilla:Red link preload">Plantilla:Red link preload</a> (<a href="/w/index.php?title=Plantilla:Red_link_preload&action=edit" title="Plantilla:Red link preload">modifica</a>) </li><li><a href="/wiki/Plantilla:Tl" title="Plantilla:Tl">Plantilla:Tl</a> (<a href="/w/index.php?title=Plantilla:Tl&action=edit" title="Plantilla:Tl">mostra el codi font</a>) (protegida)</li><li><a href="/wiki/Plantilla:%C3%9As_de_la_plantilla/caixa" title="Plantilla:Ús de la plantilla/caixa">Plantilla:Ús de la plantilla/caixa</a> (<a href="/w/index.php?title=Plantilla:%C3%9As_de_la_plantilla/caixa&action=edit" title="Plantilla:Ús de la plantilla/caixa">mostra el codi font</a>) (protegida)</li><li><a href="/wiki/Plantilla:%C3%9As_de_la_plantilla/styles.css" title="Plantilla:Ús de la plantilla/styles.css">Plantilla:Ús de la plantilla/styles.css</a> (<a href="/w/index.php?title=Plantilla:%C3%9As_de_la_plantilla/styles.css&action=edit" title="Plantilla:Ús de la plantilla/styles.css">modifica</a>) </li><li><a href="/wiki/M%C3%B2dul:Coordenades/%C3%BAs" title="Mòdul:Coordenades/ús">Mòdul:Coordenades/ús</a> (<a href="/w/index.php?title=M%C3%B2dul:Coordenades/%C3%BAs&action=edit" title="Mòdul:Coordenades/ús">modifica</a>) </li></ul></div><p id="mw-returnto">Torna cap a <a href="/wiki/M%C3%B2dul:Coordenades" title="Mòdul:Coordenades">Mòdul:Coordenades</a>.</p> <!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Obtingut de «<a dir="ltr" href="https://ca.wikipedia.org/wiki/Mòdul:Coordenades">https://ca.wikipedia.org/wiki/Mòdul:Coordenades</a>»</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <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">Política de privadesa</a></li> <li id="footer-places-about"><a href="/wiki/Viquip%C3%A8dia:Quant_a_la_Viquip%C3%A8dia">Quant al projecte Viquipèdia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Viquip%C3%A8dia:Av%C3%ADs_d%27exempci%C3%B3_de_responsabilitat">Descàrrec de responsabilitat</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Codi de conducta</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Desenvolupadors</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/ca.wikipedia.org">Estadístiques</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Declaració de cookies</a></li> <li id="footer-places-mobileview"><a href="//ca.m.wikipedia.org/w/index.php?title=M%C3%B2dul:Coordenades&action=edit&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Versió per a mòbils</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> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c59558b9d-vx6kp","wgBackendResponseTime":161,"wgPageParseReport":{"limitreport":{"cputime":"0.022","walltime":"0.024","ppvisitednodes":{"value":31,"limit":1000000},"postexpandincludesize":{"value":1312,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":5,"limit":100},"expensivefunctioncount":{"value":1,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":0,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 0.000 1 -total"]},"scribunto":{"limitreport-timeusage":{"value":"0.004","limit":"10.000"},"limitreport-memusage":{"value":617746,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-5c59558b9d-vx6kp","timestamp":"20241129043012","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>