Módulo:Infobox/Funções/Edifício

Permanently protected module
Origem: Wikipédia, a enciclopédia livre.
Documentação do módulo[ver] [editar] [histórico] [purgar]

Descrição

Este módulo tem funções auxiliares para criar infocaixas

Uso

Outra documentação:

local p = {}
local localdata = require( 'Módulo:Infobox/Localdata' )
local item = localdata.item
local wd = require "Módulo:Infobox/Wikidata"
local general = require "Módulo:Infobox/Funções"
local linguistic = require "Módulo:Linguística"
local address = require "Módulo:Endereço"

local function keyDate(event)
    return wd.keyDate(event, item, {conjtype = 'comma', showqualifiers = {'P518'}, link = '-'})
end
local function keyDateConstruction(event)
    return wd.keyDate(event, item, {conjtype = 'comma', showqualifiers = {'P518', 'P4241'}, link = '-'})
end

local function inclexcl(statement, params) -- formata os qualificadores "P518" / "P1011" (para colocar em um sub-módulo de Módulo:Wikidata, como para as datas?
    local str = wd.formatSnak(statement.mainsnak, params)
    if not statement.qualifiers then
        return str
    end
    local incl = wd.getFormattedQualifiers(statement, "P518")
    local excl = wd.getFormattedQualifiers(statement, "P1011")

    if incl then
        str = str .. linguistic.inparentheses(incl .. " e incluindo") -- não o texto mais elegante, mas evita os problemas de concordância gramatical
    end
    if excl then
        str = str .. linguistic.inparentheses("sem " .. excl) -- não o texto mais elegante, mas evita os problemas de concordância gramatical
    end
    return str
end

function p.creatorQuery(prop)
    return {
        property = prop,
        entity = localdata.item,
        showqualifiers = {'P518'},
        showdate = true,
        qualiflink = '-',
        statementformat = function(statement)
        
            local str
            -- Começamos com os qualificadores (acessados, workshop etc.)
            local possiblequalifiers = {
                P1773 = "atribuído $to $creator",
                P1774 = "atelier $of $creator",
                P1775 = "seguidor $of $creator",
                P1776 = "círculo $of $creator",
                P1777 = "de $creator", -- TODO : de acordo com o mestre X
                P1778 = "falso de acordo com $creator",
                P1779 = "$creator (?)",
                P1780 = "escola $of",
                P1877 = "de acordo com um trabalho $of",
            }
 
            if statement.qualifiers then
                for qualif, text in pairs(possiblequalifiers) do
                    local creator = wd.getFormattedQualifiers(statement, {qualif})
                    if creator then
                        str = text
                        str = mw.ustring.gsub(str, '$to $creator', "a ".. creator)
                        str = mw.ustring.gsub(str, '$of $creator', linguistic.of(creator))
                        str = mw.ustring.gsub(str, '$creator', creator)
                        break
                    end
                end
            end
                    
            -- Caso contrário, o caminho normal
            if not str then
                str = wd.formatStatement(statement, {speciallabels = {Q4233718 = "anónimo"}}) -- speciallabels para evitar o link padrão
            end
            return str
        end
    }
end

--Titrest
function p.title()
    --    local class = cabeçalho padrão para definir aqui? ?
    return general.title()
end

--Image
function p.mainimage(cat, defaultimage)
    if not cat then
        cat = '!Artigo a ilustrar os vários edifícios'
    end
    return general.mainimage(cat, defaultimage)
end

function p.country()
    return -- depreciado
end

function p.historicalregion()
    return {
        type = 'row', -- para as regiões históricas, não adminstrativas
        value = 'região',
        label = localdata['nome região'] or localdata['link região'] or 'Região',
    }
end

function p.adminloc() -- exibe o endereço completo (rua, divisões administrativas relevantes, país) em um único campo

    -- nenhum parâmetro global para a linha streetstr e a linha de derivação, depende da história do modelo usado
    local country = localdata["país"] or localdata["países"]
    local streetstr =  localdata['endereço']
    local val, isAddress = address.fullAddress(localdata['item'], country, nil, streetstr)
    local label
    if isAddress then label = 'Endereço' else label = 'Localização' end --se não existe uma rua, deve evitar de se chamar "endereço"
    return
        {
        type = 'row',
        label = label,
        value = function() return val end
        }
end

function p.adminlocation() -- Função bastante complicada por causa das diferenças entre infobox. Simplificável se nós harmonizarmos infoboxes
    -- infobox para ter em conta: construção, arranha-céus, estação de trem, castelo
    -- localparams é uma tabela de parâmetros da infobox cuja presença desativa quando é chamada para adminloc()
    local hasparams = localdata['subdivisão1'] or localdata['subdivisão'] or localdata['subdivisão nome'] or localdata['subdivisão2'] or localdata['subdivisão3'] or localdata['comuna'] or localdata['vila'] or localdata['bairro']
    if localparams then
        for _,param in pairs(localparams) do
            hasparams = hasparams or localdata[ param ]
        end
    end
    
    if not (hasparams) then
        return p.adminloc()
    end
    return {
        type = 'multi',
        rows = {
            general.country(),
            p.historicalregion(),
            {
                type = 'row',
                value = {'subdivisão', 'subdivisão1', 'subdivisão nome'},
                label = localdata['nome subdivisão'] or localdata['link subdivisão1'] or localdata['link subdivisão'] or localdata['subdivisão tipo'] or 'Divisão administrativa'
            },
            {
                type = 'row',
                value = 'subdivisão2',
                label = localdata['nome subdivisão2'] or localdata['link subdivisão2'] or 'Subdivisão administrativa'
            },
            {
                type = 'row',
                value = 'subdivisão3',
                label = localdata['nome subdivisão3'] or localdata['link subdivisão3'] or 'Subdivisão administrativa'
            },
            {
                type = 'row',
                value = {'comuna', 'vila'},
                label = localdata['nome comuna'] or localdata['link comuna'] or 'Comuna'
            },
            {
                type = 'row',
                value = 'bairro',
                label = localdata['nome bairro'] or localdata['título bairro'] or 'Bairro'
            },
            {
                type = 'row',
                value = 'endereço',
                label = 'Endereço',
                wikidata = require('Módulo:Endereço').wikidataAddress(localdata.item),
            },
        }
    }
end

function p.onshoreof()
    return {
        type = 'row',
        label = 'Banhado por',
        value = {'banhado por', 'nas margens do', 'corpo'},
        wikidata = {property = 'P206', defaultlinkquery = {property = 'P361'}},
    }
end

function p.watershed()
    return {
        type = 'row',
        label = 'Bacia hidrográfica',
        value = {'bacia hidrográfica', 'bacia'},
        wikidata = {property = 'P4614', defaultlinkquery = {property = {'P4614', 'P138'}}},
    }
end

function p.protectedarea()
    return {
        type = 'row',
        label = 'Área protegida',
        plurallabel = 'Áreas protegidas',
        value = {'área protegida', 'áreas protegidas'},
        property = 'P3018',
    }
end

function p.island()
    return {
        type = 'row',
        label = 'Ilha',
        plurallabel = 'Ilhas',
        value = 'ilha',
        property = 'P5130',
    }
end

function p.mountainrange()
    return {
        type = 'row',
        label = 'Cordilheira',
        plurallabel = 'Cordilheiras',
        value = {'maciço', 'cordilheira'},
        wikidata = {property = 'P4552', defaultlinkquery = {property = 'P4552'}},
    }
end

function p.elevation()
    return {
        type = 'row',
        label = 'Altitude',
        value = 'altitude',
        wikidata = {property = 'P2044', targetunit = 'metro', conjtype = ' ou ', rounding = '0', numval = '2'},
    }
end

function p.coordenadas(args)
    return general.coordenadas(args)
end

function p.website(localparam)
    return general.website(localparam)
end

function p.cornerstonelaying()
    return {
        type = 'multi',
        rows = {
            {
                type = 'row',
                value = {'primeira pedra', 'pedra fundamental'},
                label = '[[Pedra fundamental]]',
                wikidata = keyDate('Q18752057')
            }
        }
    }
end

function p.construction()
    return {
        type = 'multi',
        rows = {

            -- construção antecipada, construção tardia (Legacy Infobox Stadium, Infobox Castelo),
            {
                type = 'row',
                value = {'contrução antecipada', 'antecipada'},
                label = 'Construção',
            },
            {
                type = 'row',
                value = {'fim construção', 'fim'},
                label = 'Fim de construção',
            },

            -- construção (nome do parâmetro "data de construção" para depreciar)
            {
                type = 'row',
                value = {'construção', 'período_construção', 'construído', 'concluído'},
                label = 'Período de construção',
                blockers = {'início reconstrução', 'início', 'fim construção', 'fim'},
                wikidata = keyDateConstruction{'Q385378'},
            },
        }
    }

end

function p.fondation()
    return {
        type = 'multi',
        rows = {
            {
                type = 'row',
                value = {'fundação', 'data de fundação'},
                label = 'Fondation',
                wikidata = keyDateConstruction{'Q3075355'},
            },
        }
    }

end

function p.reconstruction()
    return {
        type = 'multi',
        rows = {

            -- reconstrução precoce, fim de reconstrução tardia (Legacy Infobox Stadium, Infobox Castle),
            {
                type = 'row',
                value = {'início reconstrução', 'início'},
                label = 'Reconstrução',
            },
            {
                type = 'row',
                value = {'fim reconstrução', 'fim'},
                label = 'Fim de reconstrução',
            },

            -- reconstruir (nome do parâmetro "data de reconstrução" para depreciar)
            {
                type = 'row',
                value = {'reconstrução', 'data de reconstrução'},
                label = 'Reconstrução',
                wikidata = keyDate{'Q1370468'}
            },
        }
    }

end

function p.opening()  --abertura / consagração / data de comissionamento (! = data de construção)
    return {
        type = 'multi',
        rows = {
            {
                type = 'row',
                value =  {"abertura", "data de abertura"},
                label = 'Abertura',
                wikidata = keyDate{'P1619', 'Q15051339'} -- P1619 = abertura oficial, não a abertura de facto
            },
            {
                type = 'row',
                value = 'inauguração',
                label = 'Inauguração',
                blockers = {"abertura", "data de abertura"},
                wikidata = keyDate{'Q1417098'}
            },
            {
                type = 'row',
                value = 'consagração',
                label = 'Consagração',
                blockers = 'inauguração',
                wikidata = keyDate{'Q125375'}
            },
            {
                type = 'row',
                value = 'dedicação',
                label = 'Dedicação',
                blockers = 'inauguração',
                wikidata = keyDate{'Q1762010'}
            },
            {
                type = 'row',
                value = 'primeira luz',
                label = '[[Primeira luz (astronomia)|Primeira luz]]',
                blockers = {"abertura", "data de abertura"},
                wikidata = keyDate{'Q1306940'} -- P1619 = abertura oficial, não a abertura de facto
            },
        }
    }
end


function p.renovation()
    return {
        type = 'multi',
        rows = {
            {
                type = 'row',
                value = 'restauração',
                label = 'Restauração',           
                wikidata = keyDate{'Q217102'},
                blockers = 'renovação',
            },
            {
                type = 'row',
                value = 'renovação',
                label = 'Renovação',           
                wikidata = keyDate{'Q2144402'},
                blockers = 'restauração',
            },
            {
                type = 'row',
                value = {'extensão', 'melhoramentos'},
                label = 'Extensão',       
                wikidata = keyDate{'Q19841649'},
                blockers = 'restauração',
            },
            {
                type = 'row',
                value = 'outros trabalhos',
                label = 'Outras campanhas de trabalhos',       
        },
    }
}
end

function p.relocation()
    return {
        type = 'multi',
        rows = {
            {
                type = 'row',
                value = {'relocação', 'data de relocaão'},
                label = 'Relocação',
                plurallabel = 'Relocações',
                wikidata = keyDate('Q826949')
            }
        }
    }
end

function p.demolition()
    return {
        type = 'multi',
        rows = {
            {
                type = 'row',
                value = {'demolição', 'data de demolição', 'demolido'},
                label = 'Demolição',
                wikidata = keyDate{'Q331483', 'P576'}
            },
            {
                type = 'row',
                value = {'destruição'},
                label = 'Destruição',
                wikidata = keyDate('Q17781833')
            },
            {
                type = 'row',
                value = {'vandalismo'},
                label = 'Vandalismo',
                wikidata = keyDate('Q6160')
            }
        }
    }
end

function p.closure()
    return {
        type = 'row',
        value = {'encerramento', 'data de encerramento', 'extinção', 'desativação'},
        label = 'Encerramento',
        wikidata = keyDate{'Q14954904', 'P3999', 'P576'} -- P576: data de dissolução, reservada às organizações
    }
end

function p.usage()
    return {
        type = 'row',
        label = 'Uso',
        value = 'uso',
        blockers = 'destino atual',
        wikidata = {
            property = 'P366',
            speciallabels = {Q182060 = 'escritório'}, -- bureaux semble toujours pouvoir se mettre au pluriel quand c'est en P366 d'un bâtiment
            showdate = true
        }   
    }
end

function p.operator()
    return {
        type = 'row',
        label = 'Administrador',
        wikidata = {property = 'P137', showdate= true},
        value = {'administração', 'administrador', 'organização', 'organizacao'}
    }
end

function p.maintenance()
    return {
        type = 'row',
        label = 'Manutenção',
        wikidata = {property = 'P126', showdate= true},
        value = {'manutenção'}
    }
end

function p.transport()
    return {
        type = 'multi',
        rows = {
            {type = 'row', label = 'Estacionamento', value = 'estacionamento'},
            {type = 'row', label = 'Estação', value = 'estação'},
            {type = 'row', label = 'Metro', value = 'metro'},
            {type = 'row', label = 'Tramway', value = {'tram', 'tramway'}},
            {type = 'row', label = 'Onibus', value = 'bus'},
        },
    }
end

function p.complex() -- o complexo imobiliário ao qual pertence um edifício
    return {
        type = 'row',
        label = 'Complexo',
        value = 'complexo',
        wikidata = {
            property = 'P361',
            condition = function(claim)
                local v = wd.getMainId(claim)
                return wd.isInstance("Q1497364", v, 1)
            end,
        }
    }
end

function p.orientation()
    return {
        type = 'row',
        label = 'Orientação',
        value = 'orientação',
        wikidata = {property = 'P7469', numval = '1'},
    }
end

function p.archistyle()
    return {
        type = 'row',
        label = 'Estilo',
        plurallabel = 'Estilos',
        value = {'estilo arquitetural', 'estilo', 'estilo_arquitetônico'},
        wikidata = {property = {'P149'}, --excluir 'P135'
                   showqualifiers = {'P518'},
        }
    }
end

function p.creator() -- qualquer tipo de criador de conteúdo talvez pudesse ser compartilhado com a obra de arte da infobox
    local wdarchitect, wdengineer = p.creatorQuery("P84"), p.creatorQuery("P631")
    if wdarchitect and wdengineer then -- não mostra ambos se é o mesmo valor
        if (wd.formatStatements{property = "P84", displayformat = "raw", entity= localdata.item} == wd.formatStatements{property = "P631", displayformat = "raw", entity = localdata.item}) then
            wdengineer = nil
        end
    end
    return {
        type = 'multi',
        rows = {
            -- arquiteto
            {
                type = "row",
                label = localdata["título arquiteto"] or "Arquiteto",
                plurallabel = "Arquitetos",
                value = "arquiteto",
                wikidata = wdarchitect,
            },
            -- engenheiro
            {
                type = "row",
                label = "Engenheiro",
                plurallabel = "Engenheiros",
                value = "engenheiro",
                wikidata =  wdengineer,
            },
            -- pintor
            {
                type = "row",
                label = "Pintor",
                plurallabel = "Pintores",
                value = "pintor",
            },
              -- escultor
            {
                type = "row",
                label = "Escultor",
                plurallabel = "Escultores",
                value = "escultor",
            },
            -- créateur (quand les autres noms ne conviennent pas)
            {    type = "row",
                label = localdata["título criador"] or "Criador",
                plurallabel = "Criadores",
                value = "criador",
                -- não use o Wikidata se o parâmetro "arquiteto" estiver indicado (riscos de duplicação)
                wikidata =  p.creatorQuery("P170"),
                blockers = {'arquiteto', 'pintor', 'escultor'},
            },
        }
    }
end


function p.owner()
    return {
        type = 'multi',
        rows = {
            {
                type = 'row',
                label = 'Proprietário inicial',
                plurallabel = 'Proprietários iniciais',
                value = 'proprietário inicial',
            },
            {
                type = 'row',
                label = 'Proprietário atual',
                plurallabel = 'Proprietário atuais',
                value = 'proprietário atual',
            },
            {
                type = 'row',
                label = 'Proprietário',
                plurallabel = 'Proprietários',
                value = 'proprietário',
                wikidata = function() return require('Module:Proprietário').formatFromItem(localdata.item, {sorttype = 'chronological', showdate = true, conjtype = 'comma', precision = 'year'}) end,
            }
        }
    }
end

function p.religion()
    return {
        type = 'row',
        label = 'Religião',
        value = {'religião', 'igreja'},
        property = 'P140',
    }
end

function p.shape()
    return {
        type = 'row',
        label = 'Forma',
        value = {'forma', 'aspeto'},
        property = 'P1419',
    }
end

function p.dimensions()
    return {
    type = 'multi',
        rows = {
        {
        type = 'row',
        label = 'Altura',
        value = function()
            local str = localdata['altura']
            -- altura especiais, para infobox:Estrutura alta
            local function appendheight(str, param, label)
                if not localdata[param] then
                    return str
                end
                if str then
                    str = str .. '<br />'
                else
                    str = ''
                end
                return str .. label .. ' : ' .. localdata[param]
            end
            str = appendheight(str, 'antena seta', 'Seta')
            str = appendheight(str, 'telhado', 'Telhado')
            str = appendheight(str, 'último piso', 'Último piso')           
           
            return str
            end,
        wikidata = {
            property = 'P2048',
            targetunit = 'm',
            excludequalifier = 'P518',
            sorttype = 'descending',
            rank = 'valid',
            conjtype = '<br />',
            link = '-',
            showqualifiers = {'P1013', 'P518'}       
        }
    },
    {
        type = 'row',
        label = 'Espessura',
        value = 'espessura',
        wikidata =  {property = 'P2610', targetunit = 'metro', numval = '2', statementformat = function(statement) return inclexcl(statement, {targetunit = 'metro', rounding = '1'}) end},
    },
    {
        type = 'row',
        label = 'Comprimento',
        value = 'comprimento',
        wikidata = {property = 'P2043', targetunit = 'metro', numval = '2', statementformat = function(statement) return inclexcl(statement, {targetunit = 'metro', rounding = '1'}) end},
    },
    {
        type = 'row',
        label = 'Largura',
        value = 'largura',
        wikidata = {property = 'P2049', targetunit = 'metro', numval = 2, statementformat = function(statement) return inclexcl(statement, {targetunit = 'metro', rounding = '1'}) end},
    },
    {
        type = 'row',
        label = 'Envergadura',
        value = 'envergadura',
        wikidata = {property = 'P2050', targetunit = 'metro', conjtype = 'or', rounding = '1', numval = '2'},
    },
    {
        type = 'row',
        label = 'Diâmetro',
        value = 'diâmetro',
        wikidata = {property = 'P2386', targetunit = 'metro', conjtype = 'or', rounding = '1', numval = '2'},
    },
    {
        type = 'row',
        label = 'Perímetro',
        value = {'perímetro', 'contorno', 'circunferência'},
        wikidata = {property = 'P2547', targetunit = 'metro', conjtype = 'or', rounding = '1', numval = '2'},
    },
    {
        type = 'row',
        label = 'Área',
        value = {'área', 'superfície'},
        wikidata = {property = 'P2046', targetunit = 'square meter', conjtype = 'or', rounding = '1', numval = '2'},
    },
    {
        type = 'row',
        label = 'Volume',
        value = 'volume',
        wikidata = {property = 'P2234', targetunit = 'metro cúbico', conjtype = 'or', rounding = '1', numval = '2'},
    },
    {
        type = 'row',
        label = 'Inclinação',
        value = 'inclinação',
        wikidata = {property = 'P4183', conjtype = 'or', rounding = '1', numval = '2'},
    },
    {
        type = 'row',
        label = 'Calado aéreo',
        value = 'calado aéreo',
        wikidata = {property = 'P2793', targetunit = 'metro', conjtype = 'or', rounding = '1', numval = '2'},
    },
    {
        type = 'row',
        label = 'Número de peças',
        value = 'peças',
        wikidata = {property = 'P8733', excludequalifier = {'P518', 'P1480'}, conjtype = 'or', rounding = '1', numval = '2'},
    }
    }
}
end

function p.floors()
    return {
    type = 'multi',
        rows = {
    {
        type = 'row',
        label = 'Níveis',
        value = {'níveis acima do solo', 'níveis'},
        property = 'P1101',
    },
    {
        type = 'row',
        label = 'Caves',
        value = 'caves',
        property = 'P1139',
    }
    }
}
end

function p.destroyedby()
    return {
        type = 'row',
        label = 'Destruído por',
        value = {'destruído por', 'causa da destruição'},
        property = 'P770',
    }
end

function p.material()
    return {
        type = 'row',
        label = 'Material',
        plurallabel = 'Materiais',
        value = 'material',
        wikidata = require('Module:Material').formatFromItem(localdata.item),
    }
end

function p.colour()
    return {
        type = 'row',
        label = 'Cor',
        plurallabel = 'Cores',
        value = {'cor', 'cores'},
        property = 'P462',
    }
end

function p.inscription()
    return {
        type = 'row',
        label = 'Inscrição',
        value = {'inscrição', 'insígnia'},
        wikidata = {property = 'P1684', numval = '1'},
    }
end

function p.awards()
    return {
        type = 'row',
        label = 'Prémios',
        value = {'prémios', 'prêmios '},
        wikidata = {property = 'P166', showdate = 'yes', numval = '3'},
    }
end

function p.recordheld()
    return {
        type = 'row',
        label = 'Recorde detido',
        plurallabel = 'Recordes detidos',
        value = 'recorde',
        wikidata = {property = 'P1000', showdate = 'yes', numval = '3'},
    }
end

function p.equipment()
    return {
        type = 'row',
        label = 'Equipamento',
        plurallabel = 'Equipamentos',
        value = {'equipamento', 'equipamentos'},
        property = 'P912',
    }
end

function p.replaces()
    return {
        type = 'row',
        label = 'Substitui',
        value = 'substitui',
        property = 'P1398',
    }
end

function p.replacedby()
    return {
        type = 'row',
        label = 'Substituído por',
        value = 'substituído por',
        property = 'P167',
    }
end

function p.visitors()
    return {
        type = 'row',
        label = 'Visitantes por ano',
        value = {'visitantes', 'visitantes por ano', 'frequentação', 'frequentação anual'},
        wikidata = {property = 'P1174', showdate = 'true', numval = 1, sorttype = "inverted"},
    }
end

function p.protection()
    return {
        type = 'row',
        label = 'Estatuto patrimonial',
        value = {'classificação', 'proteção', 'estatuto patrimonial', 'patrimonialidade'},
        wikidata = require('Module:Classificação').formattedList(localdata.item)
    }
end

function p.danger()
    return {
        type = 'row',
        label = 'Perigo',
        plurallabel = 'Perigos',
        value = {'perigo', 'perigos'},
        wikidata = {property = 'P3335', numval = 5},
    }
end

function p.policy()
    return {
        type = 'row',
        label = 'Regulamento',
        plurallabel = 'Regulamentos',
        value = {'regulamento', 'regulamentos'},
        wikidata = {property = 'P5023', numval = 5},
    }
end

function p.unesco() -- para substituir [[Template:Infobox World Heritage]] para adicionar: parâmetros de extensão, herança em risco, retirada, gestão dos monumentos que fazem parte de um conjunto
    local id = localdata['identificador património mundial']
    if (id == '-') then
        return nil
    end
    if id then
        id = '[http://whc.unesco.org/fr/list/' .. id .. ' ' .. id .. ']'

    else
        id = wd.formatAndCat{entity = item, property = 'P757',  urlpattern = 'http://whc.unesco.org/fr/list/$1'}

    end
    if (not id) then
        return nil
    end
    return
    {type = 'table', title = '[[Ficheiro:World Heritage Emblem.svg|15px|alt=Logotipo do Patrimônio Mundial|link=Património mundial]] Património mundial', rows = {
        {type = 'row', label = 'Designação', value = 'nome unesco'},
        {type = 'row', label = "Tipo de bem", value = 'tipo unesco', wikidata = {property = 'P1435', targetvalue = {'Q16617071', 'Q52683527', 'Q52683530'}}},
        {type = 'row', label = "Data de entrada", value = 'data património mundial', wikidata = {property = 'P1435', targetvalue = {'Q9259', 'Q16617071', 'Q52683527', 'Q52683530'}, showonlyqualifier = {'P580'}}},
        {
        type = 'row',
        label = "Identificador",
        value = function() return id end,
        },
        {   
        type = 'row',
        label = "Critérios",
        singularlabel = "Critério",
        value = function(localdata)
            if localdata['critérios patrimoniais mundiais'] then
                    return '[http://whc.unesco.org/fr/criteres/' .. localdata['critérios patromoniais mundiais'] .. ']'
            end
            end,
        wikidata = function(item)
            local str, numclaims = wd.formatStatements{entity = item, property = 'P2614', link = '-', conjtype = ' ', returnnumberofvalues = true}
            if str then
                return wd.formatAndCat{value = '[http://whc.unesco.org/fr/criteres/$1 ' .. str .. ']', entity = item, property = 'P2614'}, numclaims
            end
            end
        },
        {type = 'row', label = 'Superfície', value = 'superfície unesco'},
        {type = 'row', label = 'Zona tampão', value = 'zona tampão unesco'},
    }
}
end

function p.geoloc(params)
    return general.geoloc(params)
end

return p