Hi<br><br><div class="gmail_quote">On Wed, Mar 30, 2011 at 10:26 AM, Tim Sutton <span dir="ltr">&lt;<a href="mailto:lists@linfiniti.com">lists@linfiniti.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi<br><br><div class="gmail_quote"><div class="im">On Tue, Mar 29, 2011 at 1:46 PM, Terence Van Zyl <span dir="ltr">&lt;<a href="mailto:tvzyl@csir.co.za" target="_blank">tvzyl@csir.co.za</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



  

  
  <div style="font-style:normal;font-size:10pt;font-family:Dialog;font-weight:normal;margin-top:4px;margin-bottom:1px;margin-right:4px;font-variant:normal;margin-left:4px;line-height:normal">
    <p style="margin-bottom:0;margin-top:0">
      <font face="Dialog" size="2">Hi All.</font>    </p>
<br>      
    <p style="margin-bottom:0;margin-top:0">
      <font face="Dialog" size="2">Thanks for the help got it working...</font>    </p>
<br>      
    <p style="margin-bottom:0;margin-top:0">
      <font face="Dialog" size="2">This seems to work, Note used setDestinationSrs not setDestinationCrs</font>    </p>
<br></div></blockquote><div><br></div></div><div>Ok thats actually a bug because *Srs methods are to be deprecated in favour of *Crs. I&#39;ll update the bindings.</div><div><br></div></div></blockquote><div><br></div><div>

Ok the Crs flavours of those methods are already in the 1.7 python API...I guess you are still on 1.6. Just bear in mind your plugin may need tweaking come the release of 2.0 (when deprecated methods will be dropped from the API).</div>

<div><br></div><div>Regards</div><div><br></div><div>Tim</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div></div><div>Regards</div>

<div><br></div><font color="#888888"><div>Tim</div></font><div><div></div><div class="h5">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-style:normal;font-size:10pt;font-family:Dialog;font-weight:normal;margin-top:4px;margin-bottom:1px;margin-right:4px;font-variant:normal;margin-left:4px;line-height:normal">


      
    <p style="margin-bottom:0;margin-top:0">
      <font face="Dialog" size="2">myrender = self.canvas.mapRenderer()</font>    </p>
    <p style="margin-bottom:0;margin-top:0">
      <font face="Dialog" size="2">myrender.setProjectionsEnabled(True) </font>    </p>
    <p style="margin-bottom:0;margin-top:0">
      <font face="Dialog" size="2">myrender.setDestinationSrs(crsDest)</font>    </p>
<br>      <br>
    <p style="margin-bottom:0;margin-top:0">
      <font face="Dialog" size="2">Terence</font>    </p>
    <p style="margin-bottom:0;margin-top:0">
      <br>
      &gt;&gt;&gt;     </p>
    <table style="font-size:1em;margin-top:0;margin-right:0;margin-bottom:0;margin-left:15px" border="0" bgcolor="#f3f3f3">
      <tbody><tr>
        <td>
          <div style="border-left:solid 1px #050505;padding-left:7px">
            <table style="font-size:10pt;font-style:normal;font-family:Dialog;font-weight:normal;font-variant:normal;line-height:normal" bgcolor="#f3f3f3">
              <tbody><tr valign="top">
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    <b>From: </b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    Tim Sutton &lt;<a href="mailto:lists@linfiniti.com" target="_blank">lists@linfiniti.com</a>&gt;                  </p>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    <b>To:</b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    Terence Van Zyl &lt;<a href="mailto:tvzyl@csir.co.za" target="_blank">tvzyl@csir.co.za</a>&gt;                  </p>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    <b>CC:</b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    &lt;<a href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.org</a>&gt;                  </p>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    <b>Date: </b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    3/29/2011 09:27 AM                  </p>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    <b>Subject: </b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom:0;margin-top:0">
                    Re: [Qgis-developer] Getting auto re-projection on Standalone QgsMapCanvas                  </p>
                </td>
              </tr>
            </tbody></table><div><div></div><div>
            <p style="margin-bottom:0;margin-top:0">
              Hi again<br><br><br><br>On Tue, Mar 29, 2011 at 9:23 AM, Tim Sutton &lt;<a href="mailto:lists@linfiniti.com" target="_blank">lists@linfiniti.com</a>&gt; wrote:<br>&gt; Howzit Terence<br>&gt;<br>&gt; The c++ version of what you are trying to do is something like (you<br>


&gt; need to have already teh myCRSID variable defined):<br>&gt;<br>&gt; QgsMapRenderer* myRenderer = mMapCanvas-&gt;mapRenderer();<br>&gt; QgsCoordinateReferenceSystem srs( myCRSID,<br>&gt; QgsCoordinateReferenceSystem::InternalCrsId );<br>


&gt; myRenderer-&gt;setDestinationCrs( srs );\<br><br>You probably need trunk / nightly builds to use this the above call<br>was missing from the python interface and Martin has just added it.<br><br>Regards<br><br>Tim<br>


