QGIS တွင် ဇော်ဂျီ – ဝင်း – ယူနီကုဒ်ဖောင့်များ အပြန်အလှန်ပြောင်းခြင်း

View Categories

[ ArcMap အတွက် ArcMap တွင် ဇော်ဂျီ မှ ယူနီကုတ် ပြောင်းခြင်း ကိုကြည့်ပါ ]

Attribute table ထဲက Win font ကို Unicode ပြောင်းခြင်း၊ Zawgyi ကို Unicode ပြောင်းခြင်း Unicode/Zawgyi ကို Win font ပြောင်းခြင်းတို့ကို python-myanmar module သုံးပြီး QGIS 3 မှာပြုလုပ်နိုင်ကြောင်း မိတ်ဆက်ပေးခဲ့ပြီးဖြစ်ပါတယ်(link to read)။ ယခုတော့ python-module install နည်း နဲ့ လိုအပ်တဲ့ ကျနော်ရေးထားတဲ့ conversion expression file ကို အသုံးပြုပုံကို ရေးသားဖော်ပြလိုက်ပါတယ်။

1. Python path ရှာခြင်း

Python-Myanmar module ကို QGIS 3.x နဲ့ပါလာတဲ့ python3.x ထဲကို install လုပ်ရပါမယ်။ အဲဒီအတွက် အရင်ဆုံး python.exe ဘယ်မှာရှိတယ်ဆိုတာ ရှာကြည့်ရပါမယ်။

File explorer ကနေရှာပါမယ်။ ပုံမှန်ကတော့ QGIS install directory အောက်မှာ ရှိပါတယ်။

ဥပမာ C:\Program Files\QGIS 3.X\apps\Python3X မှာ သို့မဟုတ် C:\OSGeo4W\apps\Python3X အောက်မှာရှိပါတယ်

ဒီ path လမ်းကြောင်းကို ကော်ပီကူးပါ။ အပေါ်ဖက်က Address bar ထဲမှာ select လုပ်ပြီး copy ကူးနိုင်ပါတယ်။

2. Command Prompt windows ဖြင့် module ထည့်ခြင်း

Windows search box တွင် cmd.exe ရိုက်ပါ။ ပေါ်လာသော cmd propmt icon ဘေးက ဝင်းဒိုးထဲမှာ “Run as administrator” ကိုနှိပ်ပါ။

Command Prompt windows ပွင့်လာမည်..

cd ဟုရိုက်ပါ။ space bar ရိုက်ပါ။ မောက်စ်တင်ပြီး right click paste လုပ်ပြီး python path ကိုထည့်ပါ။ Enter နှိပ်ပါ

python –m pip install python-myanmar ဟုရိုက်ပြီး Enter ခေါက်ပါ။ python-myanmar moduleကို အင်တာနက်မှ ရယူပြီး install လုပ်ပါမည်။

အားလုံးပြီးပါက နောက်ဆုံးတွင် Successfully installed python-myanmar…ဆိုပြီးစာပေါ်လာမည်။

Command prompt windows ကို ပိတ်ပါ။

QGIS Expression script file ကိုနေရာချထားခြင်း ..

https://github.com/knwin/qgis/raw/master/qgis3_myanmarfontconversion_functions.zip လင့်မှ .zip ကို ဒေါင်းလုပ်ချပါ

Zip ကိုဖြည်ပြီး အထဲမှ qgis3_myanmarfontconversion_functions.py ဖိုင်ကို ၏ QGIS3 ၏ expression folder ထဲထည့်ပါ။ expression folder သည် အောက်ပါနေရာတွင်ရှိနိုင်သည်။]

C:\Users\[user name]\AppData\Roaming\QGIS\QGIS3\profiles\default\python\expressions

QGIS တွင် font conversion functions များကို အသုံးပြုခြင်း

Expressoin dialog box ကို QGIS တွင်နေရာမျိုးစုံမှ အသုံးပြုနိုင်အောင် ထည့်ပေးထားပြီးဖြစ်သည်။ QGIS 3.x ၏ Expression dialog box ရှိ Function Editor tab တွင် qgis3_myanmarconversion_function selectလုပ်ပြီး ညာဖက်ရှိ “Save and Load Functions” button ကိုနှိပ်ပြီး function များကို load လုပ်ရန်လိုပါမည်။

loading script (incase not appeared)

Expression dialogbox များ နှင့် Field Calculator တို့တွင် font conversion functions များကို FontConversion အမည် အောက်တွင် တွေ့ရမည်။

Font conversion functions များ ရှင်းလင်းချက် –

uni2win( )  - ယူနီကုဒ် မှ ဝင်းဖောင့် ပြောင်းခြင်း
uni2zg( ) - ယူနီကုဒ် မှ ဇော်ဂျီ ပြောင်းခြင်း
zg2uni( )  - ဇော်ဂျီ မှ ယူနီကုဒ် ပြောင်းခြင်း
zg2win( )  - ဇော်ဂျီ မှ ဝင်းဖောင့် ပြောင်းခြင်း
win2uni( ) - ဝင်းဖောင့် မှ ယူနီကုဒ် ပြောင်းခြင်း
win2zg( )  - ဝင်းဖောင့် မှ ဇော်ဂျီ ပြောင်းခြင်း

မြန်မာစာပါသော field သို့မဟုတ် string/text ကို ကွင်းစကွင်းပိတ်ထဲတွင်ထည့်ပေးရမည်။ အထက်ပါ function များကို label ထိုးရာတွင်လည်းကောင်း field calculator တွက်ချက်ရာတွင်လည်းကောင်း အသုံးပြုနိုင်သည်။

ဥပမာ – attribute table ထဲတွင် ဇော်ဂျီ မှ ယူနီကုဒ် ပြောင်းခြင်း – St_zg ကော်လံမှ zawgyi စာများကို St_uni ထဲသို့ unicode ဖြင့်ပြောင်းထည့်ပုံကိုအောက်တွင်ပြသထားပါသည်

zg2uni("St_zg")

Attribute table တွင် ကော်လံအသစ်ဖြင့် ဖောင့်ပြောင်းစရာမလို font ကိုပြောင်းပြီး label ထိုးရာတွင်လည်း အထက်ပါ ဖန်ရှင်များကို ဖြင့်သုံးနိုင်သေးသည်။ အောက်တွင် ဇော်ဂျီဖောင့်များကို label ထိုးသည့်အခါ ဝင်း ဖောင့်များအဖြစ် ပေါ်စေရန်ပြုလုပ်ပြထားပါသည်။

label ထိုးရန်ပြင်ဆင်နေစဉ်
ဝင်း ရန်ကုန်ဖောင့်ဖြင့် စာထိုးထားပုံ

အထက်ပါနည်းသည် Attribute table တွင် font ပြောင်းပြီးသိမ်းခြင်းမဟုတ်ပဲ attribute column မှဖတ်ပြီး တိုက်ရိုက်ပြောင်းကာ label စာထိုးခြင်းဖြစ်သည်။

credit: ကိုကျော်နိုင်ဝင်း facebook post မှာကောက်နှုတ်တင်ပြပါသည်

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookies are small data files transferred onto computers or devices by sites, and this information is stored in your browser and performs functions such as recognising you when you return to our website and helping us to understand which information you find most interesting and useful.

You can adjust your preferences below.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings and and store required information for operating the website properly.

Show details Hide details