<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><div id="yui_3_16_0_1_1427690846969_6017" dir="ltr"><span>Dear User </span></div><div id="yui_3_16_0_1_1427690846969_6017" dir="ltr"><span id="yui_3_16_0_1_1427690846969_6176">How to convert Sri Lanka (Kadawala National  Kilometer  coordinate to WGS1984 Decimal </span></div><div id="yui_3_16_0_1_1427690846969_6017" dir="ltr"><span id="yui_3_16_0_1_1427690846969_7598" class="" style=""> </span><span style="color: rgb(102, 51, 0); font-family: 'Times New Roman'; font-size: medium; font-weight: bold;" class="">New Grid Co-ordinate System</span></div><span style="font-family: 'Times New Roman'; font-size: medium;" class=""></span><div style="font-family: 'Times New Roman'; font-size: medium;" class="" id="yui_3_16_0_1_1427690846969_7668">The transverse mercator projection on Everest ellipsoid (1830) with the following parameters is used to compute new grid co-ordinate system.<br class="" style="">Central meridian E 80° 46’ 18.16710”<br class="" style="">Latitude of Origin N 7° 00’ 1.69750”<br class="" style="">Scale factor 0.9999238418<br class="" style="">False Northing 500000m<br class="" style="">False Easting 500000m <br class="" style=""></div><div id="yui_3_16_0_1_1427690846969_6017" dir="ltr" class="" style=""><span style="font-family: 'Times New Roman'; font-size: medium;" class="" id="yui_3_16_0_1_1427690846969_7669">Pidurutalagala trigonometrical station is used as the latitude of origin and central meridian.</span><span> </span></div>  <div id="yui_3_16_0_1_1427690846969_6017" dir="ltr" class="" style=""><span id="yui_3_16_0_1_1427690846969_7598" class="" style=""> </span></div><br><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: times new roman, new york, times, serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Monday, 30 March 2015, 0:31, "qgis-user-request@lists.osgeo.org" <qgis-user-request@lists.osgeo.org> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container">Send Qgis-user mailing list submissions to<br>    <a ymailto="mailto:qgis-user@lists.osgeo.org" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>    <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>or, via email, send a message with subject or body 'help' to<br>    <a ymailto="mailto:qgis-user-request@lists.osgeo.org" href="mailto:qgis-user-request@lists.osgeo.org">qgis-user-request@lists.osgeo.org</a><br><br>You can reach the person managing the list at<br>    <a ymailto="mailto:qgis-user-owner@lists.osgeo.org" href="mailto:qgis-user-owner@lists.osgeo.org">qgis-user-owner@lists.osgeo.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Qgis-user digest..."<br><br><br>Today's Topics:<br><br>   1. Re: QCompleter in QGIS form (Matthias Kuhn)<br>   2. Re: Label line between points and labels. (Nicolas Cadieux)<br>   3. Saga is not working (azizul haque)<br>   4. Re: QCompleter in QGIS form (Blumentrath, Stefan)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sun, 29 Mar 2015 19:56:53 +0200<br>From: Matthias Kuhn <<a ymailto="mailto:matthias.kuhn@gmx.ch" href="mailto:matthias.kuhn@gmx.ch">matthias.kuhn@gmx.ch</a>><br>To: <a ymailto="mailto:qgis-user@lists.osgeo.org" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><br>Subject: Re: [Qgis-user] QCompleter in QGIS form<br>Message-ID: <<a ymailto="mailto:55183CE5.6050209@gmx.ch" href="mailto:55183CE5.6050209@gmx.ch">55183CE5.6050209@gmx.ch</a>><br>Content-Type: text/plain; charset="windows-1252"<br><br>PS:<br><br>1) couldn't reproduce the "global name is not defined" error... You<br>script works here with .ui and autogenerated forms.<br>2) You may use a global variable to cache your completer (or its values)<br><br>Best,<br>Matthias<br><br><br><br>On 03/28/2015 08:32 PM, Blumentrath, Stefan wrote:<br>><br>> Dear all,<br>><br>>  <br>><br>> Thanks to Nathan`s excellent example here:<br>><br>> <a href="http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/" target="_blank">http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/</a><br>><br>> I managed to implement a simple QCompleter for a LineEdit in my form<br>> where the completer items are being fetched from DB (see init function<br>> code at the end of my mail).<br>><br>>  <br>><br>> This is very, very promising stuff which comes in quite handy for<br>> entering species names (from an official list of (thousands of)<br>> species names in my case)!<br>><br>>  <br>><br>> Yet there are two things I am struggling with:<br>><br>> 1) Would it be possible to use this QCompleter solution to an<br>> autogenerated form? The auto generated forms are more than good enough<br>> for most of my use-cases. When I tried the Init function on an<br>> autogenerated form I got ?NameError: global name 'TextEdit' is not<br>> defined?? Any ideas how to fix that?<br>><br>>  <br>><br>> 2) It seems to me that the query - which is used to fill the<br>> QCompleter - is executed each time the form is opened. Would it be<br>> possible to avoid this, I mean that the query is only run once (e.g.<br>> when I open the project)? I hoped this could speed up the start of the<br>> form (even if the query gets cached in PostgreSQL)?<br>><br>> Many thanks in advance for helping.<br>><br>>  <br>><br>> Kind regards,<br>><br>> Stefan<br>><br>>  <br>><br>> P.S.: Next thing I will have to do is understand SIGNALS and SLOTS so<br>> I can adjust the completer content depending on other data entered in<br>> the form (e.g. filter species by kingdom or known occurrence in a<br>> country (here Norway)) ?<br>><br>>  <br>><br>> P.P.S.: My form_init.py looks like this:<br>><br>>  <br>><br>> from PyQt4.QtCore import *<br>><br>> from PyQt4.QtGui import *<br>><br>> from PyQt4.QtSql import *<br>><br>> import psycopg2<br>><br>> nameField = None<br>><br>> myDialog = None<br>><br>>  <br>><br>> def formOpen(dialog,layerid,featureid):<br>><br>>     global myDialog<br>><br>>     myDialog = dialog<br>><br>>     global nameField<br>><br>>     nameField = dialog.findChild(QLineEdit,"latinsk_navn")<br>><br>>    <br>><br>>     #Initiate completer<br>><br>>     completer = QCompleter()<br>><br>>     nameField.setCompleter(completer)<br>><br>>    <br>><br>>     #Fetch data from DB to fill completer<br>><br>>     conn = psycopg2.connect("dbname='MYDB' user='MYUSERNAME'<br>> host='MYHOST' password='MYPASSWD'")<br>><br>>     cur = conn.cursor()<br>><br>>     cur.execute("""SELECT scientificname FROM kls.l_artsliste WHERE<br>> finnesinorge = 'Ja'""")<br>><br>>     completition_items = []<br>><br>>     for row in cur.fetchall():<br>><br>>         completition_items.append(row[0])<br>><br>>  <br>><br>>                #Add data to Qt Model / QCompleter<br>><br>>                model = QStringListModel()<br>><br>>     model.setStringList(completition_items)<br>><br>>     completer.setModel(model)<br>><br>><br>><br>> _______________________________________________<br>> Qgis-user mailing list<br>> <a ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.osgeo.org/pipermail/qgis-user/attachments/20150329/90a70d60/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/qgis-user/attachments/20150329/90a70d60/attachment-0001.html</a>><br><br>------------------------------<br><br>Message: 2<br>Date: Sun, 29 Mar 2015 14:26:01 -0400<br>From: Nicolas Cadieux <<a ymailto="mailto:nicolas.cadieux@archeotec.ca" href="mailto:nicolas.cadieux@archeotec.ca">nicolas.cadieux@archeotec.ca</a>><br>To: Alexandre Neto <<a ymailto="mailto:senhor.neto@gmail.com" href="mailto:senhor.neto@gmail.com">senhor.neto@gmail.com</a>><br>Cc: Qgis Users List <<a ymailto="mailto:qgis-user@lists.osgeo.org" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>><br>Subject: Re: [Qgis-user] Label line between points and labels.<br>Message-ID:<br>    <<a ymailto="mailto:b56b7f3f-548a-4070-be07-2c20822fded8@HUCCAS02P.hostedmsx.local" href="mailto:b56b7f3f-548a-4070-be07-2c20822fded8@HUCCAS02P.hostedmsx.local">b56b7f3f-548a-4070-be07-2c20822fded8@HUCCAS02P.hostedmsx.local</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.osgeo.org/pipermail/qgis-user/attachments/20150329/f8c44014/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/qgis-user/attachments/20150329/f8c44014/attachment-0001.html</a>><br><br>------------------------------<br><br>Message: 3<br>Date: Sun, 29 Mar 2015 18:34:26 +0000 (UTC)<br>From: azizul haque <<a ymailto="mailto:haque.azizul320@yahoo.com" href="mailto:haque.azizul320@yahoo.com">haque.azizul320@yahoo.com</a>><br>To: "<a ymailto="mailto:qgis-user@lists.osgeo.org" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>" <<a ymailto="mailto:qgis-user@lists.osgeo.org" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>><br>Subject: [Qgis-user] Saga is not working<br>Message-ID:<br>    <<a ymailto="mailto:389248122.700773.1427654066189.JavaMail.yahoo@mail.yahoo.com" href="mailto:389248122.700773.1427654066189.JavaMail.yahoo@mail.yahoo.com">389248122.700773.1427654066189.JavaMail.yahoo@mail.yahoo.com</a>><br>Content-Type: text/plain; charset="utf-8"<br><br>Hi All,As I told you I am now using QGIS 2.8.1. I have to do some analysis using SAGA under QGIS environment. Unfortunately it is not working. I mean when I run it immediately it goes hang out. I installed SAGA gis for Mac Pro and configure it on terminal. I assume that do not configure it right way.?Any help is much appreciated.Please, please,RegardsAzizul<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.osgeo.org/pipermail/qgis-user/attachments/20150329/be48585b/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/qgis-user/attachments/20150329/be48585b/attachment-0001.html</a>><br><br>------------------------------<br><br>Message: 4<br>Date: Sun, 29 Mar 2015 18:59:30 +0000<br>From: "Blumentrath, Stefan" <<a ymailto="mailto:Stefan.Blumentrath@nina.no" href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>><br>To: Matthias Kuhn <<a ymailto="mailto:matthias.kuhn@gmx.ch" href="mailto:matthias.kuhn@gmx.ch">matthias.kuhn@gmx.ch</a>>, "<a ymailto="mailto:qgis-user@lists.osgeo.org" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>"<br>    <<a ymailto="mailto:qgis-user@lists.osgeo.org" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>><br>Subject: Re: [Qgis-user] QCompleter in QGIS form<br>Message-ID: <<a ymailto="mailto:c0dfbf4b6289498dbb1b390c042f2ac0@NINSRV23.nina.no" href="mailto:c0dfbf4b6289498dbb1b390c042f2ac0@NINSRV23.nina.no">c0dfbf4b6289498dbb1b390c042f2ac0@NINSRV23.nina.no</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>Hi Matthias,<br><br>Wow, cool! Thanks for implementing that so fast!<br><br>I just tested caching in a global variable. It works like a charm and speeds up the GUI significantly.<br><br>And yes, the completer works fine with autogenerated forms too (I only had to restart QGIS).<br>So all my problems in this regards are solved now.<br><br>The only, minor issue is, that one has to set Settings->Options->Enable Macros to "Always", or "Only this session" (with "Ask" (the default setting) the startup macro does not load, see: <a href="http://hub.qgis.org/issues/9523" target="_blank">http://hub.qgis.org/issues/9523</a>)<br><br>For those who are interested and who can`t wait for the next release with Matthias additions (and who like me are absolute Python beginners),<br>here is how it works (quite simple actually once you know how to do it):<br><br>The openProject() Python marco function (in my case named generate_completer.py, located in the project directory)<br>looks like this (completer content could also be loaded from file of course):<br>-----------------------------<br>#!/usr/bin/env python<br><br>from PyQt4.QtCore import *<br>from qgis.core import *<br>import psycopg2<br><br>def fetch_citems():<br><br>    global ci<br>    #Fetch data from DB to fill completer<br>    conn = psycopg2.connect("dbname='MYDB' user='MYUSER' host='MYHOST' password='MYDB'")<br>    cur = conn.cursor()<br>    cur.execute("""SELECT scientificname FROM kls.l_artsliste WHERE finnesinorge = 'Ja'""")<br>    ci = []<br>    for row in cur.fetchall():<br>        ci.append(row[0])<br><br>-----------------------------<br><br>It is referenced in the project like this:<br>    import generate_completer<br>    generate_completer.fetch_citems()<br><br>And the form init function (in my case named completer.py, located in the project directory) looks like this:<br>-----------------------------<br><br>from PyQt4.QtCore import *<br>from PyQt4.QtGui import *<br>import generate_completer<br><br>nameField = None<br>myDialog = None<br><br>def formOpen(dialog,layerid,featureid):<br>    global myDialog<br>    myDialog = dialog<br>    global nameField<br>    nameField = dialog.findChild(QLineEdit,"latinn")<br><br>    #Initiate completer<br>    completer = QCompleter()<br>    nameField.setCompleter(completer)<br><br>    #Add data to Qt Model / QCompleter<br>    model = QStringListModel()<br>    model.setStringList(generate_completer.ci)<br>    completer.setModel(model)<br><br>-----------------------------<br><br>It is referenced in the Fields tab as: completer.formOpen<br>"latinn" is the name of the attribute column BTW for which the completer is used.<br><br>I guess the global variable "ci" (Python list with Unicode strings) could also be used for data validation (in Nathan`s example)...<br><br>Thanks for this amazing Software!<br><br>Kind regards,<br>Stefan<br><br>From: <a ymailto="mailto:qgis-user-bounces@lists.osgeo.org" href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@lists.osgeo.org</a> [mailto:<a ymailto="mailto:qgis-user-bounces@lists.osgeo.org" href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@lists.osgeo.org</a>] On Behalf Of Matthias Kuhn<br>Sent: 29. mars 2015 19:56<br>To: <a ymailto="mailto:qgis-user@lists.osgeo.org" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><br>Subject: Re: [Qgis-user] QCompleter in QGIS form<br><br>Hi Stefan,<br><br>I had some spare time on the Sunday evening train. So I have just added this possibility to the ValueRelation widget. You can now choose the option "Use Completer" there.<br>The query is still run every time the form is opened at the moment. There is actually a caching mechanism for the value relation widget prepared, so it should be possible to make use of that and initialize the cache only once.<br>But that will have to wait until I have some spare time again or one may speed up the process by funding this or tackling the issue if coding skills are available (for the last option, please get in touch first, there are a couple of different approaches to doing this),<br><br>Testing is appreciated.<br>Matthias<br>On 03/28/2015 08:32 PM, Blumentrath, Stefan wrote:<br>Dear all,<br><br>Thanks to Nathan`s excellent example here:<br><a href="http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/" target="_blank">http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/</a><br>I managed to implement a simple QCompleter for a LineEdit in my form where the completer items are being fetched from DB (see init function code at the end of my mail).<br><br>This is very, very promising stuff which comes in quite handy for entering species names (from an official list of (thousands of) species names in my case)!<br><br>Yet there are two things I am struggling with:<br>1) Would it be possible to use this QCompleter solution to an autogenerated form? The auto generated forms are more than good enough for most of my use-cases. When I tried the Init function on an autogenerated form I got "NameError: global name 'TextEdit' is not defined"... Any ideas how to fix that?<br><br>2) It seems to me that the query - which is used to fill the QCompleter - is executed each time the form is opened. Would it be possible to avoid this, I mean that the query is only run once (e.g. when I open the project)? I hoped this could speed up the start of the form (even if the query gets cached in PostgreSQL)...<br>Many thanks in advance for helping.<br><br>Kind regards,<br>Stefan<br><br>P.S.: Next thing I will have to do is understand SIGNALS and SLOTS so I can adjust the completer content depending on other data entered in the form (e.g. filter species by kingdom or known occurrence in a country (here Norway)) ...<br><br>P.P.S.: My form_init.py looks like this:<br><br>from PyQt4.QtCore import *<br>from PyQt4.QtGui import *<br>from PyQt4.QtSql import *<br>import psycopg2<br>nameField = None<br>myDialog = None<br><br>def formOpen(dialog,layerid,featureid):<br>    global myDialog<br>    myDialog = dialog<br>    global nameField<br>    nameField = dialog.findChild(QLineEdit,"latinsk_navn")<br><br>    #Initiate completer<br>    completer = QCompleter()<br>    nameField.setCompleter(completer)<br><br>    #Fetch data from DB to fill completer<br>    conn = psycopg2.connect("dbname='MYDB' user='MYUSERNAME' host='MYHOST' password='MYPASSWD'")<br>    cur = conn.cursor()<br>    cur.execute("""SELECT scientificname FROM kls.l_artsliste WHERE finnesinorge = 'Ja'""")<br>    completition_items = []<br>    for row in cur.fetchall():<br>        completition_items.append(row[0])<br><br>               #Add data to Qt Model / QCompleter<br>               model = QStringListModel()<br>    model.setStringList(completition_items)<br>    completer.setModel(model)<br><br><br><br><br>_______________________________________________<br><br>Qgis-user mailing list<br><br><a ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><mailto:<a ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>><br><br><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.osgeo.org/pipermail/qgis-user/attachments/20150329/bc09918f/attachment.html" target="_blank">http://lists.osgeo.org/pipermail/qgis-user/attachments/20150329/bc09918f/attachment.html</a>><br><br>------------------------------<br><br>_______________________________________________<br>Qgis-user mailing list<br><a ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br><br>End of Qgis-user Digest, Vol 109, Issue 60<br>******************************************<br><br><br></div>  </div> </div>  </div></div></body></html>