Hi<br><br><div class="gmail_quote">On Tue, Mar 29, 2011 at 1:46 PM, Terence Van Zyl <span dir="ltr"><<a href="mailto:tvzyl@csir.co.za">tvzyl@csir.co.za</a>></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>Ok thats actually a bug because *Srs methods are to be deprecated in favour of *Crs. I'll update the bindings.</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 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>
>>> </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 <<a href="mailto:lists@linfiniti.com" target="_blank">lists@linfiniti.com</a>> </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 <<a href="mailto:tvzyl@csir.co.za" target="_blank">tvzyl@csir.co.za</a>> </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">
<<a href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.org</a>> </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 class="h5">
<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 <<a href="mailto:lists@linfiniti.com" target="_blank">lists@linfiniti.com</a>> wrote:<br>> Howzit Terence<br>><br>> The c++ version of what you are trying to do is something like (you<br>
> need to have already teh myCRSID variable defined):<br>><br>> QgsMapRenderer* myRenderer = mMapCanvas->mapRenderer();<br>> QgsCoordinateReferenceSystem srs( myCRSID,<br>> QgsCoordinateReferenceSystem::InternalCrsId );<br>
> myRenderer->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>> myRenderer->setMapUnits( QGis::Meters );<br>> myRenderer->setProjectionsEnabled( true );<br>><br>><br>> I'm not a python guru but you can probably replace those :: and -> 's<br>> with '.' and it should mostly work.<br>
><br>> Regards<br>><br>> Tim<br>><br>><br>> On Mon, Mar 28, 2011 at 4:04 PM, Terence Van Zyl <<a href="mailto:tvzyl@csir.co.za" target="_blank">tvzyl@csir.co.za</a>> wrote:<br>>> Hi All, Some help please..<br>
>><br>>> From Python I have created a standalone QgsMapCanvas to which I have added a<br>>> number of layers, one raster and then some vector. Is there a way to get the<br>>> vector layers to auto reproject? If Not then how would we do this manually.<br>
>><br>>> Thanks<br>>><br>>> Terence<br>>><br>>> --<br>>> This message is subject to the CSIR's copyright terms and conditions, e-mail<br>>> legal notice, and implemented Open Document Format (ODF) standard.<br>
>> The full disclaimer details can be found at<br>>> <a href="http://www.csir.co.za/disclaimer.html." target="_blank">http://www.csir.co.za/disclaimer.html.</a><br>>><br>>> This message has been scanned for viruses and dangerous content by<br>
>> MailScanner,<br>>> and is believed to be clean. MailScanner thanks Transtec Computers for their<br>>> support.<br>>><br>>> _______________________________________________<br>>> Qgis-developer mailing list<br>
>> <a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>><br>>><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>><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 class="im">This message is subject to the CSIR'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><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>