ウィキボヤージュ jawikivoyage https://ja.wikivoyage.org/wiki/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8 MediaWiki 1.47.0-wmf.15 first-letter メディア 特別 ノート 利用者 利用者・ノート Wikivoyage Wikivoyage・ノート ファイル ファイル・ノート MediaWiki MediaWiki・ノート テンプレート テンプレート・ノート ヘルプ ヘルプ・ノート カテゴリ カテゴリ・ノート プロジェクト プロジェクト・ノート TimedText TimedText talk モジュール モジュール・ノート Event Event talk テンプレート:沖縄県 10 3467 58489 36816 2026-08-13T03:20:47Z Waduoa 3918 ・北部市部にすべての市が記載されていた為、修正 58489 wikitext text/x-wiki {{Navbox |name = 沖縄県 |title = [[ファイル:Flag_of_Okinawa_Prefecture.svg|25px]] [[沖縄県]] |listclass = hlist hlist-pipe |group1 = 北部地域 |list1 = {{Navbox|child |name = |title = |listclass = hlist hlist-pipe |group1 = 市部 |list1 = * [[名護市]] |group2=[[国頭郡]] |list2= * [[国頭村]] * [[大宜味村]] * [[東村]] * [[今帰仁村]] * [[本部町]] * [[恩納村]] * [[宜野座村]] * [[金武町]] * [[伊江村]] }} |group2 = 中部地域 |list2 = {{Navbox|child |name = |title = |listclass = hlist hlist-pipe |group1 = 市部 |list1 = * [[沖縄市]] * [[うるま市]] * [[宜野湾市]] * [[浦添市]] |group2 = [[中頭郡]] |list2 = * [[読谷村]] * [[嘉手納町]] * [[北谷町]] * [[北中城村]] * [[中城村]] * [[西原町]] }} |group3 = 南部地域 |list3 = {{Navbox|child |name = |title = |listclass = hlist hlist-pipe |group1 = 市部 |list1 = * [[那覇市]] * [[豊見城市]] * [[糸満市]] * [[南城市]] |group2 = [[島尻郡]] |list2 = * [[与那原町]] * [[南風原町]] * [[八重瀬町]] }} |group4 =南部離島地域 |list4 = {{Navbox|child |name = |title = |listclass = hlist hlist-pipe |group1 = 島尻郡 |list1 = * [[渡嘉敷村]] * [[座間味村]] * [[粟国村]] * [[渡名喜村]] * [[南大東村]] * [[北大東村]] * [[伊平屋村]] * [[伊是名村]] * [[久米島町]] }} |group5 = 宮古・八重山地域 |list5 = {{Navbox|child |name = |title = |listclass = hlist hlist-pipe |group1 = 市部 |list1 = * [[宮古島市]] * [[石垣市]] |group2 = [[八重山郡]] |list2 = * [[竹富町]] * [[与那国町]] |group3 = その他の村 |list3 = * [[多良間村]] }} | below = [[File:Folder_Hexagonal_Icon.svg|link=特別:カテゴリ|20px]][[:Category:沖縄県|沖縄県]] }}{{#ifeq:{{Str right|{{FULLPAGENAME}}|{{#expr:{{str len|{{FULLPAGENAME}}}}-1}}}}|市|[[Category:都市]]|}}{{#ifeq:{{Str right|{{FULLPAGENAME}}|{{#expr:{{str len|{{FULLPAGENAME}}}}-1}}}}|町|[[Category:都市]]|}}{{#ifeq:{{Str right|{{FULLPAGENAME}}|{{#expr:{{str len|{{FULLPAGENAME}}}}-1}}}}|村|[[Category:都市]]|}}{{#ifeq:{{Str right|{{FULLPAGENAME}}|{{#expr:{{str len|{{FULLPAGENAME}}}}-1}}}}|郡|[[Category:郡]]|}}<noinclude> {{DEFAULTSORT:おきなわけん}} [[Category:都道府県のテンプレート]] [[Category:沖縄県|* ]] </noinclude> 3re5e0b3ykdvlj7vi4cb5gnn89bpq27 モジュール:Transportation utilities 828 8023 58487 2026-08-12T12:30:27Z Tmv 27 新規作成 58487 Scribunto text/plain -- module variable and administration local tu = { moduleInterface = { suite = 'TransportationUtilities', serial = '2026-08-12', item = 0 } } local i18n = { property_connectingTrain = { 'P1192', 'P81' }, property_hasPart = 'P527', property_locatedStations = { 'P559', 'P527' }, property_nextSta = 'P197', property_partOf = 'P361', type_station = 'Q55488' } local cd = require( 'Module:Coordinates' ) local wu = require( 'Module:Wikidata utilities' ) --[[ Utility Functions ]] ---@param str string ---@return boolean local function isValidProperty(str) return (not not string.match(str, "^[Pp]%d+$")) end ---@param tbl table ---@param item * ---@return boolean local function contains( tbl, item ) for _, v in pairs( tbl ) do if type( item ) == 'table' then for _, i in ipairs( item ) do if i == item then return i == item end end else if v == item then return true end end end return false end ---@param coord number[]|string[] ---@return number[] local function toDec( coord, prec ) prec = prec or 6 local lat, latE = cd.toDec( coord[1], '', prec ) local long, longE = cd.toDec( coord[2], '', prec ) if latE + longE ~= 0 then error("Invalid coordinate: " .. coord) end return { lat, long } end --[[ Main Functions ]] -- Generate Station class ---@note: These can be improved in aspect of performance --- This did not use metatable due to the performance reason function tu.Station( id, option ) option = option or {} ---@class Station ---@field entity table ---@field id string local obj = {} -- initialization local invalid do obj.id = id or mw.wikibase.getEntityIdForCurrentPage() obj.entity = {} if invalid then error( "Invalid entity" ) end end ---@param p string Wikidata ID ---@return table function obj:getProperty( p ) if not isValidProperty( p ) then return end if self.entity[p] == nil then self.entity[p] = mw.wikibase.getAllStatements( self.id, p ) end return self.entity[p] end --This is a shortcut for getProperty() to get next stations ---@return table List of next stations. function obj:getNextStation() return self:getProperty( i18n.property_nextSta ) or {} end ---@return string The name of this station. function obj:getName() ---@private Do not refer to this property directly self._name = self._name or wu.getLabel(self.id) return self._name end ---@return string The name of the article to which the item of the station is connected function obj:getSitelink() ---@private Do not refer to this property directly self._link = self._link or wu.getSitelink( self.id, mw.site.wikiId ) return obj._link end ---@return string Wikitext of a link to the station function obj:getLinkText() ---@private Do not refer to this property directly if self._linkText then return self._linkText end local sitelink = self:getSitelink() local name = self:getName() local title = mw.title.getCurrentTitle().fullText if sitelink == title then return "'''" .. sitelink .. "'''" end if name == sitelink then return "[[" .. sitelink .."]]" else return "[[" .. sitelink .. "|" .. name .. "]]" end end -- return Route instance return obj end function tu.TrainStation( id, option ) ---@class TrainsStation ---@field entity table ---@field id string ---@field children table ---@field parent table local obj = tu.Station( id, option ) -- initialization local invalid do -- Process the station items, which are categorized by operating company, -- so that they can be handled. obj.children, obj.parent = {}, {} local children = obj:getProperty( i18n.property_hasPart ) local parent = obj:getProperty( i18n.property_partOf ) if children[1] ~= nil then for i, v in ipairs(children) do local childID = v.mainsnak.datavalue.value.id if contains( wu.getIds( childID, 'P31', 10), i18n.type_station ) then table.insert(obj.children, childID) end end elseif parent[1] ~= nil then obj.parent = { parent[1].mainsnak.datavalue.value.id } end end ---@param p string Wikidata ID ---@param item number Property of which item should be retrieved from. --- 1: The item of obj.id itself (Default) --- 2: Parent --- 3: All children --- 4: Both parent and all children ---@return table function obj:getProperty( p, item ) item = item or 1 if not isValidProperty( p ) then return end if self.entity[p] ~= nil then return self.entity[p] end if item == 1 then self.entity[p] = mw.wikibase.getAllStatements( self.id, p ) elseif item == 2 then self.entity[p] = mw.wikibase.getAllStatements( self.parent[1], p ) elseif item == 3 then local value = {} for _, child in ipairs( obj.children ) do local r = mw.wikibase.getAllStatements( child, p ) for _, v in ipairs( r ) do table.insert( value, v ) end end if value[1] ~= nil then self.entity[p] = value end elseif item == 4 then local value = {} -- Add values of the child items for _, child in ipairs( obj.children ) do local r = mw.wikibase.getAllStatements( child, p ) for _, v in ipairs( r ) do table.insert( value, v ) end end -- Add values of the parent item do local r = mw.wikibase.getAllStatements( self.parent[1], p ) for _, v in ipairs( r ) do table.insert( value, v ) end end if value[1] ~= nil then self.entity[p] = value end else error( "Invalid item number specified: " .. item ) end return self.entity[p] end ---@return string The name of this station. function obj:getName() ---@private Do not refer to this property directly self._name = self._name or ( self.parent[1] ~= nil and wu.getLabel(self.parent[1]) or wu.getLabel(self.id) ) return self._name end ---@return string The name of the article to which the item of the station is connected. function obj:getSitelink() ---@private Do not refer to this property directly self._link = self._link or ( self.parent[1] ~= nil and wu.getSitelink( self.parent[1], mw.site.wikiId ) or wu.getSitelink( self.id, mw.site.wikiId ) ) return obj._link end return obj end function tu.Route( id, option ) option = option or {} ---@class Route ---@field entity table ---@field id string local obj = {} -- initialization local invalid do obj.id = id or mw.wikibase.getEntityIdForCurrentPage() obj.entity = {} if invalid then error( "Invalid entity" ) end end ---@param p string Wikidata ID ---@return table function obj:getProperty( p ) if not isValidProperty( p ) then return end if self.entity[p] == nil then self.entity[p] = mw.wikibase.getAllStatements( self.id, p ) end return self.entity[p] end ---@return string The name of this route. function obj:getName() ---@private Do not refer to this property directly self._name = self._name or wu.getLabel(self.id) return self._name end ---@return string The name of the article to which the item of the route is connected function obj:getSitelink() ---@private Do not refer to this property directly self._link = self._link or wu.getSitelink( self.id, mw.site.wikiId ) return obj._link end ---@return string Wikitext of a link to the route function obj:getLinkText() ---@private Do not refer to this property directly if self._linkText then return self._linkText end local sitelink = self:getSitelink() local name = self:getName() local title = mw.title.getCurrentTitle().fullText if sitelink == title then return "'''" .. sitelink .. "'''" end if name == sitelink then return "[[" .. sitelink .."]]" else return "[[" .. sitelink .. "|" .. name .. "]]" end end -- return Route instance return obj end function tu.Train( id, option ) ---@class Train ---@field entity table ---@field stations TrainStation[] ---@field id string local obj = tu.Route( id, option ) -- initialization do end local initStaId if next(obj:getProperty( i18n.property_locatedStations[1] )) then initStaId = obj:getProperty( i18n.property_locatedStations[1] )[1].mainsnak.datavalue.value.id elseif next(obj:getProperty( i18n.property_locatedStations[2] )) then initStaId = obj:getProperty( i18n.property_locatedStations[2] )[1].mainsnak.datavalue.value.id end local initSta = tu.TrainStation( initStaId ) -- ex. Q801695 local staIds = { initStaId } obj.stations = { initSta } ---@param stas TrainStation[] ---@return TrainStation[] local function getStations( stas ) local nextStas = stas[#stas]:getNextStation() or {} local finished = true for _, nextSta in ipairs(nextStas) do local q = nextSta.qualifiers or {} if q[ i18n.property_connectingTrain[1] ] ~= nil then if q[ i18n.property_connectingTrain[1] ][1].datavalue.value.id == obj.id then local id = nextSta.mainsnak.datavalue.value.id if #stas == 1 or not contains(staIds, id) then table.insert(staIds, id) table.insert(stas, tu.TrainStation(id)) finished = false break end end elseif q[ i18n.property_connectingTrain[2] ] ~= nil then if q[ i18n.property_connectingTrain[2] ][1].datavalue.value.id == obj.id then local id = nextSta.mainsnak.datavalue.value.id if #stas == 1 or not contains(staIds, id) then table.insert(staIds, id) table.insert(stas, tu.TrainStation(id)) finished = false break end end end end if finished then return stas else return getStations( stas ) end end obj.stations = getStations(obj.stations) return obj end ---@param from string[]|number[] Reference coordinates ---@param to string[]|number[] Coordinates to check ---@param parts number How many equal parts the direction --- will be divided into. ---@return number The direction from the coordinate of `from` --- to the coordinate of `to`. The numbers --- are assigned from 1 to the number of `parts`, --- starting from the north and proceeding clockwise. function tu.getDirection( from, to, parts ) from = toDec( from ) to = toDec( to ) parts = parts or 8 local latDiff = to[1] - from[1] local longDiff = to[2] - from[2] local coordAngle = math.atan( latDiff, longDiff ) local angleUnit = 2 * math.pi / parts for i = 1, parts do local fromAngle = angleUnit * ( i - 1 ) local toAngle = angleUnit * i if fromAngle <= coordAngle and coordAngle <= toAngle then return i end end error("No part of direction hit to the coord") end return tu tp5abxp63nt4odb9p5n8xkm7q6bqsaz 彦根市 0 8024 58488 2026-08-12T12:47:16Z Tmv 27 新規作成 // via Wikitext Extension for VSCode 58488 wikitext text/x-wiki {{pagebanner}} [https://visit.hikoneshi.com/ '''彦根市'''](ひこねし)は琵琶湖の東岸、[[滋賀県]]の東部に位置する市です。国宝に指定された天守閣を持つ[[#彦根城|彦根城]]で有名な場所ですが、他にも歴史的な名所が数多くあります。 == 知る == == 着く == == 移動する == == 観る == * {{vCard | type=castle | name=彦根城 | wikidata=Q1012374 | content=彦根八景・琵琶湖八景に選定されている城です。井伊直弼の生家である井伊氏が治めていた彦根藩の城で、かつての天守が今も遺っている日本で12しかない城の1つです。 }} == する == == 食べる == == 泊まる == == 出かける == * [[長浜市]] * [[米原市]] * [[多賀町]] * [[愛荘町]] {{mapmask}} {{IsPartOf|滋賀県}} {{geo|35.274361|136.259722|zoom=13}} {{mapsources|lat=35.274361|long=136.259722|zoom=13}} {{status}} {{滋賀県}} {{デフォルトソート:ひこねし}} [[カテゴリ:滋賀県]] [[カテゴリ:日本の市区町村]] inlag09t5iw5ibe29xzjz7xumbuhn5r ブルンジ 0 8025 58490 2026-08-13T08:20:50Z Shokupan 360 ページの作成:「{{pagebanner|Bujumbura (Burundi) Coconut beach.jpg}} '''ブルンジ'''([[英語会話集|英語]]:Burundi)は[[東アフリカ]]にある国です。 == 都市 == {{mapframe|-3.383333|29.833333|zoom=8}} *{{marker|type=city|name=[[ギテガ]]|wikidata=Q167551}} - 首都 *{{marker|type=city|name=[[ブジュンブラ]]|wikidata=Q3854}} *{{marker|type=city|name=[[ブルリ]]|wikidata=Q992247}} == 知る == {{Infobox Country}} == 着く == === 飛行機で ==…」 58490 wikitext text/x-wiki {{pagebanner|Bujumbura (Burundi) Coconut beach.jpg}} '''ブルンジ'''([[英語会話集|英語]]:Burundi)は[[東アフリカ]]にある国です。 == 都市 == {{mapframe|-3.383333|29.833333|zoom=8}} *{{marker|type=city|name=[[ギテガ]]|wikidata=Q167551}} - 首都 *{{marker|type=city|name=[[ブジュンブラ]]|wikidata=Q3854}} *{{marker|type=city|name=[[ブルリ]]|wikidata=Q992247}} == 知る == {{Infobox Country}} == 着く == === 飛行機で === * {{marker|type=airport|symbol=airport|name=ブジュンブラ国際空港|wikidata=Q681134}} === 鉄道で === === 車で === === バスで === === 船で === == 移動する == == 話す == == 観る == * {{vCard | name =ブルリ森林自然保護区 | name-local = | name-latin = | alt = | comment = | type =nature_reserve | group = | wikidata =Q5001027 | auto = | url = | address = | address-local = | directions = | directions-local = | lat = | long = | phone = | mobile = | tollfree = | fax = | email = | hours = | checkin = | checkout = | price = | payment = | subtype = | image = | show = | zoom = | map-group = | lastedit =2026-08-13 | before = | description = }} * {{vCard | name =ブルンジ国立博物館 | name-local = | name-latin = | alt = | comment = | type =museum | group = | wikidata =Q2688645 | auto = | url = | address = | address-local = | directions = | directions-local = | lat = | long = | phone = | mobile = | tollfree = | fax = | email = | hours = | checkin = | checkout = | price = | payment = | subtype = | image = | show = | zoom = | map-group = | lastedit =2026-08-13 | before = | description = }} * {{vCard | name =ギテガ大司教区 | name-local = | name-latin = | alt = | comment = | type =church | group = | wikidata =Q16964610 | auto = | url = | address = | address-local = | directions = | directions-local = | lat = | long = | phone = | mobile = | tollfree = | fax = | email = | hours = | checkin = | checkout = | price = | payment = | subtype = | image = | show = | zoom = | map-group = | lastedit =2026-08-13 | before = | description = }} == する == == 買う == == 食べる == == 飲む == == 泊まる == == 学ぶ == == 働く == == 安全を確保する == == 健康を維持する == == 繋がる == {{アフリカ}} {{IsPartOf|東アフリカ}} {{Status}} {{mapshapes|Q967}} {{geo|-3.383333|29.833333|zoom=8}} {{mapsources|-3.383333|29.833333|zoom=8}} {{デフォルトソート:ふるんし}} [[カテゴリ:国]] tpkv7cdu3c24klmldsqvbvpxm4ae5mz ブルンジ共和国 0 8026 58491 2026-08-13T08:23:17Z Shokupan 360 [[ブルンジ]]への転送ページ 58491 wikitext text/x-wiki #転送 [[ブルンジ]] m0gyetwid0otjn4lq4k89hj39duc3ug