<br><br>&gt; myRenderer-&gt;setMapUnits( QGis::Meters );<br>&gt; myRenderer-&gt;setProjectionsEnabled( true );<br>&gt;<br>&gt;<br>&gt; I&#39;m not a python guru but you can probably replace those :: and -&gt; &#39;s<br>&gt; with &#39;.&#39; and it should mostly work.<br>


&gt;<br>&gt; Regards<br>&gt;<br>&gt; Tim<br>&gt;<br>&gt;<br>&gt; On Mon, Mar 28, 2011 at 4:04 PM, Terence Van Zyl &lt;<a href="mailto:tvzyl@csir.co.za" target="_blank">tvzyl@csir.co.za</a>&gt; wrote:<br>&gt;&gt; Hi All, Some help please..<br>


&gt;&gt;<br>&gt;&gt; From Python I have created a standalone QgsMapCanvas to which I have added a<br>&gt;&gt; number of layers, one raster and then some vector. Is there a way to get the<br>&gt;&gt; vector layers to auto reproject? If Not then how would we do this manually.<br>


&gt;&gt;<br>&gt;&gt; Thanks<br>&gt;&gt;<br>&gt;&gt; Terence<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; This message is subject to the CSIR&#39;s copyright terms and conditions, e-mail<br>&gt;&gt; legal notice, and implemented Open Document Format (ODF) standard.<br>


&gt;&gt; The full disclaimer details can be found at<br>&gt;&gt; <a href="http://www.csir.co.za/disclaimer.html." target="_blank">http://www.csir.co.za/disclaimer.html.</a><br>&gt;&gt;<br>&gt;&gt; This message has been scanned for viruses and dangerous content by<br>


&gt;&gt; MailScanner,<br>&gt;&gt; and is believed to be clean. MailScanner thanks Transtec Computers for their<br>&gt;&gt; support.<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Qgis-developer mailing list<br>


&gt;&gt; <a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>


&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)<br>&gt; ==============================================<br>&gt; Please do not email me off-list with technical<br>


&gt; support questions. Using the lists will gain<br>&gt; more exposure for your issues and the knowledge<br>&gt; surrounding your issue will be shared with all.<br>&gt;<br>&gt; Visit <a href="http://linfiniti.com" target="_blank">http://linfiniti.com</a> to find out about:<br>


&gt;  * QGIS programming and support services<br>&gt;  * Mapserver and PostGIS based hosting plans<br>&gt;  * FOSS Consulting Services<br>&gt; Skype: timlinux<br>&gt; Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a><br>


&gt; ==============================================<br>&gt;<br><br><br><br>--<br>Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)<br>==============================================<br>Please do not email me off-list with technical<br>


support questions. Using the lists will gain<br>more exposure for your issues and the knowledge<br>surrounding your issue will be shared with all.<br><br>Visit <a href="http://linfiniti.com" target="_blank">http://linfiniti.com</a> to find out about:<br>


* QGIS programming and support services<br>* Mapserver and PostGIS based hosting plans<br>* FOSS Consulting Services<br>Skype: timlinux<br>Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a><br>


==============================================<br>
            </p>
          </div></div></div>
        </td>
      </tr>
    </tbody></table>
  <font face="Verdana,Arial,Helvetica,Trebuchet MS" size="1">
<br>-- 
<br><div>This message is subject to the CSIR&#39;s copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
<br>The full disclaimer details can be found at <a href="http://www.csir.co.za/disclaimer.html" target="_blank">http://www.csir.co.za/disclaimer.html</a>.
<p>
<br>This message has been scanned for viruses and dangerous content by <a href="http://www.mailscanner.info/" target="_blank"><b>MailScanner</b></a>, 
<br>and is believed to be clean.  MailScanner thanks <a href="http://www.transtec.co.uk/" target="_blank">Transtec Computers</a> for their support.
</p></div></font>
</div>


</blockquote></div></div></div><br><br clear="all"><br>-- <br><div><div></div><div class="h5">Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)<br>==============================================<br>Please do not email me off-list with technical<br>


support questions. Using the lists will gain<br>more exposure for your issues and the knowledge<br>surrounding your issue will be shared with all.<br><br>Visit <a href="http://linfiniti.com" target="_blank">http://linfiniti.com</a> to find out about:<br>


 * QGIS programming and support services<br> * Mapserver and PostGIS based hosting plans<br> * FOSS Consulting Services<br>Skype: timlinux<br>Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a><br>

==============================================<br>

</div></div></blockquote></div><br><br clear="all"><br>-- <br>Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)<br>==============================================<br>Please do not email me off-list with technical<br>

support questions. Using the lists will gain<br>more exposure for your issues and the knowledge<br>surrounding your issue will be shared with all.<br><br>Visit <a href="http://linfiniti.com">http://linfiniti.com</a> to find out about:<br>

 * QGIS programming and support services<br> * Mapserver and PostGIS based hosting plans<br> * FOSS Consulting Services<br>Skype: timlinux<br>Irc: timlinux on #qgis at <a href="http://freenode.net">freenode.net</a><br>==============================================<br>