विकिपीडिया bhwiki https://bh.wikipedia.org/wiki/%E0%A4%AE%E0%A5%81%E0%A4%96%E0%A5%8D%E0%A4%AF_%E0%A4%AA%E0%A4%A8%E0%A5%8D%E0%A4%A8%E0%A4%BE MediaWiki 1.47.0-wmf.6 first-letter मीडिया विशेष वार्तालाप प्रयोगकर्ता प्रयोगकर्ता वार्ता विकिपीडिया विकिपीडिया वार्ता चित्र चित्र वार्ता मीडियाविकि मीडियाविकि वार्ता टेम्पलेट टेम्पलेट वार्ता मदद मदद वार्ता श्रेणी श्रेणी वार्ता TimedText TimedText talk Module Module talk Event Event talk गौतम बुद्ध 0 9234 798680 796905 2026-06-15T11:48:47Z SM7 3953 अपडेट कइल गइल 798680 wikitext text/x-wiki {{Infobox religious biography | other_names = ''Gautama Buddha''<br/>''Śhākyamuni'' ({{literal_translation|Sage of the [[Shakya]]s}}) | image = Buddha in Sarnath Museum (Dhammajak Mutra).jpg | caption = [[Buddha Preaching his First Sermon (Sarnath)|Sculpture of the Buddha preaching his first sermon]] from [[Sarnath]], 5th century CE{{efn|name="Buddha-statue"}} | module = {{Infobox Chinese|child=yes| headercolor= #FFCC33 | san = Siddhārtha Gautama (सिद्धार्थ गौतम) | pli = Siddhattha Gotama }} | birth_name = Siddhartha Gautama | birth_date = {{circa|563 or 480 BCE}} | death_date = {{circa|483 or 400 BCE}} (aged 80){{sfnp|Cousins|1996|pp=57–63}}{{sfnp|Norman|1997|p=33}}{{sfnp|Prebish|2008}}{{efn|name="dating"}} | birth_place = <!---Note: Gautama was a Shakya, born in the Shakya republic. The states of both Nepal and India did not exist at that time. The Shakya territory covered an area which is nowadays partly in Nepal, partly in India.--->[[Lumbini]], [[Shakya|Shakya Republic]] (according to Buddhist tradition){{efn|name="birthplace"}}<!-- Do not change without getting consensus on talk page first --> | death_place = [[Kushinagar]], [[Malla (tribe)|Malla Republic]] (according to Buddhist tradition){{efn|name="deathplace"}} | resting_place = [[Relics associated with Buddha|Cremated; ashes divided among followers]] | known_for = Establishing [[Buddhism]] | predecessor = [[Kassapa Buddha|Kāśyapa Buddha]] | successor = [[Maitreya]] | father = [[Śuddhodana]] | mother = [[Maya (mother of the Buddha)|Maya]] | spouse = [[Yaśodharā]] | children = [[Rāhula]] | religion = [[Buddhism]] }} {{बौद्ध धर्म}} '''गौतम बुद्ध''' चाहे '''सिध्दार्थ गौतम''' ({{Langx|pli|सिद्धात्थ गौतम}}) चाहे '''शाक्यमुनि''', [[भारत के इतिहास|पुरान भारत]] मे एगो [[दार्शनिक]], भिक्षु, आध्यात्मिक शिक्षक आ धार्मिक नेता रहलन। इनके शिक्षा की आधार पर [[बौद्ध धर्म]] अस्थापित भइल। ई 45 बरिस ले बौद्ध धर्म (धम्म) के उपदेश दिहलें। इनकर शिक्षा '''दुक्ख''' (माने: दुख) आ ओकरा से मुक्ति (निब्बान) प आधारित बा। सिद्धार्थ के जनम शाक्य कुल के एगो राज परिवार मे भइल रहे बाकिर अंत मे ऊ सभ त्याग के एगो मुनि बनि गइल रहलन। बौद्ध कथा सभ के अनुसार, बरिसन के कष्ट, ध्यान आ संन्यास के बाद इनकरा बोधि प्राप्त भइल आ ई ओह तंत्र के बुझ लिहलन जे लोगन के जीवन आ मरन के चक्का मे बान्ह के धइले रहेला। ओकरा बाद बुद्ध [[सिंधु-गंगा के मैदान|गंगा के मैदान]] के इलाका में सगरो घूमि-घूमि के सभन के शिक्षा दिहले आ संघ के स्थापना कइलें। बुद्ध भारतीय श्रमण परंपरा के कामुक भोग आ गंभीर तपस्या के बीचे एगो मध्यम मार्ग सिखवलन। ऊ एगो आध्यात्मिक मार्ग के शिक्षा दिहलें, जेमे नैतिक शिक्षा आ ध्यान लगावे के लूर जइसे झ्यान आ सति शामिल बा। बुद्ध ब्राह्मण सभ के परंपरा, जइसे पसुबलि, के विरोधो कइलन। ''बुद्ध'' शब्द क अर्थ होला अइसन व्यक्ति जे के बोधि (मने ज्ञान) मिल गइल होखे आ [[बौद्ध धर्म]] में इहाँ के सबसे बड़ ज्ञान प्राप्त व्यक्ति मानल गइल बा आ सम्मासंबुद्ध अथवा सम्यकसम्बुद्ध कहल जाला। शाक्य कुल में जनम की कारण इनके के शाक्यमुनि कहल जाला। गोतम गोत्र में जनम भइल आ जनम की बाद नाँव सिद्धार्थ धराइल जेवना से इनके नाँव सिद्धार्थ गौतम भइल। ज्ञान (बोधि) प्राप्त कइ लिहला पर बुद्ध, गौतम बुद्ध, महात्मा बुद्ध आ भगवान बुद्ध कहल जाए लागल। ज्ञान अथवा बोधि के सही स्वरूप के भाषा आ वाणी द्वारा वर्णन ना हो सकेला ओकरी ओर खाली इशारा भर कइल जा सकेला एही से गौतम बुद्ध के ''तथागत'' भी कहल जाला जेकर मतलब होला 'जे ''उहाँ'' पहुँच गइल होखे' या 'जे ''ओ'' (ज्ञान) के प्राप्त कइ लिहले होखे/प्राप्त हो गइल होखे'। ==इतिहासी व्यक्ति की रूप में गौतम बुद्ध== इतिहासी गौतम बुद्ध के जीवन के समय क निर्धारण कइल बहुत मुश्किल बा। काहें से कि उनके जनम आ मरला क कौनो निश्चित समय आ तारीख़ नइखे मालूम ज्यादातर बिद्वान लोग गौतम बुद्ध के जीवन 563 ईपू से 483 ईपू की बीच में मानेला। हालाँकि अबहिन कुछ दिन पहिले एगो संभावित बौद्ध अस्थान माया मंदिर के उत्खनन [[लुंबिनी]] में भइल बा जेवना क तारीख 550 ईपू से पहिले बतावल जात बा, अगर ई सही निकली तब गौतम बुद्ध क जीवन काल अउरी पीछे सरक जाई। ==पारंपरिक स्रोत == पारंपरिक रूप से भगवान बुद्ध की जीवन की बारे में ''[[बुद्धचरितम्]]'', ''[[ललितविस्तारसूत्रम्]]'', ''[[महावस्तु]]'' अउरी ''[[निदानकथा]]'' नाँव की ग्रंथन में मिलेला। ए सभ में ''बुद्धचरितम्'' सबसे पुरान बा जेवन दूसरी सदी के रचना मानल जाला ई एगो महाकाव्य हवे जेकर रचना [[अश्वघोष]] कइले रहलें। [[महायान]] परंपरा में ''ललितविस्तारसूत्रम्'' के रचना तीसरी सदी में आ ''महावस्तु'' के रचना चौथी सदी में भइल मानल जाला। धर्म्गुप्तक परंपरा में अभिनिष्क्रमण सूत्र सबसे बड़ आकार वाली जीवनी हवे आ एकर कई गी चीनी भाषा क अनुवाद मिलेला। ''निदानकथा'' श्रीलंका की [[थेरवाद]] परंपरा के ग्रंथ हवे जेवना के रचना पाँचवीं सदी ईसवी में बुद्धघोष कइलें। ''[[जातक कथा]]'' की रूप में बुद्ध की पिछला कई जनम के कहानी मिलेला जे में मनुष्य आ पशु पक्षी की रूप में [[बोधिसत्व]] के बार-बार जनम लिहला आ उनकी कार्य क वर्णन बा। जातक कथा के ज्यादातर हिस्सा के रचना चौथी सदी ईसवी में भइल मानल जाला। ==जीवनी== ===जनम=== ज्यादातर बिद्वान लोग गौतम बुद्ध क जनमभुईं कपिलवस्तु के मानेला जेवन दक्षिणी नेपाल में बा। एकरी अलावा नेपाले में [[लुंबिनी]] (वर्तमान रुम्मिनदेई) की बारे में काफ़ी बिद्वानन के मत बा कि इहाँ भगवान बुद्ध के जनम भइल रहे। एकरी आलावा उत्तर प्रदेश में [[कपिलवस्तु|कपिलवस्तु, पिपरहवा]] आ उड़ीसा में कपिलेश्वर के भी बुद्ध भगवान क जनमभुईं साबित करे के कोशिश होला। ज्यादातर लोग इहे मानेला कि गौतम गोत्र की शाक्य क्षत्रिय राजा शुद्धोदन जेवन कपिलवस्तु के राजा रहलें आ महारानी महामाया देवी कि पुत्र की रूप में उहाँ के जनम भइल आ सिद्धार्थ नाँव धराइल। कहानी की मुताबिक महारानी महामाया सपना देखली कि एगो सफ़ेद हाथी उनकी गर्भ में दाहिने ओर से प्रवेश करत बा। एकरी बाद गर्भवती रानी आपनी प्रसव खातिर नइहर जात समय लुम्बिनी नाँव की बन में लरिका के जनम दिहली। कहानी की मुताबिक राजकुमार के जनम पूर्णिमा के भइल जेवना के आज [[बुद्ध पूर्णिमा]] की रूप में मनावल जाला। कहानी इहो कहेले कि रानी के प्रसव की बाद मृत्यु हो गइल आ राजकुमार सिद्धार्थ के पालन-पोषन उनकर मौसी महाप्रजापति गौतमी कइली। ज्योतिषी लोग बिचार क के बतावल कि या त ई लरिका एगो चक्रवर्ती राजा होई या फिर भुत बड़ा संत-महात्मा। ===प्रारंभिक जीवन आ बियाह=== राजा शुद्धोदन अपनी ओर से सभ कोशिस कइलें की लरिका सिद्धार्थ के कौनो दुःख संताप की बारे में पता न चले आ ई महान राजा बने। राजकुमार सिद्धार्थ के बियाह सोलह बारिस की उमिर में यशोधरा से भइल आ ऊ एगो लरिका के भी जनम दिहली जेकर नाँव राहुल भइल। सिद्धार्थ उन्तीस बारिस कि उमिर ले राजकुमार के जीवन बितवलन। ===महाभिनिष्क्रमण (संन्यास)=== राजकुमार सिद्धार्थ एक दिन आपनी सारथि के ले के भ्रमण पर निकललें आ डहरी में उनके एगो द्ध व्यक्ति, एगो बीमार आदमी, एगो मृतक आ एगो सन्यासी देखाइल जेवना की बाद उनके संसार की दुखी रूप के परिचय मिलल। संसार की दुःख आ मरणशीलता के देखि के उनकर मन खिन्न हो गइल आ संसार की दुःख के कारण जाने खातिर आ जीवन क असली उद्देश्य जाने खातिर उहाँ के सन्यास ले लिहलीं। कहानी कहेले कि जब अपनी कंथक नाँव की घोड़ा पर चढ़ी के सारथि चन्ना की साथै राजकुमार महल से निकललें त देवता उनकी घोड़ा की टाप के आवाज हर लिहलें लोग जे से चुपचाप बिना पहरेदारन की जानकारी के ऊ बाहर निकल सकें। जीवन कि दुःख के परिचय पा के जीवन से बैराग आ सत्य की खोज में निकलला के बौद्ध कथा में महाभिनिष्क्रमण कहल गइल। ===ज्ञान प्राप्ति === ज्ञान की खोज में सबसे पाहिले उहाँ के राजगीर गइलीं जहाँ के राजा [[बिम्बिसार]] के इ बात पता चल गइल। बिम्बिसार सिद्धार्थ के राजधानी आवे के नेवता दिहले लेकिन सिद्धार्थ मना क दिहलें आ कहले कि ज्ञान मिलला की बाद आपकी राज्य में सभसे पाहिले आइब। एकरी बाद उहाँ के योगी लोगन की संगत में जा के कठोर योग साधना कइलिन लेकिन ए से उहाँ के संतुष्टि ना मिलल। अलग अलग मार्ग पर साधना कइला की बाद भी उहाँके वास्तविक ज्ञान ना मिलल। फिर खुद से अपनी मार्ग के चिंतन-मनन-साधना आ ध्यान द्वारा शुद्ध करत करत एक दिन पूर्णिमा की दिने उहाँके 'मार-विजय' क के ज्ञान के प्राप्ति भइल। जहाँ उहाँ के ज्ञान मिलल ओ जगह के अब [[बोधगया]] कहल जाला आ जेवनी पीपर की पेड़ की नीचे उहाँ के ध्यान लगवले रहलीं ओ के बोधिवृक्ष कहल गइल। एकरी बाद सिद्धार्थ गौतम से उहाँ क बुद्ध कहाए लगलीं। कहानी में इहो वर्णन मिलेला कि कठोर साधना की बाद समाधी से उठला पर उहाँ के एगो गँवईं कन्या सुजाता की हाथ से खीर ग्रहण कइलीं जे से उहाँ के साथी कौण्डिन्य आ अउरी चार लोग ई सोच के कि इनकर साधना भंग हो गइल उहाँ के छोडि के चलि गइल लोग। बोधि प्राप्त कइला की समय उहाँ के उमिर 35 बरिस रहे। ===धर्मचक्रप्रवर्तन (पहिला उपदेश) आ संघ के अस्थापना === [[File:Sermon in the Deer Park depicted at Wat Chedi Liem-KayEss-1.jpeg|thumb|200px|left|धर्मचक्रप्रवर्तन के चित्र में निरूपण]] ज्ञान प्राप्त कइला की बाद महात्मा बुद्ध के दू गो व्यापारी लोग मिलल जेवन सबसे पहिले उहाँ के शिष्य बनल इन्हन लोगन के नाँव रहे तपुस्स आ भल्लिक मानल जाला कि ई दूनो लोग शिष्य बनत समय आपन केश मुंडवा दिहल आ ऊ अब रंगून की लगे श्वे दगां में मंदिर में रक्खल बा। एकरी बाद महात्मा बुद्ध यात्रा करत मृगदाव (वर्तमान [[सारनाथ]])में आ के अपनी पाँच शिष्य लोगन के पहिला उपदेश दिहलीं। महात्मा बुद्ध की एही पहिला उपदेश के धर्मचक्रप्रवर्तन कहल जाला। एही पाँच शिष्यन की साथ उहाँ के संघ के अस्थापना कइलीं आ ई पांचो शिष्य अर्हत् बनल लोग। एकरी बाद जे जे बौद्ध धर्म के अनुयायी बनल संघ में शामिल होत गइल आ संघ क बिस्तार होत गइल। ===महापरिनिर्वाण=== पैतीस बरिस की उमिर से अस्सी बारिस की उमिर ले लगभग 45 साल भगवान बुद्ध घूमि-घूमि के भ्रमण करत आ शिक्षा आ उपदेश देत बितवलीं भ्रमण आ भिक्षा द्वारा जीवन यापन के चारिका कहल जाला। महापरिनिर्वाण सूत्र की अनुसार 80 बारिस की उमिर में भगवान बुद्ध ई घोषणा क दिहलें की अब हम परिनिर्वाण के प्राप्त हो जाइबि (भौतिक देह के त्याग देइब)। एकरी बाद ऊ कुंद नाँव की लोहार की द्वारा भेंट कइल भोजन कइलें जेवन उहाँ के अंतिम भोजन रहल एकरी बाद उहाँ के तबियत खराब हो गइल। उहाँ के आनंद के बोला के कुंद के समुझावे के कहलीं कि ऊ ई मत समझे कि एकर दोष ओकरी पर पड़ी ए मे कुंद क कौनो दोष ना बा आ ई भोजन अतुल्य रहल ह।<ref>{{cite web|url=http://www.accesstoinsight.org/tipitaka/dn/dn.16.1-6.vaji.html#t-58 |title=Maha-parinibbana Sutta: Last Days of the Buddha |publisher=Accesstoinsight.org |date=2013-11-30 |accessdate=2018-04-25}}</ref> कहानी ई कहेले कि परिनिर्वाण से पहिले बुद्ध ठीक हो गइल रहलीं आ सामान्य रूप से देह त्याग कइलीं। कुछ विद्वान लोग इहो कहेला कि उहाँके वृद्धावस्था की सामान्य लक्षण की अनुसार देह त्याग कइलीं आ ए में भोजन के दूषित रहल क कौनो बाति ना रहे। '''कुशवती''' अथवा '''कुशीनारा''' (वर्तमान '''[[कुशीनगर]]''') की बन में उहाँ के परिनिर्वाण के प्राप्त भइलिन आ अपनी शिष्य लोगन खातिर उहाँ के आखिरी वचन रहे कि 'सारा सांसारिक चीज नाशवान बा, अपनी मुक्ति खातिर बहुत ध्यान पूर्वक प्रयास करे के चाही' (पाली में : व्ययधम्मा संखारा, अप्पमादेन सम्पादेथा)। परिनिर्वाण की बाद उहाँ के दाह संस्कार क दिहल गइल आ उहाँ के अस्थि अवशेष अलग अलग जगह पर सुरक्षित रखल गइल। ==भगवान बुद्ध क शिक्षा== {{मुख्य|बौद्ध दर्शन}} {{Multicol}} ===चारि गो आर्य सत्य=== *दुःख *दुःख समुदय *दुःख निरोध *दुःख निरोध क मार्ग {{Multicol-break}} ===अष्टांगिक मार्ग=== *सम्यक् दृष्टि *सम्यक् संकल्प *सम्यक् वाक् *सम्यक् कर्मान्त {{Multicol-break}}<br /> *सम्यक् आजीव *सम्यक् व्यायाम *सम्यक् स्मृति *सम्यक् समाधि {{Multicol-end}} == नोट == <references group="note"/> ==संदर्भ== {{reflist|33em}} [[श्रेणी:भारत के धर्म]] [[श्रेणी:बौद्ध धर्म| ]] [[श्रेणी:बौद्ध दर्शन| ]] [[श्रेणी:बौद्ध दार्शनिक| ]] [[श्रेणी:गौतम बुद्ध| ]] slhikzlic3sdvl0xpimxypuqbotakh5 कुल्लू जिला 0 30024 798661 444950 2026-06-14T15:13:04Z SM7 3953 सुधार कइल गइल 798661 wikitext text/x-wiki {{Infobox India district | Name = कुल्लू जिला | Local = | State = हिमाचल प्रदेश | Division = | HQ = कुल्लू | Map = | Coordinates = | Area = 5503 | Population = 437474<ref name="demographics" /> | Year = 2011 | Urban = | Literacy = | SexRatio = | Collector = | Tehsils = | LokSabha = | Assembly = | Highways = | Vehicle = | Rain = | Website = http://hpkullu.gov.in/ }} '''कुल्लू जिला''' भारत के [[हिमाचल प्रदेश]] राज्य में एगो जिला बाटे। एकर मुख्यालय [[कुल्लू]] शहर बाटे। एकर कुल रकबा 5503 वर्ग कि॰मी॰ बाटे। ==जनसंख्या== साल 2011 के जनगणना के हिसाब से कुल्लू जिला के कुल जनसंख्या 437474 बाटे आ जनसंख्या घनत्व 79 बाटे।<ref name="demographics">{{cite web|title=Districts of Himachal Pradesh, Census 2011|url=http://www.census2011.co.in/census/state/districtlist/himachal+pradesh.html|accessdate=31 मई 2016}}</ref> ==इहो देखल जाय== * [[हिमाचल प्रदेश के जिला]] {{clear}} ==संदर्भ== {{Reflist}} ==बाहरी कड़ी== {{Commons category|Kullu district|कुल्लू जिला}} * [http://hpkullu.gov.in/ ऑफिशियल वेबसाइट] {{हिमाचल प्रदेश}} [[श्रेणी:हिमाचल प्रदेश के जिला]] [[श्रेणी:कुल्लू जिला]] [[श्रेणी:भारत के जिला]] {{भारत-भू-आधार}} oqksebd3z0nfphbzdhaeny8461f5r9c श्रेणी:हिल स्टेशन 14 49409 798671 714924 2026-06-15T09:54:30Z SM7 3953 [[विकिपीडिया:हॉट-कैट|हॉट-कैट]] द्वारा [[श्रेणी:कस्बा सभ के प्रकार]] जोड़ल गइल 798671 wikitext text/x-wiki {{Cat main}} [[श्रेणी:परबत]] [[श्रेणी:पर्यटक आकर्षण]] [[श्रेणी:कस्बा सभ के प्रकार]] 4is41tdnc1k5pwssalavnngrcm05j2i 798672 798671 2026-06-15T09:54:49Z SM7 3953 [[विकिपीडिया:हॉट-कैट|हॉट-कैट]] द्वारा [[श्रेणी:पर्यटन भूगोल]] जोड़ल गइल 798672 wikitext text/x-wiki {{Cat main}} [[श्रेणी:परबत]] [[श्रेणी:पर्यटक आकर्षण]] [[श्रेणी:कस्बा सभ के प्रकार]] [[श्रेणी:पर्यटन भूगोल]] mu57t25jn116md0zebcx7kb6b0gkda5 नैनीताल 0 84810 798678 736254 2026-06-15T10:39:35Z SM7 3953 +विकिकड़ी जोड़ल गइल 798678 wikitext text/x-wiki {{Infobox settlement | name = Nainital | native_name = | native_name_lang = | other_name = | settlement_type = [[Town]] | image_skyline = {{Photomontage | photo1a = Nainital metro.jpg{{!}}Image of Nainital from route to cheena peak | photo1b = Nainital lake in the morning.jpg{{!}}Nainital Lake | photo2a = Church St John in the Wilderness, Nainital, 11-2009 - panoramio.jpg{{!}}Church of St. John in the Wilderness | photo2b = Naina Devi Temple, Nainital.jpg{{!}}Naina Devi Temple | photo3a = Raj Bhawan.jpg{{!}}Raj Bhavan, Nainital | photo3b = St. Joseph's College, Nainital.jpg{{!}}St. Joseph's College, Nainital | size = 275 |border=0 |spacing=1 |color=none }} | image_alt = | image_caption = '''Clockwise from top:''' <br /> Nainital from cheena peak route, Kumaoni boatmen on [[Nainital Lake|Naini Lake]], Naina Devi Temple, [[St. Joseph's College, Nainital|St. Joseph's College]], [[Raj Bhavan, Nainital|Raj Bhavan]] and Church of St. John in the Wilderness | nickname = Jewel of Kumaon<ref>{{Cite news|url=https://m.economictimes.com/consumer-life/nainital-the-jewel-of-kumaon/articleshow/5758445.cms|title = Nainital: The jewel of Kumaon|newspaper = The Economic Times}}</ref> | map_alt = | map_caption = | pushpin_map = India Uttarakhand#India | pushpin_map_alt = | pushpin_map_caption = Location in Uttarakhand, India | pushpin_relief = yes | coordinates = {{coord|29|23|31|N|79|27|15|E|display=inline,title}} | subdivision_type = Country | subdivision_name = {{flag|India}} | subdivision_type1 = State | subdivision_type2 = Division | subdivision_type3 = District | subdivision_name1 = [[Uttarakhand]] | subdivision_name2 = [[Kumaon division|Kumaon]] | subdivision_name3 = [[Nainital district|Nainital]] | established_title = <!-- Established --> | established_date = | founder = | named_for = [[Nainital Lake|Naini Lake]] | government_type = | governing_body = | unit_pref = Metric | area_footnotes = <ref name="dchba" /> | area_total_km2 = 11.73 | area_rank = | elevation_footnotes = | elevation_m = 2084 | population_total = 41,377 | population_as_of = 2011 | population_density_km2 = auto | population_rank = | population_demonym = Nainitalites(English) Naintalwal (Kumaoni) | population_note = | demographics_type1 = Languages | demographics1_title1 = Official | demographics1_info1 = [[Hindi]]<ref name="Langoff">{{cite web|title=52nd Report of the Commissioner for Linguistic Minorities in India|url=http://nclm.nic.in/shared/linkimages/NCLM52ndReport.pdf|website=nclm.nic.in|publisher=[[Ministry of Minority Affairs]]|access-date=22 December 2018|page=18|url-status=dead|archive-url=https://web.archive.org/web/20170525141614/http://nclm.nic.in/shared/linkimages/NCLM52ndReport.pdf|archive-date=25 May 2017}}</ref> | demographics1_title2 = Additional&nbsp;official | demographics1_info2 = [[Sanskrit]]<ref name="sanskrit">{{cite news|last=Trivedi |first=Anupam |title=Sanskrit is second official language in Uttarakhand |url=http://www.hindustantimes.com/india/sanskrit-is-second-official-language-in-uttarakhand/story-wxk51l8Re4vNxofrr7FAJK.html |newspaper=Hindustan Times |date=19 January 2010 |access-date=30 August 2017 |url-status=live |archive-url=https://web.archive.org/web/20120201065836/http://www.hindustantimes.com/India-news/NorthIndia/Sanskrit-is-second-official-language-in-Uttarakhand/Article1-499467.aspx |archive-date=1 February 2012 }}</ref><ref name="sanskrit2">{{cite news|title=Sanskrit second official language of Uttarakhand|url=http://www.thehindu.com/todays-paper/tp-national/tp-otherstates/Sanskrit-second-official-language-of-Uttarakhand/article15965492.ece |work=The Hindu |date=21 January 2010 |access-date=30 August 2017 |url-status=live|archive-url=https://web.archive.org/web/20180303145846/http://www.thehindu.com/todays-paper/tp-national/tp-otherstates/Sanskrit-second-official-language-of-Uttarakhand/article15965492.ece|archive-date=3 March 2018}}</ref> | demographics1_title3 = Regional | demographics1_info3 = [[Kumaoni language|Kumaoni]]<ref name="KumaoniEthnologue"/> | timezone1 = [[भारतीय मानक समय|आइएसटी]] | utc_offset1 = +5:30 | postal_code_type = [[Postal Index Number|PIN]] | postal_code = 263001/263002 | area_code = +91 - 5942 | area_code_type = Telephone code | registration_plate = UK-04 | website = {{URL|nainital.nic.in}} | footnotes = | official_name = }} '''नैनीताल''' भारतीय राज्य [[उत्तराखंड]] में एगो कस्बा आ पॉपुलर [[हिल स्टेशन]] बा। ई [[नैनीताल जिला]] के आ कुमाऊँ डिवीजन के मुख्यालयो हवे। एहिजे उत्तराखंड के हाइकोर्ट बाटे आ गवर्नर के निवास अस्थान राज भवन भी बा। पुराना समय में ई संजुक्त प्रांत के गर्मी के सीजन के राजधानी होखल करे। एकर नाँव एहिजे मौजूद झील के ऊपर पड़ल हवे, झीलवो के नाँव [[नैनी ताल]] हवे (ताल मने झील)। शहर बाहरी [[हिमालय]] के कुमाऊँ पहाड़ी सभ के अंतर्गत आवे ला आ एह एरिया में अउरियो कई गो छोटहन झील बाड़ी स जिनहन के ताल कहल जाला। नैनीताल उत्तराखंड के राजधानी [[देहरादून]] से 285 किमी के दूरी पर आ देस के राजधानी [[नई दिल्ली|दिल्ली]] से करीबन 345 किमी के दूरी पर बाटे। ई 1,938 मीटर (6,358 फीट) के ऊँचाई पर बसल बाटे आ आसपास के सभसे ऊँच चोटी नैना चोटी हवे जेकर ऊँचाई 2,615 मीटर (8,579 फीट) बाटे। == इहो देखल जाय == * [[सात ताल]] * [[शिमला]] * [[मनाली|कुल्लू-मनाली]] * [[धर्मशाला, हिमाचल प्रदेश|धर्मशाला]] {{clear}} == संदर्भ == {{Reflist|29em}} [[श्रेणी:उत्तराखंड के शहर]] [[श्रेणी:भारत के हिल स्टेशन]] {{India-geo-stub}} i423abr69k9oheu93ovrrdh3al0bp3j मरी (हिल स्टेशन) 0 84816 798677 781736 2026-06-15T10:33:04Z SM7 3953 सुधार कइल गइल 798677 wikitext text/x-wiki {{Infobox settlement | official_name = मरी | native_name = | settlement_type = [[कस्बा]] आ [[हिल स्टेशन]] | image_skyline = {{Photomontage | photo1a = Sunset in hills - Holy Trinity Church, Murree.jpg | | photo3a =Murree Mall.jpg | photo3b = GPO Mall Road Murree.jpg | photo4a = Murree city.jpg | size = 250 | position = center | spacing = Number indicating width of spacing between the images (default: 1) | color = Color of spacing between the images (default: black) | border = Number indicating width of border surrounding the montage (default: 1) | color_border = Color of border surrounding the montage (default: black) | text = | text_background = Color of background behind text (default: #F8F8FF) | foot_montage = }} | imagesize = 300px | image_alt = | image_caption = Clockwise from top: Sunset over Murree's Holy Tri General Post Office, view of valley and Mall Road, colonial-era Mall in central Murree, [[Patriata]]'s Gondola Lift | nickname = ''द डिपो'' (ब्रिटिश भारत में), सफ़ेद शहर | image_map = | mapsize = 150 px | map_alt = | map_caption = पंजाब प्रांत में लोकेशन##पाकिस्तान में लोकेशन | pushpin_map = Punjab Pakistan#Pakistan | pushpin_label_position = top<!-- left, right, top, bottom, none --> | pushpin_map_alt = | pushpin_mapsize = | pushpin_map_caption = | coordinates = {{Coord|33|54|15|N|73|23|25|E|type:city_region:PK|display=inline,title}} | subdivision_type = देस | subdivision_name = {{flag|पाकिस्तान}} | subdivision_type1 = प्रांत | subdivision_type2 = जिला | subdivision_type3 = [[तहसील]] | subdivision_name1 = [[पंजाब, पाकिस्तान]] | subdivision_name2 = [[रावलपिंडी]] | subdivision_name3 = मरी | area_total_km2 = | elevation_m = 2291.2 | population_total = 25,816 | population_as_of =2017 | population_footnotes = <ref>{{Cite web|url=https://www.citypopulation.de/Pakistan-Punjab.html?cityid=11422|title=Punjāb (Pakistan): Province, Major Cities, Municipalites &#91;sic&#93; & Towns - Population Statistics, Maps, Charts, Weather and Web Information|website=www.citypopulation.de}}</ref> | population_density_km2 = auto | population_est = | pop_est_as_of = | timezone1 = [[पाकिस्तान स्टैंडर्ड टाइम|पीकेटी]] | utc_offset1 = +5 | area_code = | area_code_type = | blank_name_sec2 = यूनियन काउंसिल | blank_info_sec2 = 8 | footnotes = | elevation_m_min = | elevation_m_max = }} '''मरी''' ({{Lang|en|Murree}}) [[पाकिस्तान]] के [[पंजाब, पाकिस्तान|पंजाब प्रांत]] में मरी जिला में एगो कस्बा आ [[हिल स्टेशन]] बा। भूगोलिक हिसाब से ई [[हिमालय]] के [[पीर पंजाल|पीर पंजाल श्रेणी]] के गलयात इलाका में पड़े ला। ई इस्लामाबाद-रावलपिंडी मेट्रो एरिया के एगो किनारे पर पड़े ला आ [[इस्लामाबाद]] के बस 30 किमी के दूरी पर उत्तर-पूरुब में बाटे। एकर औसत ऊँचाई [[समुंद्र तल]] से {{convert|2291|m|ft|0}} बाटे जहाँ ब्रिटिश लोग पंजाब के मैदानी इलाका के भीषण गरमी से बचाव खातिर एह हिल स्टेशन के अस्थापना कइल।<ref name=Tribune>{{Cite news|url=https://tribune.com.pk/story/630567/a-british-town-in-the-hills-book-on-murree-launched/|title=A British town in the hills: Book on Murree launched|newspaper= The Express Tribune (newspaper)|date=2013-11-12|language=en-US|access-date=16 October 2021}}</ref> 1851 में ब्रिटिश सेना खातिर ई एगो [[सैनिटोरियम]] के रूप में बनावल गइल आ परमामेंट टाउन के अस्थापना 1853 में भइल आ कुछे समय बाद एहिजे एगो [[चर्च (संस्था)|चर्च]] अस्थापित कइल गइल। 1876 तक ले ई [[ब्रिटिश राज]] के पंजाब प्रांत के गरमी के सीजन के राजधानी रहल, एकरा बाद ई दर्जा [[शिमला]] के मिल गइल। पाकिस्तान के आजादी के बाद से अब्बो पाकिस्तान के एगो मेन हिल स्टेशन आ पर्यटक आकर्षण हवे। साथे-साथ ई [[आजाद काश्मीर]] में मौजूद हिल स्टेशन [[एबटाबाद]] खातिर एगो ट्रांजिट प्वाइंट के भी काम करे ला। 2022 के जनवरी में एहिजे भारी बर्फबारी से कई लोगन के जान चल गइल।<ref>{{cite web |title=मरी: बर्फ़बारी में गाड़ियों के अंदर मौतें, कैसे हैं अब ज़मीनी हालात |url=https://www.bbc.com/hindi/international-59925951 |website=BBC News हिंदी |access-date=9 अप्रैल 2022 |language=hi}}</ref> {{clear}} == संदर्भ == {{Reflist|33em}} == बाहरी कड़ी == {{Commons category|Murree}} * {{cite encyclopedia|url=http://www.oxfordreference.com/view/10.1093/acref/9780199580897.001.0001/acref-9780199580897-e-5014?rskey=EswHaH&result=5671&q=|title=Murree|work=Concise Dictionary of World Place-Names|first=John|last=Everett-Heath|publisher=[[Oxford University Press]]|year=2012|edition=2nd|access-date=16 October 2021|ref={{SfnRef|Concise Dictionary of World Place-Names|2021}}}} * {{cite web|ref=none |url=http://www.geonames.org/1169684/murree.html|title=Murree, Pakistan |work=[[GeoNames]]|year=2007|access-date=16 October 2021}} * {{cite web|ref=none|url=http://www.murreehill.com/polhis.html|title=Political History of Murree|first=Wajih|last=Abbasi|date=26 April 2014|access-date=16 October 2021|archive-date=3 March 2016|archive-url=https://web.archive.org/web/20160303232541/http://www.murreehill.com/polhis.html|url-status=dead}} * {{cite web|ref=none|url=https://www.pakistantoursonline.com/|title=Pakistan Tours Online|first=Usama|last=Abbasi|date=26 April 2014|access-date=16 October 2021|archive-date=15 October 2021|archive-url=https://web.archive.org/web/20211015202449/https://www.pakistantoursonline.com/|url-status=dead}} {{Authority control}} [[श्रेणी:पाकिस्तान के शहर]] [[श्रेणी:हिल स्टेशन]] 67htjx4hy4c7b8q6zv1o0f9hwm2j40b फाइनेंस 0 94830 798662 781969 2026-06-15T01:12:59Z SM7 3953 संदर्भ जोड़ल/सुधारल गइल, बिस्तार कइल गइल 798662 wikitext text/x-wiki '''फाइनेंस''' ({{Lang|en|finance}}; उच्चारण: '''फाइनांस''', फाइनेंस चाहे '''फिनान्स'''; हिंदी: वित्त) रुपिया-पइसा (मुद्रा भा मनी), करेंसी, आ पूंजी संपत्ति के अध्ययन आ बिस्लेषण करे वाली शाखा ह। दुसरे शब्दन में, फाइनेंस धन के मैनजमेंट के बिज्ञान हवे।<ref name="n162" /> ई [[अर्थशास्त्र]] से संबंधित बाकी एकरा से कुछ अलग होला, अर्थशास्त्र में सामान आ सेवा सभ के उत्पादन, बितरण आ खपत के अध्ययन होखे ला। बिसयछेत्र के आधार पर फाइनांशियल सिस्टम सभ में फाइनांशियल गतिविधि सभ के, एह अनुशासन के [[प्राइवेट फाइनेंस|निजी]], [[कॉर्पोरेट फाइनेंस|कॉर्पोरेट]], आ [[पब्लिक फाइनेंस]] में बाँटल जा सके ला। फाइनेंस के अंतर्गत आय (कमाई), खर्च, बचत, निवेश आ ऋण जइसन विषयन के समझल आ उनका के प्रभावी ढंग से प्रबंधित कइल शामिल होला। फाइनेंस के उद्देश्य उपलब्ध वित्तीय संसाधनन के सही उपयोग करत आर्थिक लक्ष्यन के प्राप्त कइल होला।<ref name="n162">{{cite book |last1=Tsokos |first1=Chris |last2=Wooten |first2=Rebecca |title=The Joy of Finite Mathematics |chapter=The Usefulness of Mathematics |publisher=Elsevier |year=2016 |isbn=978-0-12-802967-1 |doi=10.1016/b978-0-12-802967-1.00001-2 |page=1–13}}</ref> {{clear}} == संदर्भ == {{Reflist|29em}} [[श्रेणी:फाइनेंस| ]] {{finance-stub}} 8igymxf558jlilq20i6ymrcp83u5ucw मनाली 0 101052 798614 798613 2026-06-14T14:36:59Z SM7 3953 [[विकिपीडिया:हॉट-कैट|हॉट-कैट]] द्वारा [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] जोड़ल गइल 798614 wikitext text/x-wiki '''मनाली''' [[हिमाचल प्रदेश]] के [[कुल्लू जिला]] में स्थित एगो मशहूर पर्वतीय पर्यटन नगर हवे। ई कुल्लू शहर के नगीचे, [[ब्यास नदी]] के बनावल [[कुल्लू घाटी]] के उत्तरी माथ पर बसल बा। मनाली, राज्य के राजधानी [[शिमला]] से करीबन 270 किलोमीटर उत्तर में आ भारत के राजधानी [[नई दिल्ली]] से लगभग 544 किलोमीटर उत्तर-पूरुब में पड़े ला। मनाली भारत के सबसे पॉपुलर टूरिस्ट डेस्टिनेशन सभ में से एक हवे। ई लाहौल-स्पीति जिला आ लद्दाख के लेह शहर जाए वाला यात्रियन खातिर प्रमुख प्रवेश द्वार के काम करे ला। ऐतिहासिक रूप से मनाली एगो प्राचीन व्यापारिक मार्ग के शुरुआती पड़ाव भी रहे। ई मार्ग लाहौल आ लद्दाख से होके [[कराकोरम दर्रा]] पार करत चीन के तारिम बेसिन में स्थित यारकंद आ खोतान तक जाइल करे। एह रस्ता के माध्यम से प्राचीन काल में ब्यापारिक आ सांस्कृतिक संपर्क स्थापित रहत रहे। 2011 के भारत जनगणना के अनुसार, मनाली नगर परिषद क्षेत्र के आबादी 8,096 रहल, जवना में 4,717 पुरुष आ 3,379 महिला शामिल रहली। नाया अनुमानन के हिसाब से 2025 तक नगर के आबादी बढ़ के लगभग 11,700 हो गइल बा। [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] qb5d8ydejeuj71k9beb0nkletfl8xsk 798615 798614 2026-06-14T14:46:33Z SM7 3953 बिस्तार कइल गइल 798615 wikitext text/x-wiki '''मनाली''' ({{Langx|en|Manali}}) जेकरा '''कुल्लू-मनाली''' एक संघहू बोलावल जाला, [[हिमाचल प्रदेश]] के [[कुल्लू जिला]] में स्थित एगो मशहूर पर्वतीय पर्यटन नगर (हिल स्टेशन आ रिसॉर्ट सिटी) हवे। ई [[कुल्लू शहर]] के नगीचे, [[ब्यास नदी]] के बनावल [[कुल्लू घाटी]] के उत्तरी माथ पर बसल बा। मनाली, राज्य के राजधानी [[शिमला]] से करीबन {{convert|270|km|mi|abbr=}} उत्तर में आ भारत के राजधानी [[नई दिल्ली]] से लगभग {{Convert|544|km|mi}} उत्तर-पूरुब में पड़े ला। मनाली भारत के सबसे पॉपुलर टूरिस्ट डेस्टिनेशन सभ में से एक हवे। ई [[लाहुल अउरी स्पीति जिला|लाहौल-स्पीति जिला]] आ [[लद्दाख]] के [[लेह]] शहर जाए वाला यात्रियन खातिर हिमालय के दुर्गम हिस्सा में दरवाजा के काम करे ला।<ref name="Gardner1995">''Paper also Presented at the International Seminar on Disasters, Environment and Development, 9–12 December 1994, New Delhi, India'' –by {{cite book|author=James S. Gardner|title=Tourism and Risk from Natural Hazards: Manali, Himachal Pradesh, India |url=https://books.google.com/books?id=NtgsAQAAMAAJ|year=1995|publisher=Natural Resources Institute, University of Manitoba}}</ref> इतिहासिक रूप से, प्राचीन काल (पुराना जमाना) में, मनाली एगो ब्यापारिक मार्ग के शुरुआती पड़ाव भी रहे। ई मार्ग [[लाहुल]] आ लद्दाख से होके [[कराकोरम दर्रा]] पार करत [[चीन]] के [[तारिम बेसिन]] में स्थित [[यारकंद]] आ [[खोतान]] तक जाइल करे। एह रस्ता के जरिये से प्राचीन काल में ब्यापारिक आ सांस्कृतिक संपर्क स्थापित रहत रहे। 2011 के भारत जनगणना के अनुसार, मनाली नगर परिषद क्षेत्र के आबादी 8,096 रहल, जवना में 4,717 पुरुष आ 3,379 महिला शामिल रहली। नाया अनुमानन के हिसाब से 2025 तक नगर के आबादी बढ़ के लगभग 11,700 हो गइल बा।<ref>{{Cite web |title=Manali Municipal Council City Population Census 2011-2025 {{!}} Himachal Pradesh |url=https://www.census2011.co.in/data/town/800100-manali-himachal-pradesh.html |access-date=26 July 2025 |website=www.census2011.co.in}}</ref> == इहो देखल जाय == * [[धर्मशाला, हिमाचल प्रदेश|धर्मशाला]] * [[कुल्लू घाटी]] * [[लेह]] ([[लद्दाख]]) == संदर्भ == {{Reflist|29em}} [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] svkd9yx9fjdkednmn0nhf2fmpemkk9l 798616 798615 2026-06-14T14:47:11Z SM7 3953 [[विकिपीडिया:हॉट-कैट|हॉट-कैट]] द्वारा [[श्रेणी:हिल स्टेशन]] जोड़ल गइल 798616 wikitext text/x-wiki '''मनाली''' ({{Langx|en|Manali}}) जेकरा '''कुल्लू-मनाली''' एक संघहू बोलावल जाला, [[हिमाचल प्रदेश]] के [[कुल्लू जिला]] में स्थित एगो मशहूर पर्वतीय पर्यटन नगर (हिल स्टेशन आ रिसॉर्ट सिटी) हवे। ई [[कुल्लू शहर]] के नगीचे, [[ब्यास नदी]] के बनावल [[कुल्लू घाटी]] के उत्तरी माथ पर बसल बा। मनाली, राज्य के राजधानी [[शिमला]] से करीबन {{convert|270|km|mi|abbr=}} उत्तर में आ भारत के राजधानी [[नई दिल्ली]] से लगभग {{Convert|544|km|mi}} उत्तर-पूरुब में पड़े ला। मनाली भारत के सबसे पॉपुलर टूरिस्ट डेस्टिनेशन सभ में से एक हवे। ई [[लाहुल अउरी स्पीति जिला|लाहौल-स्पीति जिला]] आ [[लद्दाख]] के [[लेह]] शहर जाए वाला यात्रियन खातिर हिमालय के दुर्गम हिस्सा में दरवाजा के काम करे ला।<ref name="Gardner1995">''Paper also Presented at the International Seminar on Disasters, Environment and Development, 9–12 December 1994, New Delhi, India'' –by {{cite book|author=James S. Gardner|title=Tourism and Risk from Natural Hazards: Manali, Himachal Pradesh, India |url=https://books.google.com/books?id=NtgsAQAAMAAJ|year=1995|publisher=Natural Resources Institute, University of Manitoba}}</ref> इतिहासिक रूप से, प्राचीन काल (पुराना जमाना) में, मनाली एगो ब्यापारिक मार्ग के शुरुआती पड़ाव भी रहे। ई मार्ग [[लाहुल]] आ लद्दाख से होके [[कराकोरम दर्रा]] पार करत [[चीन]] के [[तारिम बेसिन]] में स्थित [[यारकंद]] आ [[खोतान]] तक जाइल करे। एह रस्ता के जरिये से प्राचीन काल में ब्यापारिक आ सांस्कृतिक संपर्क स्थापित रहत रहे। 2011 के भारत जनगणना के अनुसार, मनाली नगर परिषद क्षेत्र के आबादी 8,096 रहल, जवना में 4,717 पुरुष आ 3,379 महिला शामिल रहली। नाया अनुमानन के हिसाब से 2025 तक नगर के आबादी बढ़ के लगभग 11,700 हो गइल बा।<ref>{{Cite web |title=Manali Municipal Council City Population Census 2011-2025 {{!}} Himachal Pradesh |url=https://www.census2011.co.in/data/town/800100-manali-himachal-pradesh.html |access-date=26 July 2025 |website=www.census2011.co.in}}</ref> == इहो देखल जाय == * [[धर्मशाला, हिमाचल प्रदेश|धर्मशाला]] * [[कुल्लू घाटी]] * [[लेह]] ([[लद्दाख]]) == संदर्भ == {{Reflist|29em}} [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] [[श्रेणी:हिल स्टेशन]] bd4ttqwtp9cyfxzaa5rua8yu4j94lbv 798617 798616 2026-06-14T15:02:58Z SM7 3953 ज्ञानसंदूक जोड़ल गइल 798617 wikitext text/x-wiki {{Infobox settlement | name = मनाली | settlement_type = [[कस्बा]] | image_skyline = {{multiple image | border = infobox | total_width = 290 | image_style = | perrow = 1/2/2/1 |image1= Manali City.jpg |image2=Mall Road, Manali.jpg |image3= Dhauladhar view on the way to solang valley.jpg |image4=Beautiful River valley.jpg |image5=Mountains, Manali, Himachal Pradesh.jpg |image6= Manali in winters.png }} | image_caption = '''''ऊपर से घड़ी के सुई के दिसा में:''''' मनाली के हवाई व्यू, धौलाधार व्यू, मनाली के परबत श्रेणी, बर्फ़बारी के बाद मनाली, मनाली में नदी, [[माल रोड, मनाली|माल रोड]] | subdivision_name2 = [[कुल्लू जिला|कुल्लू]] | established_title = <!-- Established --> | established_date = | founder = | named_for = ''[[मनु (हिंदू धर्म)|मनु]]'' | government_type = | governing_body = | unit_pref = Metric | area_footnotes = | area_rank = | area_total_km2 = | elevation_footnotes = | elevation_m = 2050 | population_total = 8096<ref name="pop">{{Cite web|url=http://www.citypopulation.de/php/india-himachalpradesh.php?cityid=0240401000|title= Manali (Kullu, Himachal Pradesh, India) - population statistics, map, and location|access-date=1 August 2014}}</ref> | population_as_of = [[भारत के जनगणना, 2011|2011]] | population_rank = 22<sup>वाँ</sup> (राज्यन में) | population_density_km2 = auto | population_footnotes = | demographics_type1 = भाषा | demographics1_title1 = ऑफिशियल | demographics1_info1 = [[हिंदी भाषा|हिंदी]] | demographics1_title2 = क्षेत्रीय | demographics1_info2 = [[कुल्लुई पहाड़ी भाषा]]<ref>{{cite web| website=Literary Herald |title=Language and dialect of Himachal Pradesh |url=https://tlhjournal.com/uploads/products/35.shradha-shandil-article.pdf?utm_}}</ref> | timezone1 = [[भारतीय मानक समय|IST]] | utc_offset1 = +5:30 | postal_code_type = [[पिनकोड]] | postal_code = 175131 | area_code_type = फोन कोड | area_code = +911902 | registration_plate = HP-58 | website = | footnotes = | subdivision_name = {{flag|भारत}} | native_name = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> | subdivision_type2 = [[भारत के जिला|जिला]] | subdivision_name1 = [[हिमाचल प्रदेश]] | subdivision_type1 = [[भारत के राज्य|राज्य]] | pushpin_label = मनाली | subdivision_type = [[देश]] | pushpin_map_alt = मनाली के लोकेशन देखाव हिमाचल आ भारत के नक्शा | pushpin_label_position = right | coordinates = {{coord|32.243177|N|77.189246|E|display=inline, title}} | pushpin_map = India Himachal Pradesh#India | native_name_lang = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> }} '''मनाली''' ({{Langx|en|Manali}}) जेकरा '''कुल्लू-मनाली''' एक संघहू बोलावल जाला, [[हिमाचल प्रदेश]] के [[कुल्लू जिला]] में स्थित एगो मशहूर पर्वतीय पर्यटन नगर (हिल स्टेशन आ रिसॉर्ट सिटी) हवे। ई [[कुल्लू शहर]] के नगीचे, [[ब्यास नदी]] के बनावल [[कुल्लू घाटी]] के उत्तरी माथ पर बसल बा। मनाली, राज्य के राजधानी [[शिमला]] से करीबन {{convert|270|km|mi|abbr=}} उत्तर में आ भारत के राजधानी [[नई दिल्ली]] से लगभग {{Convert|544|km|mi}} उत्तर-पूरुब में पड़े ला। मनाली भारत के सबसे पॉपुलर टूरिस्ट डेस्टिनेशन सभ में से एक हवे। ई [[लाहुल अउरी स्पीति जिला|लाहौल-स्पीति जिला]] आ [[लद्दाख]] के [[लेह]] शहर जाए वाला यात्रियन खातिर हिमालय के दुर्गम हिस्सा में दरवाजा के काम करे ला।<ref name="Gardner1995">''Paper also Presented at the International Seminar on Disasters, Environment and Development, 9-12 December 1994, New Delhi, India'' -by {{cite book|author=James S. Gardner|title=Tourism and Risk from Natural Hazards: Manali, Himachal Pradesh, India |url=https://books.google.com/books?id=NtgsAQAAMAAJ|year=1995|publisher=Natural Resources Institute, University of Manitoba}}</ref> इतिहासिक रूप से, प्राचीन काल (पुराना जमाना) में, मनाली एगो ब्यापारिक मार्ग के शुरुआती पड़ाव भी रहे। ई मार्ग [[लाहुल]] आ लद्दाख से होके [[कराकोरम दर्रा]] पार करत [[चीन]] के [[तारिम बेसिन]] में स्थित [[यारकंद]] आ [[खोतान]] तक जाइल करे। एह रस्ता के जरिये से प्राचीन काल में ब्यापारिक आ सांस्कृतिक संपर्क स्थापित रहत रहे। 2011 के भारत जनगणना के अनुसार, मनाली नगर परिषद क्षेत्र के आबादी 8,096 रहल, जवना में 4,717 पुरुष आ 3,379 महिला शामिल रहली। नाया अनुमानन के हिसाब से 2025 तक नगर के आबादी बढ़ के लगभग 11,700 हो गइल बा।<ref>{{Cite web |title=Manali Municipal Council City Population Census 2011-2025 {{!}} Himachal Pradesh |url=https://www.census2011.co.in/data/town/800100-manali-himachal-pradesh.html |access-date=26 July 2025 |website=www.census2011.co.in}}</ref> {{clear}} == इहो देखल जाय == * [[धर्मशाला, हिमाचल प्रदेश|धर्मशाला]] * [[कुल्लू घाटी]] * [[लेह]] ([[लद्दाख]]) == संदर्भ == {{Reflist|29em}} [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] [[श्रेणी:हिल स्टेशन]] 75742bqz5rjn9bf5sbl0hoh1p6nc1ko 798618 798617 2026-06-14T15:04:28Z SM7 3953 [[User:SM7/stubsorter|Stubsorter]] के मदद से {{India-geo-stub}} जोड़ल गइल। 798618 wikitext text/x-wiki {{Infobox settlement | name = मनाली | settlement_type = [[कस्बा]] | image_skyline = {{multiple image | border = infobox | total_width = 290 | image_style = | perrow = 1/2/2/1 |image1= Manali City.jpg |image2=Mall Road, Manali.jpg |image3= Dhauladhar view on the way to solang valley.jpg |image4=Beautiful River valley.jpg |image5=Mountains, Manali, Himachal Pradesh.jpg |image6= Manali in winters.png }} | image_caption = '''''ऊपर से घड़ी के सुई के दिसा में:''''' मनाली के हवाई व्यू, धौलाधार व्यू, मनाली के परबत श्रेणी, बर्फ़बारी के बाद मनाली, मनाली में नदी, [[माल रोड, मनाली|माल रोड]] | subdivision_name2 = [[कुल्लू जिला|कुल्लू]] | established_title = <!-- Established --> | established_date = | founder = | named_for = ''[[मनु (हिंदू धर्म)|मनु]]'' | government_type = | governing_body = | unit_pref = Metric | area_footnotes = | area_rank = | area_total_km2 = | elevation_footnotes = | elevation_m = 2050 | population_total = 8096<ref name="pop">{{Cite web|url=http://www.citypopulation.de/php/india-himachalpradesh.php?cityid=0240401000|title= Manali (Kullu, Himachal Pradesh, India) - population statistics, map, and location|access-date=1 August 2014}}</ref> | population_as_of = [[भारत के जनगणना, 2011|2011]] | population_rank = 22<sup>वाँ</sup> (राज्यन में) | population_density_km2 = auto | population_footnotes = | demographics_type1 = भाषा | demographics1_title1 = ऑफिशियल | demographics1_info1 = [[हिंदी भाषा|हिंदी]] | demographics1_title2 = क्षेत्रीय | demographics1_info2 = [[कुल्लुई पहाड़ी भाषा]]<ref>{{cite web| website=Literary Herald |title=Language and dialect of Himachal Pradesh |url=https://tlhjournal.com/uploads/products/35.shradha-shandil-article.pdf?utm_}}</ref> | timezone1 = [[भारतीय मानक समय|IST]] | utc_offset1 = +5:30 | postal_code_type = [[पिनकोड]] | postal_code = 175131 | area_code_type = फोन कोड | area_code = +911902 | registration_plate = HP-58 | website = | footnotes = | subdivision_name = {{flag|भारत}} | native_name = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> | subdivision_type2 = [[भारत के जिला|जिला]] | subdivision_name1 = [[हिमाचल प्रदेश]] | subdivision_type1 = [[भारत के राज्य|राज्य]] | pushpin_label = मनाली | subdivision_type = [[देश]] | pushpin_map_alt = मनाली के लोकेशन देखाव हिमाचल आ भारत के नक्शा | pushpin_label_position = right | coordinates = {{coord|32.243177|N|77.189246|E|display=inline, title}} | pushpin_map = India Himachal Pradesh#India | native_name_lang = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> }} '''मनाली''' ({{Langx|en|Manali}}) जेकरा '''कुल्लू-मनाली''' एक संघहू बोलावल जाला, [[हिमाचल प्रदेश]] के [[कुल्लू जिला]] में स्थित एगो मशहूर पर्वतीय पर्यटन नगर (हिल स्टेशन आ रिसॉर्ट सिटी) हवे। ई [[कुल्लू शहर]] के नगीचे, [[ब्यास नदी]] के बनावल [[कुल्लू घाटी]] के उत्तरी माथ पर बसल बा। मनाली, राज्य के राजधानी [[शिमला]] से करीबन {{convert|270|km|mi|abbr=}} उत्तर में आ भारत के राजधानी [[नई दिल्ली]] से लगभग {{Convert|544|km|mi}} उत्तर-पूरुब में पड़े ला। मनाली भारत के सबसे पॉपुलर टूरिस्ट डेस्टिनेशन सभ में से एक हवे। ई [[लाहुल अउरी स्पीति जिला|लाहौल-स्पीति जिला]] आ [[लद्दाख]] के [[लेह]] शहर जाए वाला यात्रियन खातिर हिमालय के दुर्गम हिस्सा में दरवाजा के काम करे ला।<ref name="Gardner1995">''Paper also Presented at the International Seminar on Disasters, Environment and Development, 9-12 December 1994, New Delhi, India'' -by {{cite book|author=James S. Gardner|title=Tourism and Risk from Natural Hazards: Manali, Himachal Pradesh, India |url=https://books.google.com/books?id=NtgsAQAAMAAJ|year=1995|publisher=Natural Resources Institute, University of Manitoba}}</ref> इतिहासिक रूप से, प्राचीन काल (पुराना जमाना) में, मनाली एगो ब्यापारिक मार्ग के शुरुआती पड़ाव भी रहे। ई मार्ग [[लाहुल]] आ लद्दाख से होके [[कराकोरम दर्रा]] पार करत [[चीन]] के [[तारिम बेसिन]] में स्थित [[यारकंद]] आ [[खोतान]] तक जाइल करे। एह रस्ता के जरिये से प्राचीन काल में ब्यापारिक आ सांस्कृतिक संपर्क स्थापित रहत रहे। 2011 के भारत जनगणना के अनुसार, मनाली नगर परिषद क्षेत्र के आबादी 8,096 रहल, जवना में 4,717 पुरुष आ 3,379 महिला शामिल रहली। नाया अनुमानन के हिसाब से 2025 तक नगर के आबादी बढ़ के लगभग 11,700 हो गइल बा।<ref>{{Cite web |title=Manali Municipal Council City Population Census 2011-2025 {{!}} Himachal Pradesh |url=https://www.census2011.co.in/data/town/800100-manali-himachal-pradesh.html |access-date=26 July 2025 |website=www.census2011.co.in}}</ref> {{clear}} == इहो देखल जाय == * [[धर्मशाला, हिमाचल प्रदेश|धर्मशाला]] * [[कुल्लू घाटी]] * [[लेह]] ([[लद्दाख]]) == संदर्भ == {{Reflist|29em}} [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] [[श्रेणी:हिल स्टेशन]] {{India-geo-stub}} 3wb44w2y48a9sl9ctkpzn8mteh57kem 798663 798618 2026-06-15T09:21:31Z SM7 3953 सुधार कइल गइल 798663 wikitext text/x-wiki {{Infobox settlement | name = मनाली | settlement_type = ([[हिल स्टेशन]] आ [[रिसॉर्ट टाउन]]) | image_skyline = {{multiple image | border = infobox | total_width = 290 | image_style = | perrow = 1/2/2/1 |image1= Manali City.jpg |image2=Mall Road, Manali.jpg |image3= Dhauladhar view on the way to solang valley.jpg |image4=Beautiful River valley.jpg |image5=Mountains, Manali, Himachal Pradesh.jpg |image6= Manali in winters.png }} | image_caption = '''''ऊपर से घड़ी के सुई के दिसा में:''''' मनाली के हवाई व्यू, धौलाधार व्यू, मनाली के परबत श्रेणी, बर्फ़बारी के बाद मनाली, मनाली में नदी, [[माल रोड, मनाली|माल रोड]] | subdivision_name2 = [[कुल्लू जिला|कुल्लू]] | established_title = <!-- Established --> | established_date = | founder = | named_for = ''[[मनु (हिंदू धर्म)|मनु]]'' | government_type = | governing_body = | unit_pref = Metric | area_footnotes = | area_rank = | area_total_km2 = | elevation_footnotes = | elevation_m = 2050 | population_total = 8096<ref name="pop">{{Cite web|url=http://www.citypopulation.de/php/india-himachalpradesh.php?cityid=0240401000|title= Manali (Kullu, Himachal Pradesh, India) - population statistics, map, and location|access-date=1 August 2014}}</ref> | population_as_of = [[भारत के जनगणना, 2011|2011]] | population_rank = 22<sup>वाँ</sup> (राज्यन में) | population_density_km2 = auto | population_footnotes = | demographics_type1 = भाषा | demographics1_title1 = ऑफिशियल | demographics1_info1 = [[हिंदी भाषा|हिंदी]] | demographics1_title2 = क्षेत्रीय | demographics1_info2 = [[कुल्लुई पहाड़ी भाषा]]<ref>{{cite web| website=Literary Herald |title=Language and dialect of Himachal Pradesh |url=https://tlhjournal.com/uploads/products/35.shradha-shandil-article.pdf?utm_}}</ref> | timezone1 = [[भारतीय मानक समय|IST]] | utc_offset1 = +5:30 | postal_code_type = [[पिनकोड]] | postal_code = 175131 | area_code_type = फोन कोड | area_code = +911902 | registration_plate = HP-58 | website = | footnotes = | subdivision_name = {{flag|भारत}} | native_name = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> | subdivision_type2 = [[भारत के जिला|जिला]] | subdivision_name1 = [[हिमाचल प्रदेश]] | subdivision_type1 = [[भारत के राज्य|राज्य]] | pushpin_label = मनाली | subdivision_type = [[देश]] | pushpin_map_alt = मनाली के लोकेशन देखाव हिमाचल आ भारत के नक्शा | pushpin_label_position = right | coordinates = {{coord|32.243177|N|77.189246|E|display=inline, title}} | pushpin_map = India Himachal Pradesh#India | native_name_lang = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> }} '''मनाली''' ({{Langx|en|Manali}}) जेकरा '''कुल्लू-मनाली''' एक संघहू बोलावल जाला, [[हिमाचल प्रदेश]] के [[कुल्लू जिला]] में स्थित एगो मशहूर पर्वतीय पर्यटन नगर ([[हिल स्टेशन]] आ [[रिसॉर्ट सिटी]]) हवे। ई [[कुल्लू शहर]] के नगीचे, [[ब्यास नदी]] के बनावल [[कुल्लू घाटी]] के उत्तरी माथ पर बसल बा। मनाली, राज्य के राजधानी [[शिमला]] से करीबन {{convert|270|km|mi|abbr=}} उत्तर में आ भारत के राजधानी [[नई दिल्ली]] से लगभग {{Convert|544|km|mi}} उत्तर-पूरुब में पड़े ला। मनाली भारत के सबसे पॉपुलर टूरिस्ट डेस्टिनेशन सभ में से एक हवे। ई [[लाहुल अउरी स्पीति जिला|लाहौल-स्पीति जिला]] आ [[लद्दाख]] के [[लेह]] शहर जाए वाला यात्रियन खातिर हिमालय के दुर्गम हिस्सा में दरवाजा के काम करे ला।<ref name="Gardner1995">''Paper also Presented at the International Seminar on Disasters, Environment and Development, 9-12 December 1994, New Delhi, India'' -by {{cite book|author=James S. Gardner|title=Tourism and Risk from Natural Hazards: Manali, Himachal Pradesh, India |url=https://books.google.com/books?id=NtgsAQAAMAAJ|year=1995|publisher=Natural Resources Institute, University of Manitoba}}</ref> इतिहासिक रूप से, प्राचीन काल (पुराना जमाना) में, मनाली एगो ब्यापारिक मार्ग के शुरुआती पड़ाव भी रहे। ई मार्ग [[लाहुल]] आ लद्दाख से होके [[कराकोरम दर्रा]] पार करत [[चीन]] के [[तारिम बेसिन]] में स्थित [[यारकंद]] आ [[खोतान]] तक जाइल करे। एह रस्ता के जरिये से प्राचीन काल में ब्यापारिक आ सांस्कृतिक संपर्क स्थापित रहत रहे। 2011 के भारत जनगणना के अनुसार, मनाली नगर परिषद क्षेत्र के आबादी 8,096 रहल, जवना में 4,717 पुरुष आ 3,379 महिला शामिल रहली। नाया अनुमानन के हिसाब से 2025 तक नगर के आबादी बढ़ के लगभग 11,700 हो गइल बा।<ref>{{Cite web |title=Manali Municipal Council City Population Census 2011-2025 {{!}} Himachal Pradesh |url=https://www.census2011.co.in/data/town/800100-manali-himachal-pradesh.html |access-date=26 July 2025 |website=www.census2011.co.in}}</ref> {{clear}} == इहो देखल जाय == * [[धर्मशाला, हिमाचल प्रदेश|धर्मशाला]] * [[कुल्लू घाटी]] * [[लेह]] ([[लद्दाख]]) == संदर्भ == {{Reflist|29em}} [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] [[श्रेणी:हिल स्टेशन]] {{India-geo-stub}} q3u96nxn2vtnv7x0k2mafmkz7ihm6hk 798673 798663 2026-06-15T09:55:23Z SM7 3953 [[विकिपीडिया:हॉट-कैट|हॉट-कैट]] द्वारा [[श्रेणी:हिल स्टेशन]] हटावल गइल; [[श्रेणी:भारत के हिल स्टेशन]] जोड़ल गइल 798673 wikitext text/x-wiki {{Infobox settlement | name = मनाली | settlement_type = ([[हिल स्टेशन]] आ [[रिसॉर्ट टाउन]]) | image_skyline = {{multiple image | border = infobox | total_width = 290 | image_style = | perrow = 1/2/2/1 |image1= Manali City.jpg |image2=Mall Road, Manali.jpg |image3= Dhauladhar view on the way to solang valley.jpg |image4=Beautiful River valley.jpg |image5=Mountains, Manali, Himachal Pradesh.jpg |image6= Manali in winters.png }} | image_caption = '''''ऊपर से घड़ी के सुई के दिसा में:''''' मनाली के हवाई व्यू, धौलाधार व्यू, मनाली के परबत श्रेणी, बर्फ़बारी के बाद मनाली, मनाली में नदी, [[माल रोड, मनाली|माल रोड]] | subdivision_name2 = [[कुल्लू जिला|कुल्लू]] | established_title = <!-- Established --> | established_date = | founder = | named_for = ''[[मनु (हिंदू धर्म)|मनु]]'' | government_type = | governing_body = | unit_pref = Metric | area_footnotes = | area_rank = | area_total_km2 = | elevation_footnotes = | elevation_m = 2050 | population_total = 8096<ref name="pop">{{Cite web|url=http://www.citypopulation.de/php/india-himachalpradesh.php?cityid=0240401000|title= Manali (Kullu, Himachal Pradesh, India) - population statistics, map, and location|access-date=1 August 2014}}</ref> | population_as_of = [[भारत के जनगणना, 2011|2011]] | population_rank = 22<sup>वाँ</sup> (राज्यन में) | population_density_km2 = auto | population_footnotes = | demographics_type1 = भाषा | demographics1_title1 = ऑफिशियल | demographics1_info1 = [[हिंदी भाषा|हिंदी]] | demographics1_title2 = क्षेत्रीय | demographics1_info2 = [[कुल्लुई पहाड़ी भाषा]]<ref>{{cite web| website=Literary Herald |title=Language and dialect of Himachal Pradesh |url=https://tlhjournal.com/uploads/products/35.shradha-shandil-article.pdf?utm_}}</ref> | timezone1 = [[भारतीय मानक समय|IST]] | utc_offset1 = +5:30 | postal_code_type = [[पिनकोड]] | postal_code = 175131 | area_code_type = फोन कोड | area_code = +911902 | registration_plate = HP-58 | website = | footnotes = | subdivision_name = {{flag|भारत}} | native_name = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> | subdivision_type2 = [[भारत के जिला|जिला]] | subdivision_name1 = [[हिमाचल प्रदेश]] | subdivision_type1 = [[भारत के राज्य|राज्य]] | pushpin_label = मनाली | subdivision_type = [[देश]] | pushpin_map_alt = मनाली के लोकेशन देखाव हिमाचल आ भारत के नक्शा | pushpin_label_position = right | coordinates = {{coord|32.243177|N|77.189246|E|display=inline, title}} | pushpin_map = India Himachal Pradesh#India | native_name_lang = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> }} '''मनाली''' ({{Langx|en|Manali}}) जेकरा '''कुल्लू-मनाली''' एक संघहू बोलावल जाला, [[हिमाचल प्रदेश]] के [[कुल्लू जिला]] में स्थित एगो मशहूर पर्वतीय पर्यटन नगर ([[हिल स्टेशन]] आ [[रिसॉर्ट सिटी]]) हवे। ई [[कुल्लू शहर]] के नगीचे, [[ब्यास नदी]] के बनावल [[कुल्लू घाटी]] के उत्तरी माथ पर बसल बा। मनाली, राज्य के राजधानी [[शिमला]] से करीबन {{convert|270|km|mi|abbr=}} उत्तर में आ भारत के राजधानी [[नई दिल्ली]] से लगभग {{Convert|544|km|mi}} उत्तर-पूरुब में पड़े ला। मनाली भारत के सबसे पॉपुलर टूरिस्ट डेस्टिनेशन सभ में से एक हवे। ई [[लाहुल अउरी स्पीति जिला|लाहौल-स्पीति जिला]] आ [[लद्दाख]] के [[लेह]] शहर जाए वाला यात्रियन खातिर हिमालय के दुर्गम हिस्सा में दरवाजा के काम करे ला।<ref name="Gardner1995">''Paper also Presented at the International Seminar on Disasters, Environment and Development, 9-12 December 1994, New Delhi, India'' -by {{cite book|author=James S. Gardner|title=Tourism and Risk from Natural Hazards: Manali, Himachal Pradesh, India |url=https://books.google.com/books?id=NtgsAQAAMAAJ|year=1995|publisher=Natural Resources Institute, University of Manitoba}}</ref> इतिहासिक रूप से, प्राचीन काल (पुराना जमाना) में, मनाली एगो ब्यापारिक मार्ग के शुरुआती पड़ाव भी रहे। ई मार्ग [[लाहुल]] आ लद्दाख से होके [[कराकोरम दर्रा]] पार करत [[चीन]] के [[तारिम बेसिन]] में स्थित [[यारकंद]] आ [[खोतान]] तक जाइल करे। एह रस्ता के जरिये से प्राचीन काल में ब्यापारिक आ सांस्कृतिक संपर्क स्थापित रहत रहे। 2011 के भारत जनगणना के अनुसार, मनाली नगर परिषद क्षेत्र के आबादी 8,096 रहल, जवना में 4,717 पुरुष आ 3,379 महिला शामिल रहली। नाया अनुमानन के हिसाब से 2025 तक नगर के आबादी बढ़ के लगभग 11,700 हो गइल बा।<ref>{{Cite web |title=Manali Municipal Council City Population Census 2011-2025 {{!}} Himachal Pradesh |url=https://www.census2011.co.in/data/town/800100-manali-himachal-pradesh.html |access-date=26 July 2025 |website=www.census2011.co.in}}</ref> {{clear}} == इहो देखल जाय == * [[धर्मशाला, हिमाचल प्रदेश|धर्मशाला]] * [[कुल्लू घाटी]] * [[लेह]] ([[लद्दाख]]) == संदर्भ == {{Reflist|29em}} [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] [[श्रेणी:भारत के हिल स्टेशन]] {{India-geo-stub}} a4ruc48tq7ey4ri1zwhvtthjp95vst4 798676 798673 2026-06-15T10:19:22Z SM7 3953 सुधार कइल गइल, संदर्भ जोड़ल/सुधारल गइल, बाहरी कड़ी जोड़ल गइल 798676 wikitext text/x-wiki {{Infobox settlement | name = मनाली | settlement_type = ([[हिल स्टेशन]] आ [[रिसॉर्ट टाउन]]) | image_skyline = {{multiple image | border = infobox | total_width = 290 | image_style = | perrow = 1/2/2/1 |image1= Manali City.jpg |image2=Mall Road, Manali.jpg |image3= Dhauladhar view on the way to solang valley.jpg |image4=Beautiful River valley.jpg |image5=Mountains, Manali, Himachal Pradesh.jpg |image6= Manali in winters.png }} | image_caption = '''''ऊपर से घड़ी के सुई के दिसा में:''''' मनाली के हवाई व्यू, धौलाधार व्यू, मनाली के परबत श्रेणी, बर्फ़बारी के बाद मनाली, मनाली में नदी, [[माल रोड, मनाली|माल रोड]] | subdivision_name2 = [[कुल्लू जिला|कुल्लू]] | established_title = <!-- Established --> | established_date = | founder = | named_for = ''[[मनु (हिंदू धर्म)|मनु]]'' | government_type = | governing_body = | unit_pref = Metric | area_footnotes = | area_rank = | area_total_km2 = | elevation_footnotes = | elevation_m = 2050 | population_total = 8096<ref name="pop">{{Cite web|url=http://www.citypopulation.de/php/india-himachalpradesh.php?cityid=0240401000|title= Manali (Kullu, Himachal Pradesh, India) - population statistics, map, and location|access-date=1 August 2014}}</ref> | population_as_of = [[भारत के जनगणना, 2011|2011]] | population_rank = 22<sup>वाँ</sup> (राज्यन में) | population_density_km2 = auto | population_footnotes = | demographics_type1 = भाषा | demographics1_title1 = ऑफिशियल | demographics1_info1 = [[हिंदी भाषा|हिंदी]] | demographics1_title2 = क्षेत्रीय | demographics1_info2 = [[कुल्लुई पहाड़ी भाषा]]<ref>{{cite web| website=Literary Herald |title=Language and dialect of Himachal Pradesh |url=https://tlhjournal.com/uploads/products/35.shradha-shandil-article.pdf?utm_}}</ref> | timezone1 = [[भारतीय मानक समय|IST]] | utc_offset1 = +5:30 | postal_code_type = [[पिनकोड]] | postal_code = 175131 | area_code_type = फोन कोड | area_code = +911902 | registration_plate = HP-58 | website = | footnotes = | subdivision_name = {{flag|भारत}} | native_name = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> | subdivision_type2 = [[भारत के जिला|जिला]] | subdivision_name1 = [[हिमाचल प्रदेश]] | subdivision_type1 = [[भारत के राज्य|राज्य]] | pushpin_label = मनाली | subdivision_type = [[देश]] | pushpin_map_alt = मनाली के लोकेशन देखाव हिमाचल आ भारत के नक्शा | pushpin_label_position = right | coordinates = {{coord|32.243177|N|77.189246|E|display=inline, title}} | pushpin_map = India Himachal Pradesh#India | native_name_lang = <!-- DO NOT FILL FIELD AS PER WP:INDICSCRIPTS POLICY --> }} '''मनाली''' ({{Langx|en|Manali}}) जेकरा '''कुल्लू-मनाली''' एक संघहू बोलावल जाला, [[हिमाचल प्रदेश]] के [[कुल्लू जिला]] में स्थित एगो मशहूर पर्वतीय पर्यटन नगर ([[हिल स्टेशन]] आ [[रिसॉर्ट सिटी]]) हवे। ई [[कुल्लू शहर]] के नगीचे, [[ब्यास नदी]] के बनावल [[कुल्लू घाटी]] के उत्तरी माथ पर बसल बा। मनाली, राज्य के राजधानी [[शिमला]] से करीबन {{convert|270|km|mi|abbr=}} उत्तर में आ भारत के राजधानी [[नई दिल्ली]] से लगभग {{Convert|544|km|mi}} उत्तर-पूरुब में पड़े ला। मनाली भारत के सबसे पॉपुलर टूरिस्ट डेस्टिनेशन सभ में से एक हवे। ई [[लाहुल अउरी स्पीति जिला|लाहौल-स्पीति जिला]] आ [[लद्दाख]] के [[लेह]] शहर जाए वाला यात्रियन खातिर हिमालय के दुर्गम हिस्सा में दरवाजा के काम करे ला।<ref name="Gardner1995">''Paper also Presented at the International Seminar on Disasters, Environment and Development, 9-12 December 1994, New Delhi, India'' -by {{cite book|author=James S. Gardner|title=Tourism and Risk from Natural Hazards: Manali, Himachal Pradesh, India |url=https://books.google.com/books?id=NtgsAQAAMAAJ|year=1995|publisher=Natural Resources Institute, University of Manitoba}}</ref> इतिहासिक रूप से, प्राचीन काल (पुराना जमाना) में, मनाली एगो ब्यापारिक मार्ग के शुरुआती पड़ाव भी रहे। ई मार्ग [[लाहुल]] आ लद्दाख से होके [[कराकोरम दर्रा]] पार करत [[चीन]] के [[तारिम बेसिन]] में स्थित [[यारकंद]] आ [[खोतान]] तक जाइल करे। एह रस्ता के जरिये से प्राचीन काल में ब्यापारिक आ सांस्कृतिक संपर्क स्थापित रहत रहे। 2011 के भारत जनगणना के अनुसार, मनाली नगर परिषद क्षेत्र के आबादी 8,096 रहल, जवना में 4,717 पुरुष आ 3,379 महिला शामिल रहली। नाया अनुमानन के हिसाब से 2025 तक नगर के आबादी बढ़ के लगभग 11,700 हो गइल बा।<ref>{{Cite web |title=Manali Municipal Council City Population Census 2011-2025 {{!}} Himachal Pradesh |url=https://www.census2011.co.in/data/town/800100-manali-himachal-pradesh.html |access-date=26 July 2025 |website=www.census2011.co.in}}</ref> == ट्रैफिक जाम == हाल के सालन में, गर्मी के सीजन में, उत्तर भारत के अउरी कई पहाड़ी [[टूरिस्ट सिटी]] सभ के नियन मनालियो में भारी ट्रैफिक जाम एगो समस्या के रूप ले लिहले बाटे। उत्तर भारत के मैदानी इलाका के लोग — जइसे कि [[दिल्ली]], हरियाणा आ पच्छिमी उत्तर प्रदेश के लोग — पहाड़न पर एह सीजन में टूट पड़े ला आ एह हिल स्टेशन सभ ले पहुँचे वाला रस्ता पर भारी जाम लाग जाला। कई बेर ई जाम 10 किमी से बेसी लमहर हो जाला। गलत तरीका से ओभरटेक कइल<ref>{{cite news |title=मनाली हाईवे पर लगा 10 KM लंबा ट्रैफिक जाम, एरियल व्यू में दिखे बेहद खराब हालात; आखिर क्यों थम गई पर्यटकों की गाड़ियां? - manali highway 10km traffic jam tourists stuck in himachal |url=https://www.jagran.com/himachal-pradesh/mandi-manali-highway-10km-traffic-jam-tourists-stuck-in-himachal-40272025.html |access-date=15 जून 2026 |work=[[दैनिक जागरण]] |date=13 जून 2026 |language=hi}}</ref> आ ट्रैफिक नियम के उलंघनो एह जाम लागे के प्रमुख कारन बाड़ें। {{clear}} == इहो देखल जाय == * [[धर्मशाला, हिमाचल प्रदेश|धर्मशाला]] * [[कुल्लू घाटी]] * [[लेह]] ([[लद्दाख]]) == संदर्भ == {{Reflist|29em}} == बाहरी कड़ी == * [https://hpkullu.nic.in/hi/tourist-place/%E0%A4%B9%E0%A5%80%E0%A4%B0%E0%A4%BE%E0%A4%AA%E0%A5%81%E0%A4%B0/ सरकारी वेबसाइट] [[श्रेणी:हिमाचल प्रदेश के शहर आ कस्बा]] [[श्रेणी:भारत के हिल स्टेशन]] {{India-geo-stub}} 3h3npxgb9b7z1z79hqh8w73knzui3xe Module:Infobox dim 828 101053 798619 2024-10-03T14:27:43Z en>Hike395 0 stash temp code 798619 Scribunto text/plain --[[ geohackTypeToScale Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> ]] local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end --[[ geohackTypeToScale Convert from Geohack's types to Geohack's scale levels ]] local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end nzerdd9orhprr3izfchgmxo5rkpzaxa 798620 798619 2024-10-03T14:46:40Z en>Hike395 0 implement Template:Infobox dim 798620 Scribunto text/plain --[[ geohackTypeToScale Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> ]] local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end --[[ geohackTypeToScale Convert from Geohack's types to Geohack's scale levels ]] local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for arg, _ in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = tonumber(args[arg]) end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 return computeDim(length, width, area) end 033sw0fe2eopt1ogpry0fbsl4jyh4kn 798621 798620 2024-10-03T14:53:57Z en>Hike395 0 protect against negative values 798621 Scribunto text/plain --[[ geohackTypeToScale Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> ]] local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end --[[ geohackTypeToScale Convert from Geohack's types to Geohack's scale levels ]] local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for arg, _ in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 return computeDim(length, width, area) end n04lkhqyb5sujk634tiwodwvf6pwitn 798622 798621 2024-10-04T03:27:29Z en>Hike395 0 expand 798622 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for arg, _ in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim and math.floor(dim+0.5) end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) return dim and tostring(dim)..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) if scale then return scale end end dim = convertDim(args) if dim then return geohackDimToScale(dim, 'km') end return args.type and geohackTypeToScale(args.type, args.population) end function p._zoom(args) local scale = p._scale(args) return scale and geohackScaleToMapZoom(scale) end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p 7y2ufd4ubxtnfgmhuy8c611d6ilw26j 798623 798622 2024-10-04T03:38:05Z en>Hike395 0 Hike395 moved page [[Module:Sandbox/Hike395/Infobox dim]] to [[Module:Infobox dim]]: move out of sandbox 798622 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for arg, _ in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim and math.floor(dim+0.5) end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) return dim and tostring(dim)..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) if scale then return scale end end dim = convertDim(args) if dim then return geohackDimToScale(dim, 'km') end return args.type and geohackTypeToScale(args.type, args.population) end function p._zoom(args) local scale = p._scale(args) return scale and geohackScaleToMapZoom(scale) end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p 7y2ufd4ubxtnfgmhuy8c611d6ilw26j 798624 798623 2024-10-04T03:44:36Z en>Hike395 0 strip commas 798624 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for arg, _ in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim and math.floor(dim+0.5) end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) return dim and tostring(dim)..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) if scale then return scale end end dim = convertDim(args) if dim then return geohackDimToScale(dim, 'km') end return args.type and geohackTypeToScale(args.type, args.population) end function p._zoom(args) local scale = p._scale(args) return scale and geohackScaleToMapZoom(scale) end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p mdypgqzea6qw7mte9yiot0jpryyhpji 798625 798624 2024-10-04T03:46:00Z en>Hike395 0 protect against nil 798625 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for arg, _ in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim and math.floor(dim+0.5) end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) return dim and tostring(dim)..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) if scale then return scale end end dim = convertDim(args) if dim then return geohackDimToScale(dim, 'km') end return args.type and geohackTypeToScale(args.type, args.population) end function p._zoom(args) local scale = p._scale(args) return scale and geohackScaleToMapZoom(scale) end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p 1oxlqysd9vhq2avz5cjrvsmvjdjbb5w 798626 798625 2024-10-04T03:52:20Z en>Hike395 0 fix bug 798626 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim and math.floor(dim+0.5) end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) return dim and tostring(dim)..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) if scale then return scale end end dim = convertDim(args) if dim then return geohackDimToScale(dim, 'km') end return args.type and geohackTypeToScale(args.type, args.population) end function p._zoom(args) local scale = p._scale(args) return scale and geohackScaleToMapZoom(scale) end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p hn3ro5uarr4r6vqur7uxx0060vo70c6 798627 798626 2024-10-04T04:17:10Z en>Hike395 0 rounding scale 798627 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim and math.floor(dim+0.5) end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) return dim and tostring(dim)..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) return scale and geohackScaleToMapZoom(scale) end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p nnwpeq7kg1nn3qx1mv1nqld3s4omnsc 798628 798627 2024-10-04T04:33:41Z en>Hike395 0 add code to convert from scale to dim 798628 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return 0.8/ppm * scale end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args.type, args.population) dim = geohackScaleToDim(scale) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) return scale and geohackScaleToMapZoom(scale) end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p 2ocmyf06gbasvuj83iq46wgv1nzv4zt 798629 798628 2024-10-04T10:40:26Z en>Hike395 0 round zoom 798629 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return 0.8/ppm * scale end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args.type, args.population) dim = geohackScaleToDim(scale) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) if scale then zoom = geohackScaleToMapZoom(scale) end return zoom and math.floor(zoom+0.5) end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p 0q3sc9cl77dsmi6pslzcsj41ywvaewu 798630 798629 2024-10-04T10:57:33Z en>Hike395 0 require strict 798630 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return 0.8/ppm * scale end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args.type, args.population) dim = geohackScaleToDim(scale) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom+0.5) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) end function p.scale(frame) return p._scale(getArgs(frame)) end function p.zoom(frame) return p._scale(getArgs(frame)) end return p lnepbv50kz78tbqpzz852ytz7tmp11q 798631 798630 2024-10-04T12:17:29Z en>Hike395 0 return empty string rather than nil 798631 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return 0.8/ppm * scale end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.609*args.length_mi or args.length_km local width = args.width_mi and 1.609*args.width_mi or args.width_km local area = args.area_acre and 0.004047*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.59*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args.type, args.population) dim = geohackScaleToDim(scale) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom+0.5) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._scale(getArgs(frame)) or '' end return p 23mb2bccruekz6qo50nl70lh66w76bl 798632 798631 2024-10-04T12:44:48Z en>Hike395 0 add more resolution to unit conversions 798632 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return 0.8/ppm * scale end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args.type, args.population) dim = geohackScaleToDim(scale) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom+0.5) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._scale(getArgs(frame)) or '' end return p 16unflsxn3tdkjxii62unzxps9wkvqi 798633 798632 2024-10-04T12:53:11Z en>Hike395 0 wrong function 798633 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- Using 0.3 mm/pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels, and -- assuming dim spans a map width of 800px (= 24cm on screen) return ppm/800 * dim end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return 0.8/ppm * scale end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, airport = 30000, city = 100000, country = 10000000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, isle = 100000, landmark = 10000, mountain = 100000, pass = 10000, railwaystation = 10000, river = 100000, satellite = 10000000, waterbody = 100000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args.type, args.population) dim = geohackScaleToDim(scale) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom+0.5) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p ao36um2wp7rbkeezp8c31xjw43ib260 798634 798633 2024-10-05T04:31:11Z en>Hike395 0 update dim/scale conversion, add types 798634 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- geohack assumes a map width of 10cm on the screen -- which seems nuts, but we have to be compatible -- thus, dim has to correspond to 10cm, so scale is dim (in meters) * 10 return 10 * dim end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return scale * 1e-3 end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { country = 10000000, satellite = 10000000, state = 3000000, adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, city = 100000, isle = 100000, mountain = 100000, river = 100000, waterbody = 100000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, airport = 30000, landmark = 10000, railwaystation = 10000, edu = 10000, pass = 10000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args.type, args.population) dim = geohackScaleToDim(scale) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom+0.5) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p 3etm4h8rjwoadakwpy2fjhk7p3zwr4o 798635 798634 2024-10-05T04:37:58Z en>Hike395 0 typo 798635 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, units) dim = tonumber(dim) if not dim or dim <= 0 then return end if units and string.lower(units) == 'km' then dim = dim*1000 end -- geohack assumes a map width of 10cm on the screen -- which seems nuts, but we have to be compatible -- thus, dim has to correspond to 10cm, so scale is dim (in meters) * 10 return 10 * dim end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return scale * 1e-4 end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(type, population) local typeScale = { country = 10000000, satellite = 10000000, state = 3000000, adm1st = 1000000, adm2nd = 300000, adm3rd = 100000, city = 100000, isle = 100000, mountain = 100000, river = 100000, waterbody = 100000, edu = 10000, event = 50000, forest = 50000, glacier = 50000, airport = 30000, landmark = 10000, railwaystation = 10000, edu = 10000, pass = 10000, camera = 10000 } local scale if typeScale[type] then scale = typeScale[type] end population = tonumber(population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args.type, args.population) dim = geohackScaleToDim(scale) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") scale = geohackDimToScale(dim, units) end if not scale then dim = convertDim(args) scale = dim and geohackDimToScale(dim, 'km') end if args.type and not scale then scale = geohackTypeToScale(args.type, args.population) end return scale and math.floor(scale+0.5) end function p._zoom(args) local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom+0.5) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p 3bf4vdafkj0jnv23elaqrtk4nx7ekwr 798636 798635 2024-10-05T17:12:12Z en>Hike395 0 implement viewport handling, implement scale bounds, stash lookup table in data file 798636 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end -- geohack assumes a map width of 10cm on the screen, so use this as default local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or 0.1 return dim / viewport end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or 0.1 return scale * viewport * 1e-3 end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(args) args = args or {} local type = args.type local typeScale = mw.loadData('Module:Infobox_dim/data') local scale if typeScale[type] then scale = typeScale[type] end local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam, args) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args) dim = geohackScaleToDim(scale, args) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end if args.type and not scale then args.units = '' scale = geohackTypeToScale(args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom+0.5) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p akhh6rf922ahornfuy5o8bcqwc4igr7 798637 798636 2024-10-05T18:00:39Z en>MusikBot II 0 Protected "[[Module:Infobox dim]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 6988 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) 798636 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end -- geohack assumes a map width of 10cm on the screen, so use this as default local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or 0.1 return dim / viewport end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or 0.1 return scale * viewport * 1e-3 end -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToScale(args) args = args or {} local type = args.type local typeScale = mw.loadData('Module:Infobox_dim/data') local scale if typeScale[type] then scale = typeScale[type] end local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters local diam = 35.68*math.sqrt(population) -- convert to scale scale = geohackDimToScale(diam, args) -- don't zoom in too far if scale < 25000 then scale = 25000 end end return scale end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return 0.5*math.max(length,width) end if length then return 0.5*length end if width then return 0.5*width end if area then return 0.977*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end local dim = convertDim(args) if not dim then local scale = args.scale or geohackTypeToScale(args) dim = geohackScaleToDim(scale, args) end return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end if args.type and not scale then args.units = '' scale = geohackTypeToScale(args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom+0.5) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p akhh6rf922ahornfuy5o8bcqwc4igr7 798638 798637 2024-10-07T01:21:07Z en>Hike395 0 improve results by considering different output image sizes 798638 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return dim / viewport end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return scale * viewport * 1e-3 end local oddShape = 1.954 -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToDim(args) args = args or {} local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/sandbox/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p 4rlwvhyc735i3gmx8tbrulz9n7km9h1 798639 798638 2024-10-07T01:22:17Z en>Hike395 0 use main data 798639 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return dim / viewport end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return scale * viewport * 1e-3 end local oddShape = 1.954 -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToDim(args) args = args or {} local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p r1hgub5dxzd27aaej7snn0ss0851t47 798640 798639 2024-10-07T02:53:38Z en>Hike395 0 use round oddShape value 798640 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return dim / viewport end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return scale * viewport * 1e-3 end local oddShape = 2.0 -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToDim(args) args = args or {} local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p hcul5rscyacynrw5jxrw0h02da4p0vh 798641 798640 2024-10-07T03:40:33Z en>Hike395 0 choose an example (Boston) to set oddShape tweak factor 798641 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end -- Approximation of https://wiki.openstreetmap.org/wiki/Zoom_levels -- pixel/m from OSM is exact, so use zoom level 9 and 0.3 mm/pixel return math.log(305.748*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return dim / viewport end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return scale * viewport * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToDim(args) args = args or {} local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p 4slfn6ahn643b1tj9fteasjnseqlq72 798642 798641 2024-10-07T16:09:20Z en>Hike395 0 make zoom correct at 30N rather than on equator 798642 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 30N, cos(30 degrees) = sqrt(3)/2 local metersPerPixelLevel9 = 305.748*math.sqrt(3)/2 -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return dim / viewport end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end local viewport = args.viewport_cm and args.viewport_cm / 100 or args.viewport_px and args.viewport_px / ppm or args.default_viewport return scale * viewport * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToDim(args) args = args or {} local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p j3uz3hh524lj92o5nwlvf0k6uientsf 798643 798642 2024-10-08T00:52:12Z en>Hike395 0 correct handle viewport strings 798643 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 30N, cos(30 degrees) = sqrt(3)/2 local metersPerPixelLevel9 = 305.748*math.sqrt(3)/2 -- Convert from Geohack's scale and dim levels to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack's scale levels local function geohackTypeToDim(args) args = args or {} local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim level local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p g8sm3x8pa3h00mzs7mqk6vywi0yjstk 798644 798643 2024-10-23T15:16:48Z en>Hike395 0 add more comments 798644 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 30N, cos(30 degrees) = sqrt(3)/2 local metersPerPixelLevel9 = 305.748*math.sqrt(3)/2 -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) args = args or {} local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) for _, arg in pairs({'length_mi','length_km','width_mi','width_km', 'area_mi2','area_km2','area_acre','area_ha'}) do args[arg] = args[arg] and mw.ustring.gsub(args[arg],",","") args[arg] = tonumber(args[arg]) if args[arg] and args[arg] <= 0 then args[arg] = nil end end local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end -- Module entry points function p._dim(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end function p._zoom(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = p._scale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p b2gqt3jvb5o4hia47cvq0cxegb9xuc6 798645 798644 2024-11-04T14:01:26Z en>Hike395 0 check arguments more thoroughly 798645 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 30N, cos(30 degrees) = sqrt(3)/2 local metersPerPixelLevel9 = 305.748*math.sqrt(3)/2 -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end local positiveNumericArgs = {viewport_cm=true,viewport_px=true,length_mi=true,length_km=true, width_mi=true,width_km=true,area_mi2=true,area_km2=true, area_acre=true,area_ha=true,scale=true,population=true} local function cleanArgs(args) local clean = {} if type(args) == 'table' then for k, v in pairs(args) do if positiveNumericArgs[k] then v = v and mw.ustring.gsub(v,",","") -- clean out any commas v = tonumber(v) -- ensure argument is numeric if v and v <= 0 then -- if non-positive, ignore value v = nil end end clean[k] = v end end return clean end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/sandbox/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end local function computeScale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end -- Module entry points function p._dim(args) args = cleanArgs(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) args = cleanArgs(args) return computeScale(args) end function p._zoom(args) args = cleanArgs(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = computeScale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p p2wn97rkfnlj8g1ukjo4dnzvgsn0oyx 798646 798645 2025-01-06T15:02:33Z en>Hike395 0 load main data, not sandbox 798646 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 30N, cos(30 degrees) = sqrt(3)/2 local metersPerPixelLevel9 = 305.748*math.sqrt(3)/2 -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end local positiveNumericArgs = {viewport_cm=true,viewport_px=true,length_mi=true,length_km=true, width_mi=true,width_km=true,area_mi2=true,area_km2=true, area_acre=true,area_ha=true,scale=true,population=true} local function cleanArgs(args) local clean = {} if type(args) == 'table' then for k, v in pairs(args) do if positiveNumericArgs[k] then v = v and mw.ustring.gsub(v,",","") -- clean out any commas v = tonumber(v) -- ensure argument is numeric if v and v <= 0 then -- if non-positive, ignore value v = nil end end clean[k] = v end end return clean end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end local function computeScale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end -- Module entry points function p._dim(args) args = cleanArgs(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) args = cleanArgs(args) return computeScale(args) end function p._zoom(args) args = cleanArgs(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = computeScale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p isjvc9guc5xa38gjvtgjvu77mrfk6uj 798647 798646 2025-01-06T15:13:30Z en>Hike395 0 move code 798647 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 30N, cos(30 degrees) = sqrt(3)/2 local metersPerPixelLevel9 = 305.748*math.sqrt(3)/2 -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) local type = args.type local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[type] local population = tonumber(args.population) if type == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by 1.954 to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end local function computeScale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end -- Argument checking local positiveNumericArgs = {viewport_cm=true,viewport_px=true,length_mi=true,length_km=true, width_mi=true,width_km=true,area_mi2=true,area_km2=true, area_acre=true,area_ha=true,scale=true,population=true} local function cleanArgs(args) local clean = {} if type(args) == 'table' then for k, v in pairs(args) do if positiveNumericArgs[k] then v = v and mw.ustring.gsub(v,",","") -- clean out any commas v = tonumber(v) -- ensure argument is numeric if v and v <= 0 then -- if non-positive, ignore value v = nil end end clean[k] = v end end return clean end -- Module entry points function p._dim(args) args = cleanArgs(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) args = cleanArgs(args) return computeScale(args) end function p._zoom(args) args = cleanArgs(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = computeScale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p 3h9akpwlw9uyhrn90tk9hd8jq2dq5nt 798648 798647 2025-01-07T06:07:16Z en>Hike395 0 bail early from geohackTypeToDim 798648 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 30N, cos(30 degrees) = sqrt(3)/2 local metersPerPixelLevel9 = 305.748*math.sqrt(3)/2 -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) local t = args.type if not t then return end local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[t] local population = tonumber(args.population) if t == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by oddShape to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end local function computeScale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds if scale < 2000 then scale = 2000 end if scale > 250e6 then scale = 250e6 end return scale end -- Argument checking local positiveNumericArgs = {viewport_cm=true,viewport_px=true,length_mi=true,length_km=true, width_mi=true,width_km=true,area_mi2=true,area_km2=true, area_acre=true,area_ha=true,scale=true,population=true} local function cleanArgs(args) local clean = {} if type(args) == 'table' then for k, v in pairs(args) do if positiveNumericArgs[k] then v = v and mw.ustring.gsub(v,",","") -- clean out any commas v = tonumber(v) -- ensure argument is numeric if v and v <= 0 then -- if non-positive, ignore value v = nil end end clean[k] = v end end return clean end -- Module entry points function p._dim(args) args = cleanArgs(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) args = cleanArgs(args) return computeScale(args) end function p._zoom(args) args = cleanArgs(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = computeScale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p rjn8aelf5xgzxgdtmwsgv3cuyeqzg98 798649 798648 2025-04-22T10:54:25Z en>Hike395 0 adjust scale safety levels to match integer OSM zoom levels 798649 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 30N, cos(30 degrees) = sqrt(3)/2 local metersPerPixelLevel9 = 305.748*math.sqrt(3)/2 -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) local t = args.type if not t then return end local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[t] local population = tonumber(args.population) if t == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by oddShape to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end local function computeScale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds (OSM zoom levels 1-17) if scale < 1800 then scale = 1800 end if scale > 225e6 then scale = 225e6 end return scale end -- Argument checking local positiveNumericArgs = {viewport_cm=true,viewport_px=true,length_mi=true,length_km=true, width_mi=true,width_km=true,area_mi2=true,area_km2=true, area_acre=true,area_ha=true,scale=true,population=true} local function cleanArgs(args) local clean = {} if type(args) == 'table' then for k, v in pairs(args) do if positiveNumericArgs[k] then v = v and mw.ustring.gsub(v,",","") -- clean out any commas v = tonumber(v) -- ensure argument is numeric if v and v <= 0 then -- if non-positive, ignore value v = nil end end clean[k] = v end end return clean end -- Module entry points function p._dim(args) args = cleanArgs(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) args = cleanArgs(args) return computeScale(args) end function p._zoom(args) args = cleanArgs(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = computeScale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p cepe5373z8kkmg2ls8qmuxsmiet3956 798650 798649 2025-04-23T14:54:16Z en>Hike395 0 update latitude where zoom is correct to be closer to NA and Europe articles 798650 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we don't have easy access to) -- Instead, we'll be correct at 38 degrees N, given en-WP bias towards NA and Europe -- 38N was chosen because: -- * It's the furthest north where scale=100000 maps to zoom=12 -- * One hemisphere (20000km) maps to zoom=1 local metersPerPixelLevel9 = 305.748*math.cos(math.rad(38)) -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale) scale = tonumber(scale) if not scale or scale <= 0 then return end return math.log(metersPerPixelLevel9*ppm/scale)/log2 + 9 end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) local t = args.type if not t then return end local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[t] local population = tonumber(args.population) if t == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by oddShape to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end local function computeScale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds (OSM zoom levels 1-17) if scale < 1600 then scale = 1600 end if scale > 200e6 then scale = 200e6 end return scale end -- Argument checking local positiveNumericArgs = {viewport_cm=true,viewport_px=true,length_mi=true,length_km=true, width_mi=true,width_km=true,area_mi2=true,area_km2=true, area_acre=true,area_ha=true,scale=true,population=true} local function cleanArgs(args) local clean = {} if type(args) == 'table' then for k, v in pairs(args) do if positiveNumericArgs[k] then v = v and mw.ustring.gsub(v,",","") -- clean out any commas v = tonumber(v) -- ensure argument is numeric if v and v <= 0 then -- if non-positive, ignore value v = nil end end clean[k] = v end end return clean end -- Module entry points function p._dim(args) args = cleanArgs(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) args = cleanArgs(args) return computeScale(args) end function p._zoom(args) args = cleanArgs(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = computeScale(args) if scale then local zoom = geohackScaleToMapZoom(scale) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p ts17yich8sghf9o75gm8xhh02xw9ivi 798651 798650 2025-11-15T18:59:08Z en>Hike395 0 allow zoom computation to accept latitude 798651 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we usually don't have easy access to) -- Instead, we'll be correct at 38 degrees N, given en-WP bias towards NA and Europe -- 38N was chosen because: -- * It's the furthest north where scale=100000 maps to zoom=12 -- * One hemisphere (20000km) maps to zoom=1 local mppl9Equator = 305.748 -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale,latitude) scale = tonumber(scale) if not scale or scale <= 0 then return end latitude = latitude or 38 local mppl9 = mppl9Equator*math.cos(math.rad(latitude)) return math.log(mppl9*ppm/scale)/log2 + 9 end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) local t = args.type if not t then return end local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[t] local population = tonumber(args.population) if t == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by oddShape to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end local function computeScale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds (OSM zoom levels 1-17) if scale < 1600 then scale = 1600 end if scale > 200e6 then scale = 200e6 end return scale end -- Argument checking local positiveNumericArgs = {viewport_cm=true,viewport_px=true,length_mi=true,length_km=true, width_mi=true,width_km=true,area_mi2=true,area_km2=true, area_acre=true,area_ha=true,scale=true,population=true} local function cleanArgs(args) local clean = {} if type(args) == 'table' then for k, v in pairs(args) do if positiveNumericArgs[k] then v = v and mw.ustring.gsub(v,",","") -- clean out any commas v = tonumber(v) -- ensure argument is numeric if v and v <= 0 then -- if non-positive, ignore value v = nil end end clean[k] = v end end return clean end -- Module entry points function p._dim(args) args = cleanArgs(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) args = cleanArgs(args) return computeScale(args) end function p._zoom(args) args = cleanArgs(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = computeScale(args) if scale then local latitude = tonumber(args.latitude) latitude = latitude and (latitude > 70 and 70 or latitude < -70 and -70 or latitude) local zoom = geohackScaleToMapZoom(scale,latitude) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p jy5fyn8gcmhd8ajqw0ljt5qgmzyo4hz 798652 798651 2026-06-14T15:10:03Z SM7 3953 33 revisions imported from [[:en:Module:Infobox_dim]] 798651 Scribunto text/plain require('strict') local getArgs = require('Module:Arguments').getArgs local p = {} local log2 = 0.693147181 local ppm = 1000/0.3 -- pixels per meter, from 0.3 mm / pixel from https://wiki.openstreetmap.org/wiki/Zoom_levels -- To convert to OSM zoom level, we need to know meters per pixel at zoom level 9 -- On the equator, it's 305.748 meters/pixel according to https://wiki.openstreetmap.org/wiki/Zoom_levels -- This quantity depends on the latitude (which we usually don't have easy access to) -- Instead, we'll be correct at 38 degrees N, given en-WP bias towards NA and Europe -- 38N was chosen because: -- * It's the furthest north where scale=100000 maps to zoom=12 -- * One hemisphere (20000km) maps to zoom=1 local mppl9Equator = 305.748 -- Convert from Geohack's scale to OSM style zoom levels as used by <maplink> local function geohackScaleToMapZoom(scale,latitude) scale = tonumber(scale) if not scale or scale <= 0 then return end latitude = latitude or 38 local mppl9 = mppl9Equator*math.cos(math.rad(latitude)) return math.log(mppl9*ppm/scale)/log2 + 9 end -- compute the viewport size (on screen) in meters, assuming ppm pixels per meter on screen local function computeViewport(args) local viewport_cm = tonumber(args.viewport_cm) local viewport_px = tonumber(args.viewport_px) return viewport_cm and viewport_cm / 100 or viewport_px and viewport_px / ppm or tonumber(args.default_viewport) or 0.1 end -- convert from geohack dim (knowing the viewpoint size on screen) to geohack scale local function geohackDimToScale(dim, args) dim = tonumber(dim) args = args or {} if not dim or dim <= 0 then return end local units = args.units if units and string.lower(units) == 'km' then dim = dim*1000 end return dim / computeViewport(args) end -- inverse of above function, returning dim in km local function geohackScaleToDim(scale, args) scale = tonumber(scale) args = args or {} if not scale or scale <= 0 then return end return scale * computeViewport(args) * 1e-3 end local oddShape = 2.09 --- length/sqrt(area) of Boston (to choose an example) -- Convert from Geohack's types to Geohack dim local function geohackTypeToDim(args) local t = args.type if not t then return end local typeDim = mw.loadData('Module:Infobox_dim/data') local dim = typeDim[t] local population = tonumber(args.population) if t == 'city' and population and population > 0 then -- assume city is a circle with density of 1000/square kilometer -- compute diameter, in meters. Then multiply by oddShape to account for weird shapes dim = 35.68e-3*math.sqrt(population)*oddShape -- don't zoom in too far if dim < 5 then dim = 5 end end return dim end -- Convert from dimension of object to Geohack dim local function computeDim(length,width,area) if length and width then return math.max(length,width) end if length then return length end if width then return width end if area then return oddShape*math.sqrt(area) end end -- compute geohack dim from unit arguments (e.g., length_mi) local function convertDim(args) local length = args.length_mi and 1.60934*args.length_mi or args.length_km local width = args.width_mi and 1.60934*args.width_mi or args.width_km local area = args.area_acre and 0.00404686*args.area_acre or args.area_ha and 0.01*args.area_ha or args.area_mi2 and 2.58999*args.area_mi2 or args.area_km2 local dim = computeDim(length, width, area) return dim end local function computeScale(args) if args.scale then return args.scale end local dim, units, scale if args.dim then dim, units = mw.ustring.match(args.dim,"^([-%d%.]+)%s*(%D*)") args.units = units args.default_viewport = 0.1 -- default geohack viewpoirt scale = geohackDimToScale(dim, args) end if not scale then dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' args.default_viewport = 0.2 --- when object dimensions or type is specified, assume 20cm viewport scale = dim and geohackDimToScale(dim, args) end if not scale then return end scale = math.floor(scale+0.5) -- keep scale within sane bounds (OSM zoom levels 1-17) if scale < 1600 then scale = 1600 end if scale > 200e6 then scale = 200e6 end return scale end -- Argument checking local positiveNumericArgs = {viewport_cm=true,viewport_px=true,length_mi=true,length_km=true, width_mi=true,width_km=true,area_mi2=true,area_km2=true, area_acre=true,area_ha=true,scale=true,population=true} local function cleanArgs(args) local clean = {} if type(args) == 'table' then for k, v in pairs(args) do if positiveNumericArgs[k] then v = v and mw.ustring.gsub(v,",","") -- clean out any commas v = tonumber(v) -- ensure argument is numeric if v and v <= 0 then -- if non-positive, ignore value v = nil end end clean[k] = v end end return clean end -- Module entry points function p._dim(args) args = cleanArgs(args) if args.dim then return args.dim end -- compute scale for geohack local scale = args.scale local dim if not scale then args.default_viewport = 0.2 -- when specifying a object dimension or type, assume output spans 20cm dim = convertDim(args) or geohackTypeToDim(args) args.units = 'km' scale = dim and geohackDimToScale(dim, args) end -- reset back to 10cm viewport for correct geohack dim output args.viewport_cm = 10 dim = scale and geohackScaleToDim(scale, args) return dim and tostring(math.floor(dim+0.5))..'km' end function p._scale(args) args = cleanArgs(args) return computeScale(args) end function p._zoom(args) args = cleanArgs(args) args.viewport_px = args.viewport_px or 200 --- viewport for Kartographer is 200px high local scale = computeScale(args) if scale then local latitude = tonumber(args.latitude) latitude = latitude and (latitude > 70 and 70 or latitude < -70 and -70 or latitude) local zoom = geohackScaleToMapZoom(scale,latitude) return zoom and math.floor(zoom) end end -- Template entry points function p.dim(frame) return p._dim(getArgs(frame)) or '' end function p.scale(frame) return p._scale(getArgs(frame)) or '' end function p.zoom(frame) return p._zoom(getArgs(frame)) or '' end return p jy5fyn8gcmhd8ajqw0ljt5qgmzyo4hz Module:Infobox dim/doc 828 101054 798653 2024-10-04T12:11:11Z en>Hike395 0 create doc 798653 wikitext text/x-wiki {{Module rating|beta}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Code to convert information about physical size of objects into parameters for geohack or mapframes. The following parameters describe the physical object size: {{div col|colwidth=15em}} * length_km * length_mi * width_km * width_mi * area_km2 * area_mi2 * area_ha * area_acre {{div col end}} In addition, the module can accept and convert between geohack parameters: * dim * scale * type (e.g., "mountain" or "city") * population (for type="city" only) == Usage == ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|dim<nowiki>}}</nowiki></code>: Generates dim string (e.g, "24km") suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|scale<nowiki>}}</nowiki></code>: Generates scale (e.g, 100000) suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|zoom<nowiki>}}</nowiki></code>: Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Map formatting and function templates]] <!-- not quite right, we need a category for such modules --> }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude> 1xse4is7ai23fn1jzf4ewe7oepga2er 798654 798653 2024-10-05T02:08:57Z en>Hike395 0 mark as high use 798654 wikitext text/x-wiki {{Module rating|beta}} {{High use}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Code to convert information about physical size of objects into parameters for geohack or mapframes. The following parameters describe the physical object size: {{div col|colwidth=15em}} * length_km * length_mi * width_km * width_mi * area_km2 * area_mi2 * area_ha * area_acre {{div col end}} In addition, the module can accept and convert between geohack parameters: * dim * scale * type (e.g., "mountain" or "city") * population (for type="city" only) == Usage == ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|dim<nowiki>}}</nowiki></code>: Generates dim string (e.g, "24km") suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|scale<nowiki>}}</nowiki></code>: Generates scale (e.g, 100000) suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|zoom<nowiki>}}</nowiki></code>: Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Map formatting and function templates]] <!-- not quite right, we need a category for such modules --> }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude> 2pcxs4ezm746jsh1cswwfdcqfq4s7u0 798655 798654 2024-10-05T17:13:47Z en>Hike395 0 document new functionality 798655 wikitext text/x-wiki {{Module rating|beta}} {{High use}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Code to convert information about physical size of objects into parameters for geohack or mapframes. The following parameters describe the physical object size: {{div col|colwidth=15em}} * length_km * length_mi * width_km * width_mi * area_km2 * area_mi2 * area_ha * area_acre {{div col end}} When producing scale or zoom, module can use size of object on screen specified via {{para|viewport_cm}} or {{param|viewport_px}}. Defaults to 10cm, to match geohack. In addition, the module can accept and convert between geohack parameters: * dim * scale * type (e.g., "mountain" or "city") * population (for type="city" only) == Usage == ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|dim<nowiki>}}</nowiki></code>: Generates dim string (e.g, "24km") suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|scale<nowiki>}}</nowiki></code>: Generates scale (e.g, 100000) suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|zoom<nowiki>}}</nowiki></code>: Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Map formatting and function templates]] <!-- not quite right, we need a category for such modules --> }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude> dph8ym98skejc5j0nrln8uajky5pb6k 798656 798655 2024-10-16T18:33:04Z en>Hike395 0 Typo 798656 wikitext text/x-wiki {{Module rating|beta}} {{High use}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Code to convert information about physical size of objects into parameters for geohack or mapframes. The following parameters describe the physical object size: {{div col|colwidth=15em}} * length_km * length_mi * width_km * width_mi * area_km2 * area_mi2 * area_ha * area_acre {{div col end}} When producing scale or zoom, module can use size of object on screen specified via {{para|viewport_cm}} or {{para|viewport_px}}. Defaults to 10cm, to match geohack. In addition, the module can accept and convert between geohack parameters: * dim * scale * type (e.g., "mountain" or "city") * population (for type="city" only) == Usage == ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|dim<nowiki>}}</nowiki></code>: Generates dim string (e.g, "24km") suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|scale<nowiki>}}</nowiki></code>: Generates scale (e.g, 100000) suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|zoom<nowiki>}}</nowiki></code>: Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Map formatting and function templates]] <!-- not quite right, we need a category for such modules --> }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude> tqzvzxdlksq4g7aqqayn2d0lubd753j 798657 798656 2024-11-04T13:31:10Z en>Hike395 0 upgrade 798657 wikitext text/x-wiki {{Module rating|release}} {{High use}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Code to convert information about physical size of objects into parameters for geohack or mapframes. The following parameters describe the physical object size: {{div col|colwidth=15em}} * length_km * length_mi * width_km * width_mi * area_km2 * area_mi2 * area_ha * area_acre {{div col end}} When producing scale or zoom, module can use size of object on screen specified via {{para|viewport_cm}} or {{para|viewport_px}}. Defaults to 10cm, to match geohack. In addition, the module can accept and convert between geohack parameters: * dim * scale * type (e.g., "mountain" or "city") * population (for type="city" only) == Usage == ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|dim<nowiki>}}</nowiki></code>: Generates dim string (e.g, "24km") suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|scale<nowiki>}}</nowiki></code>: Generates scale (e.g, 100000) suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|zoom<nowiki>}}</nowiki></code>: Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Map formatting and function templates]] <!-- not quite right, we need a category for such modules --> }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude> 27j45v2xw6a7saflf9w55qr2m97kly2 798658 798657 2026-01-24T11:20:49Z en>Rodejong 0 Requires module Arguments 798658 wikitext text/x-wiki {{Module rating|release}} {{High use}} {{LUA|Module:Arguments}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Code to convert information about physical size of objects into parameters for geohack or mapframes. The following parameters describe the physical object size: {{div col|colwidth=15em}} * length_km * length_mi * width_km * width_mi * area_km2 * area_mi2 * area_ha * area_acre {{div col end}} When producing scale or zoom, module can use size of object on screen specified via {{para|viewport_cm}} or {{para|viewport_px}}. Defaults to 10cm, to match geohack. In addition, the module can accept and convert between geohack parameters: * dim * scale * type (e.g., "mountain" or "city") * population (for type="city" only) == Usage == ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|dim<nowiki>}}</nowiki></code>: Generates dim string (e.g, "24km") suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|scale<nowiki>}}</nowiki></code>: Generates scale (e.g, 100000) suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|zoom<nowiki>}}</nowiki></code>: Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Map formatting and function templates]] <!-- not quite right, we need a category for such modules --> }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude> c8eu4br464m7n5360wf2k7h5yt2t9lw 798659 798658 2026-01-24T11:21:24Z en>Rodejong 0 fix 798659 wikitext text/x-wiki {{Module rating|release}} {{High use}} {{Lua|Module:Arguments}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Code to convert information about physical size of objects into parameters for geohack or mapframes. The following parameters describe the physical object size: {{div col|colwidth=15em}} * length_km * length_mi * width_km * width_mi * area_km2 * area_mi2 * area_ha * area_acre {{div col end}} When producing scale or zoom, module can use size of object on screen specified via {{para|viewport_cm}} or {{para|viewport_px}}. Defaults to 10cm, to match geohack. In addition, the module can accept and convert between geohack parameters: * dim * scale * type (e.g., "mountain" or "city") * population (for type="city" only) == Usage == ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|dim<nowiki>}}</nowiki></code>: Generates dim string (e.g, "24km") suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|scale<nowiki>}}</nowiki></code>: Generates scale (e.g, 100000) suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|zoom<nowiki>}}</nowiki></code>: Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Map formatting and function templates]] <!-- not quite right, we need a category for such modules --> }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude> dxsg1qpwuupxqtt6b7qt8cdkxx5ixca 798660 798659 2026-06-14T15:10:21Z SM7 3953 7 revisions imported from [[:en:Module:Infobox_dim/doc]] 798659 wikitext text/x-wiki {{Module rating|release}} {{High use}} {{Lua|Module:Arguments}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Code to convert information about physical size of objects into parameters for geohack or mapframes. The following parameters describe the physical object size: {{div col|colwidth=15em}} * length_km * length_mi * width_km * width_mi * area_km2 * area_mi2 * area_ha * area_acre {{div col end}} When producing scale or zoom, module can use size of object on screen specified via {{para|viewport_cm}} or {{para|viewport_px}}. Defaults to 10cm, to match geohack. In addition, the module can accept and convert between geohack parameters: * dim * scale * type (e.g., "mountain" or "city") * population (for type="city" only) == Usage == ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|dim<nowiki>}}</nowiki></code>: Generates dim string (e.g, "24km") suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|scale<nowiki>}}</nowiki></code>: Generates scale (e.g, 100000) suitable for geohack link ;<code><nowiki>{{</nowiki>#invoke:Infobox dim|zoom<nowiki>}}</nowiki></code>: Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Map formatting and function templates]] <!-- not quite right, we need a category for such modules --> }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude> dxsg1qpwuupxqtt6b7qt8cdkxx5ixca रिसॉर्ट टाउन 0 101055 798664 2026-06-15T09:34:00Z SM7 3953 नया आधार लेख 798664 wikitext text/x-wiki [[File:Heiligendamm um 1841 Salon und Badehaus, Godewind Verlag.jpg|thumb|260px|हेईगेनडैम [[जर्मनी]] में 1793 में स्थापित, कंटीनेंटल यूरोप में सबसे पुरान समुंद्रतटीय रिसॉर्ट मानल जाला]] [[चित्र:Manali City.jpg|260px|thumb|alt=बर्फ से सफ़ेद पहाड़ी सीन जेकरा निचला हिस्स में कई रंग के मकान देखलाई पड़त बाड़ें|[[मनाली]] भारतीय राज्य [[हिमाचल प्रदेश]] में एगो मशहूर रिसॉर्ट टाउन आ [[हिल स्टेशन]] बाटे।]] '''रिसॉर्ट टाउन''', '''रिसॉर्ट सिटी''' भा '''रिसॉर्ट नगर''' अइसन शहरी इलाका के कहल जाला जहाँ टूरिज्म आ छुट्टी बितावे खातिर आवे वाला लोग लोकल संस्कृति आ अर्थबेवस्था के मुख्य आधार होखे लें। एगो आम रिसॉर्ट टाउन के आसपास एक भा एक से बेसी [[रिसॉर्ट]] मौजूद हो सके लें, जहाँ टूरिस्ट लोग ठहरे आ मनोरंजन के सुविधा हासिल कर सके ला। कई बेर रिसॉर्ट सिटी शब्द के इस्तेमाल अइसनो जगह खातिर कइल जाला जे पर्यटकन के बीच बहुत पॉपुलर होखे, भले ओहिजा औपचारिक रूप से रिसॉर्ट मौजूद होखे भा ना होखे। ब्रिटिश कोलंबिया के एगो टास्कफोर्स एह शब्द के परिभाषा देत कहलस कि रिसॉर्ट नगर ओह संगठित भा असंगठित लगातार बसल क्षेत्र के कहल जा सकेला, जहाँ अस्थायी आवास कक्ष (बेड यूनिट के आधार पर मापल गइल) के गिनती स्थायी आबादी के 60 परसेंट से बेसी होखे। एहसे पता चलेला कि ओह क्षेत्र में पर्यटकन आ अस्थायी आगंतुकन के महत्त्वपूर्ण भूमिका बाटे। {{clear}} == इहो देखल जाय == * [[टूरिस्ट सिटी]] * [[हिल स्टेशन]] * [[हॉलिडे विलेज]] == संदर्भ == {{Reflist|29em}} [[श्रेणी:शहरी भूगोल]] {{tourism-stub}} 8u47nei8txr11h16026bw7qj1p3wrow 798665 798664 2026-06-15T09:34:34Z SM7 3953 [[विकिपीडिया:हॉट-कैट|हॉट-कैट]] द्वारा [[श्रेणी:पर्यटन भूगोल]] जोड़ल गइल 798665 wikitext text/x-wiki [[File:Heiligendamm um 1841 Salon und Badehaus, Godewind Verlag.jpg|thumb|260px|हेईगेनडैम [[जर्मनी]] में 1793 में स्थापित, कंटीनेंटल यूरोप में सबसे पुरान समुंद्रतटीय रिसॉर्ट मानल जाला]] [[चित्र:Manali City.jpg|260px|thumb|alt=बर्फ से सफ़ेद पहाड़ी सीन जेकरा निचला हिस्स में कई रंग के मकान देखलाई पड़त बाड़ें|[[मनाली]] भारतीय राज्य [[हिमाचल प्रदेश]] में एगो मशहूर रिसॉर्ट टाउन आ [[हिल स्टेशन]] बाटे।]] '''रिसॉर्ट टाउन''', '''रिसॉर्ट सिटी''' भा '''रिसॉर्ट नगर''' अइसन शहरी इलाका के कहल जाला जहाँ टूरिज्म आ छुट्टी बितावे खातिर आवे वाला लोग लोकल संस्कृति आ अर्थबेवस्था के मुख्य आधार होखे लें। एगो आम रिसॉर्ट टाउन के आसपास एक भा एक से बेसी [[रिसॉर्ट]] मौजूद हो सके लें, जहाँ टूरिस्ट लोग ठहरे आ मनोरंजन के सुविधा हासिल कर सके ला। कई बेर रिसॉर्ट सिटी शब्द के इस्तेमाल अइसनो जगह खातिर कइल जाला जे पर्यटकन के बीच बहुत पॉपुलर होखे, भले ओहिजा औपचारिक रूप से रिसॉर्ट मौजूद होखे भा ना होखे। ब्रिटिश कोलंबिया के एगो टास्कफोर्स एह शब्द के परिभाषा देत कहलस कि रिसॉर्ट नगर ओह संगठित भा असंगठित लगातार बसल क्षेत्र के कहल जा सकेला, जहाँ अस्थायी आवास कक्ष (बेड यूनिट के आधार पर मापल गइल) के गिनती स्थायी आबादी के 60 परसेंट से बेसी होखे। एहसे पता चलेला कि ओह क्षेत्र में पर्यटकन आ अस्थायी आगंतुकन के महत्त्वपूर्ण भूमिका बाटे। {{clear}} == इहो देखल जाय == * [[टूरिस्ट सिटी]] * [[हिल स्टेशन]] * [[हॉलिडे विलेज]] == संदर्भ == {{Reflist|29em}} [[श्रेणी:शहरी भूगोल]] [[श्रेणी:पर्यटन भूगोल]] {{tourism-stub}} l5irfdj0fwkww28yublmbn1l1e4fcnk 798666 798665 2026-06-15T09:41:00Z SM7 3953 संदर्भ जोड़ल/सुधारल गइल 798666 wikitext text/x-wiki [[File:Heiligendamm um 1841 Salon und Badehaus, Godewind Verlag.jpg|thumb|260px|हेईगेनडैम [[जर्मनी]] में 1793 में स्थापित, कंटीनेंटल यूरोप में सबसे पुरान समुंद्रतटीय रिसॉर्ट मानल जाला]] [[चित्र:Manali City.jpg|260px|thumb|alt=बर्फ से सफ़ेद पहाड़ी सीन जेकरा निचला हिस्स में कई रंग के मकान देखलाई पड़त बाड़ें|[[मनाली]] भारतीय राज्य [[हिमाचल प्रदेश]] में एगो मशहूर रिसॉर्ट टाउन आ [[हिल स्टेशन]] बाटे।]] '''रिसॉर्ट टाउन''' ({{Langx|en|resort town}}), '''रिसॉर्ट सिटी''' ({{Langx|en|resort city}}) भा '''रिसॉर्ट नगर''' अइसन शहरी इलाका के कहल जाला जहाँ [[पर्यटन|टूरिज्म]] आ छुट्टी बितावे खातिर आवे वाला लोग लोकल संस्कृति आ अर्थबेवस्था के मुख्य आधार होखे लें। एगो आम रिसॉर्ट टाउन के आसपास एक भा एक से बेसी [[रिसॉर्ट]] मौजूद हो सके लें, जहाँ टूरिस्ट लोग ठहरे आ मनोरंजन के सुविधा हासिल कर सके ला। कई बेर रिसॉर्ट सिटी शब्द के इस्तेमाल अइसनो जगह खातिर कइल जाला जे पर्यटकन के बीच बहुत पॉपुलर होखे, भले ओहिजा औपचारिक रूप से रिसॉर्ट मौजूद होखे भा ना होखे। ब्रिटिश कोलंबिया के एगो टास्कफोर्स एह शब्द के परिभाषा देत कहलस कि रिसॉर्ट नगर ओह संगठित भा असंगठित लगातार बसल क्षेत्र के कहल जा सकेला, जहाँ अस्थायी आवास कक्ष (बेड यूनिट के आधार पर मापल गइल) के गिनती स्थायी आबादी के 60 परसेंट से बेसी होखे।<ref name="gov.bc.ca">{{cite report|url=http://www.for.gov.bc.ca/ftp/Mountain_Resorts/external/!publish/Web/transition_report.pdf|title=Transitions: Planning, Servicing, and Local Governance in BC's Resort Communities|date=December 2004|volume=1: Best Practices Project|publisher=Government of British Columbia|archive-date=20 July 2022|access-date=18 November 2014|archive-url=https://web.archive.org/web/20220720140840/https://www.for.gov.bc.ca/ftp/Mountain_Resorts/external/!publish/Web/transition_report.pdf|url-status=dead}}</ref> एहसे पता चलेला कि ओह क्षेत्र में पर्यटकन आ अस्थायी आगंतुकन के महत्त्वपूर्ण भूमिका बाटे। कई बेर रिसॉर्ट टाउन अइसन क़स्बा के भी कहल जाला जे अपना के पर्यटन आकर्षण के रूप में प्रचारित करत होखे; अइसन जगहन के अर्थबेबस्था के धुरी पर्यटन होला आ टूरिस्ट जो एहिजा इनहन के पॉपुलरिटी के चलते जुमे ला।<ref name="टाइम्स">{{cite news |title=Resort towns in India that are timeless and evergreen |url=https://timesofindia.indiatimes.com/travel/destinations/resort-towns-in-india-that-are-timeless-and-evergreen/photostory/95303022.cms |access-date=15 जून 2026 |work=[[दि टाइम्स ऑफ इंडिया]] |date=4 नवंबर 2022}}</ref> {{clear}} == इहो देखल जाय == * [[टूरिस्ट सिटी]] * [[हिल स्टेशन]] * [[हॉलिडे विलेज]] == संदर्भ == {{Reflist|29em}} [[श्रेणी:शहरी भूगोल]] [[श्रेणी:पर्यटन भूगोल]] {{tourism-stub}} ae3wjuplj964l910yevikt64pg7wl3o 798667 798666 2026-06-15T09:41:58Z SM7 3953 सुधार कइल गइल 798667 wikitext text/x-wiki [[File:Heiligendamm um 1841 Salon und Badehaus, Godewind Verlag.jpg|thumb|260px|हेईगेनडैम [[जर्मनी]] में 1793 में स्थापित, कंटीनेंटल यूरोप में सबसे पुरान समुंद्रतटीय रिसॉर्ट मानल जाला]] [[चित्र:Manali City.jpg|260px|thumb|alt=बर्फ से सफ़ेद पहाड़ी सीन जेकरा निचला हिस्स में कई रंग के मकान देखलाई पड़त बाड़ें|[[मनाली]] भारतीय राज्य [[हिमाचल प्रदेश]] में एगो मशहूर रिसॉर्ट टाउन आ [[हिल स्टेशन]] बाटे।]] '''रिसॉर्ट टाउन''' ({{Langx|en|resort town}}), '''रिसॉर्ट सिटी''' ({{Langx|en|resort city}}) भा '''रिसॉर्ट नगर''' अइसन शहरी इलाका के कहल जाला जहाँ [[पर्यटन|टूरिज्म]] आ छुट्टी बितावे खातिर आवे वाला लोग लोकल संस्कृति आ अर्थबेवस्था के मुख्य आधार होखे लें। एगो आम रिसॉर्ट टाउन के आसपास एक भा एक से बेसी [[रिसॉर्ट]] मौजूद हो सके लें, जहाँ टूरिस्ट लोग ठहरे आ मनोरंजन के सुविधा हासिल कर सके ला। कई बेर रिसॉर्ट सिटी शब्द के इस्तेमाल अइसनो जगह खातिर कइल जाला जे पर्यटकन के बीच बहुत पॉपुलर होखे, भले ओहिजा औपचारिक रूप से रिसॉर्ट मौजूद होखे भा ना होखे। [[ब्रिटिश कोलंबिया]] के एगो टास्कफोर्स एह शब्द के परिभाषा देत कहलस कि रिसॉर्ट नगर ओह संगठित भा असंगठित लगातार बसल क्षेत्र के कहल जा सकेला, जहाँ अस्थायी आवास कक्ष (बेड यूनिट के आधार पर मापल गइल) के गिनती स्थायी आबादी के 60 परसेंट से बेसी होखे।<ref name="gov.bc.ca">{{cite report|url=http://www.for.gov.bc.ca/ftp/Mountain_Resorts/external/!publish/Web/transition_report.pdf|title=Transitions: Planning, Servicing, and Local Governance in BC's Resort Communities|date=December 2004|volume=1: Best Practices Project|publisher=Government of British Columbia|archive-date=20 July 2022|access-date=18 November 2014|archive-url=https://web.archive.org/web/20220720140840/https://www.for.gov.bc.ca/ftp/Mountain_Resorts/external/!publish/Web/transition_report.pdf|url-status=dead}}</ref> एहसे पता चलेला कि ओह क्षेत्र में पर्यटकन आ अस्थायी आगंतुकन के महत्त्वपूर्ण भूमिका बाटे। कई बेर रिसॉर्ट टाउन अइसन क़स्बा के भी कहल जाला जे अपना के पर्यटन आकर्षण के रूप में प्रचारित करत होखे; अइसन जगहन के अर्थबेबस्था के धुरी पर्यटन होला आ टूरिस्ट जो एहिजा इनहन के पॉपुलरिटी के चलते जुमे ला।<ref name="टाइम्स">{{cite news |title=Resort towns in India that are timeless and evergreen |url=https://timesofindia.indiatimes.com/travel/destinations/resort-towns-in-india-that-are-timeless-and-evergreen/photostory/95303022.cms |access-date=15 जून 2026 |work=[[दि टाइम्स ऑफ इंडिया]] |date=4 नवंबर 2022}}</ref> {{clear}} == इहो देखल जाय == * [[टूरिस्ट सिटी]] * [[हिल स्टेशन]] * [[हॉलिडे विलेज]] == संदर्भ == {{Reflist|29em}} [[श्रेणी:शहरी भूगोल]] [[श्रेणी:पर्यटन भूगोल]] {{tourism-stub}} apa34mtgznj0gbskkdwcushpx48o15j 798668 798667 2026-06-15T09:42:56Z SM7 3953 [[विकिपीडिया:हॉट-कैट|हॉट-कैट]] द्वारा [[श्रेणी:कस्बा सभ के प्रकार]] जोड़ल गइल 798668 wikitext text/x-wiki [[File:Heiligendamm um 1841 Salon und Badehaus, Godewind Verlag.jpg|thumb|260px|हेईगेनडैम [[जर्मनी]] में 1793 में स्थापित, कंटीनेंटल यूरोप में सबसे पुरान समुंद्रतटीय रिसॉर्ट मानल जाला]] [[चित्र:Manali City.jpg|260px|thumb|alt=बर्फ से सफ़ेद पहाड़ी सीन जेकरा निचला हिस्स में कई रंग के मकान देखलाई पड़त बाड़ें|[[मनाली]] भारतीय राज्य [[हिमाचल प्रदेश]] में एगो मशहूर रिसॉर्ट टाउन आ [[हिल स्टेशन]] बाटे।]] '''रिसॉर्ट टाउन''' ({{Langx|en|resort town}}), '''रिसॉर्ट सिटी''' ({{Langx|en|resort city}}) भा '''रिसॉर्ट नगर''' अइसन शहरी इलाका के कहल जाला जहाँ [[पर्यटन|टूरिज्म]] आ छुट्टी बितावे खातिर आवे वाला लोग लोकल संस्कृति आ अर्थबेवस्था के मुख्य आधार होखे लें। एगो आम रिसॉर्ट टाउन के आसपास एक भा एक से बेसी [[रिसॉर्ट]] मौजूद हो सके लें, जहाँ टूरिस्ट लोग ठहरे आ मनोरंजन के सुविधा हासिल कर सके ला। कई बेर रिसॉर्ट सिटी शब्द के इस्तेमाल अइसनो जगह खातिर कइल जाला जे पर्यटकन के बीच बहुत पॉपुलर होखे, भले ओहिजा औपचारिक रूप से रिसॉर्ट मौजूद होखे भा ना होखे। [[ब्रिटिश कोलंबिया]] के एगो टास्कफोर्स एह शब्द के परिभाषा देत कहलस कि रिसॉर्ट नगर ओह संगठित भा असंगठित लगातार बसल क्षेत्र के कहल जा सकेला, जहाँ अस्थायी आवास कक्ष (बेड यूनिट के आधार पर मापल गइल) के गिनती स्थायी आबादी के 60 परसेंट से बेसी होखे।<ref name="gov.bc.ca">{{cite report|url=http://www.for.gov.bc.ca/ftp/Mountain_Resorts/external/!publish/Web/transition_report.pdf|title=Transitions: Planning, Servicing, and Local Governance in BC's Resort Communities|date=December 2004|volume=1: Best Practices Project|publisher=Government of British Columbia|archive-date=20 July 2022|access-date=18 November 2014|archive-url=https://web.archive.org/web/20220720140840/https://www.for.gov.bc.ca/ftp/Mountain_Resorts/external/!publish/Web/transition_report.pdf|url-status=dead}}</ref> एहसे पता चलेला कि ओह क्षेत्र में पर्यटकन आ अस्थायी आगंतुकन के महत्त्वपूर्ण भूमिका बाटे। कई बेर रिसॉर्ट टाउन अइसन क़स्बा के भी कहल जाला जे अपना के पर्यटन आकर्षण के रूप में प्रचारित करत होखे; अइसन जगहन के अर्थबेबस्था के धुरी पर्यटन होला आ टूरिस्ट जो एहिजा इनहन के पॉपुलरिटी के चलते जुमे ला।<ref name="टाइम्स">{{cite news |title=Resort towns in India that are timeless and evergreen |url=https://timesofindia.indiatimes.com/travel/destinations/resort-towns-in-india-that-are-timeless-and-evergreen/photostory/95303022.cms |access-date=15 जून 2026 |work=[[दि टाइम्स ऑफ इंडिया]] |date=4 नवंबर 2022}}</ref> {{clear}} == इहो देखल जाय == * [[टूरिस्ट सिटी]] * [[हिल स्टेशन]] * [[हॉलिडे विलेज]] == संदर्भ == {{Reflist|29em}} [[श्रेणी:शहरी भूगोल]] [[श्रेणी:पर्यटन भूगोल]] [[श्रेणी:कस्बा सभ के प्रकार]] {{tourism-stub}} t8lazdha6b37uvv1x40mwkf0i29npu4 रिजॉर्ट टाउन 0 101056 798669 2026-06-15T09:50:42Z SM7 3953 पन्ना [[रिसॉर्ट टाउन]] पर अनुप्रेषित कइल गइल 798669 wikitext text/x-wiki #REDIRECT [[रिसॉर्ट टाउन]] 5n9j7sudpy3wvhoh3fujj6vbwophfuk 798670 798669 2026-06-15T09:50:58Z SM7 3953 Added {{[[:Template:R from alternative spelling|R from alternative spelling]]}} tag to redirect 798670 wikitext text/x-wiki #REDIRECT [[रिसॉर्ट टाउन]] {{Redirect category shell| {{R from alternative spelling}} }} 9b6jihja4ckn835o081koyylgmdld37 रिसॉर्ट सिटी 0 101057 798674 2026-06-15T09:56:10Z SM7 3953 पन्ना [[रिसॉर्ट टाउन]] पर अनुप्रेषित कइल गइल 798674 wikitext text/x-wiki #REDIRECT [[रिसॉर्ट टाउन]] 5n9j7sudpy3wvhoh3fujj6vbwophfuk 798675 798674 2026-06-15T09:56:23Z SM7 3953 Added {{[[:Template:R from alternative name|R from alternative name]]}} tag to redirect 798675 wikitext text/x-wiki #REDIRECT [[रिसॉर्ट टाउन]] {{Redirect category shell| {{R from alternative name}} }} qz5t72kwhloeitstqcm67bks9p1kinj शकीरा 0 101058 798679 2026-06-15T11:22:49Z ~2026-35242-75 40359 पन्ना बनावल गइल "[[चित्र:2023-11-16_Gala_de_los_Latin_Grammy,_03_(cropped)02.jpg|right|thumb|शकीरा (2023)]] '''शकीरा इसाबेल मेबारक रिपोल''' एगो मशहूर कोलंबियाई गायिका, गीतकार आ डांसर हई। उनुका के "लैटिन संगीत के रानी" कहल जाला।<ref>{{Cite web |last=..." के साथ 798679 wikitext text/x-wiki [[चित्र:2023-11-16_Gala_de_los_Latin_Grammy,_03_(cropped)02.jpg|right|thumb|शकीरा (2023)]] '''शकीरा इसाबेल मेबारक रिपोल''' एगो मशहूर कोलंबियाई गायिका, गीतकार आ डांसर हई। उनुका के "लैटिन संगीत के रानी" कहल जाला।<ref>{{Cite web |last=Zarczynski |first=Andrea |title=As Latin Music Booms, Grammy Museum Honors Shakira |url=https://www.forbes.com/sites/andreazarczynski/2023/04/30/as-latin-music-booms-grammy-museum-honors-shakira/ |access-date=2026-06-15 |website=Forbes |language=en}}</ref> उनुकर जन्म 2 फरवरी 1977 के [[कोलंबिया]] में भइल रहे। ऊ आपन शानदार गाना आ डांस खातिर पूरा दुनिया में बहुत मशहूर बाड़ी। == संदर्भv == ldn0x4535c8bgzw3igwmo40ne2rrgza