Aller au contenu

Module:Infobox/Relief terrestre

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 27 août 2017 à 21:12 et modifiée en dernier par Thierry Caro (discuter | contributions). Elle peut contenir des erreurs, des inexactitudes ou des contenus vandalisés non présents dans la version actuelle.

 Documentation[voir] [modifier] [historique] [purger]

Cette page définit un module d'infobox. Pour les conseils sur l'usage de ce module, voyez Modèle:Infobox Relief terrestre.


local location = require "Module:Infobox/Fonctions/Géolocalisation"
local general = require "Module:Infobox/Fonctions"
local wikidata = require "Module:Wikidata"
local convert = require "Module:Conversion"
local linguistic = require "Module:Linguistique"
local building = require "Module:Infobox/Fonctions/Bâtiment" -- à passer vers /Géolocalisation

return 	{
	maincolor = '#996633',
	thirdcolor = 'white',
	parts = {
		
		general.title('map', {color = 'white'}),
		general.mainimage('Article à illustrer Montagne', 'Defaut.svg'),
		{type = 'table', title = 'Nom', rows = {
			{type = 'row', label = 'Originel', value = 'nom originel', wikidata = {property = 'P1705', showlang = true}},
			{type = 'row', label = 'Nommé par', value = 'nom originel', wikidata = {showonlyqualifier = 'P3938', property = 'P1705', excludespecial = 'true'}},
			{type = 'row', label = 'En référence à', value = 'en référence à', wikidata = {showonlyqualifier = 'P138', property = 'P1705', excludespecial = 'true'}},
		}
		},
		{type = 'table', title = 'Géographie', rows = {
			{type = 'row', label = '[[Point culminant]]', value = 'point culminant', property = 'P610'},
			{type = 'row', label = '[[Altitude]]', value = 'altitude', wikidata = {property = 'P2044', targetunit = 'metre', conjtype = ' ou ', rounding = '0'} },
			{type = 'row', label = '[[Hauteur de culminance|Culminance]]', value = 'culminance', wikidata = {property = 'P2660', targetunit = 'm', rounding = '0'}},
			{type = 'row', label = '[[Isolement topographique|Isolement]]', value = 'isolement', wikidata = {property = 'P2659', targetunit = 'km', rounding = '1'}},
			{type = 'row', label = 'Sommet parent', value = 'parent', property = 'P3137'},
			{type = 'row', label = '[[Chaîne de montagnes|Massif]]', value = 'massif', wikidata = {property = 'P706', defaultlinkquery = {property = 'P706'}}},
			{type = 'row', label = 'Longueur', value = 'longueur', wikidata = {property = 'P2043', targetunit = 'km', rounding = '0'}},
			{type = 'row', label = 'Largeur', value = 'largeur', wikidata = {property = 'P2049', targetunit = 'km', rounding = '1'}},
			{type = 'row', label = 'Superficie', value = 'superficie', wikidata = {property = 'P2046', targetunit = 'sqkm', rounding = '0'} },
			location.coordinates()
		}
		},
		{type = 'table', title = 'Astre', rows = {
			{
				type = 'row',
				value = function ( localdata )
					local val = localdata['astre']
					if val and (mw.ustring.lower(val) ~= 'terre') then
						return val
					end
				end
			}
		}},
		{type = 'table', title = 'Administration', rows = {
			{type = 'row', label = 'Continent', plurallabel = 'Continents', value = 'continent', property = 'P30'},
			building.adminlocation(),
			building.protectedarea(),
		}},
		{type = 'table', title = 'Ascension', rows = {
			{type = 'row', label = '[[Première ascension|Première]]', value = 'première ascension', wikidata = {showonlyqualifier = {'P710', 'P585'}, property = 'P793', targetvalue = 'Q1194369'}},
			{type = 'row', label = 'Voie facile', value = 'voie', wikidata = {property = 'P2795', qualifier = 'P518', qualifiervalue = 'Q34976110', showqualifiers = 'P1427'}},
			{type = 'row', label = 'Visiteurs par an', value = 'visiteurs', wikidata = {property = 'P1174', showdate = 'true'}},
		}},
		{type = 'table', title = 'Géologie', rows = {
			{type = 'row', label = 'Âge', value = 'âge'},
			{type = 'row', label = '[[Roche]]s', value = 'roches', property = 'P186'},
			{type = 'row', label = 'Type', value = 'type', wikidata = {property = 'P31', excludevalues = {'Q8502', 'Q1595289', 'Q34987520'}}},
			{type = 'row', label = "[[Activité d'un volcan|Activité]]", value = 'activité'},
			{type = 'row', label = 'Dernière [[Éruption volcanique|éruption]]', value = 'éruption', wikidata = {property = 'P793', targetvalue = 'Q29575458', showonlyqualifier = {'P585', 'P580', 'P582'}, conjtype = ' - '}},
			{type = 'row', label = 'Code [[Global Volcanism Program|GVP]]', value = 'identifiant', wikidata = {property = "P1886", urlpattern="http://www.volcano.si.edu/volcano.cfm?vn=$1"}},
			{type = 'row', label = '[[Observatoire volcanologique|Observatoire]]', value = 'observatoire', property = 'P3815'}
		}},
		location.geoloc({marker='triangle', default_zoom=12, markercolor='#996633'}) 
	}
}