Hi

On Wed, Mar 30, 2011 at 10:26 AM, Tim Sutton <[email protected]> wrote:

> Hi
>
> On Tue, Mar 29, 2011 at 1:46 PM, Terence Van Zyl <[email protected]> wrote:
>
>>  Hi All.
>>
>>  Thanks for the help got it working...
>>
>>  This seems to work, Note used setDestinationSrs not setDestinationCrs
>>
>>
> Ok thats actually a bug because *Srs methods are to be deprecated in favour
> of *Crs. I'll update the bindings.
>
>
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).

Regards

Tim


> Regards
>
> Tim
>
>
>>  myrender = self.canvas.mapRenderer()
>>
>> myrender.setProjectionsEnabled(True)
>>
>> myrender.setDestinationSrs(crsDest)
>>
>>
>>  Terence
>>
>>
>> >>>
>>
>> *From: *
>>
>> Tim Sutton <[email protected]>
>>
>> *To:*
>>
>> Terence Van Zyl <[email protected]>
>>
>> *CC:*
>>
>> <[email protected]>
>>
>> *Date: *
>>
>> 3/29/2011 09:27 AM
>>
>> *Subject: *
>>
>> Re: [Qgis-developer] Getting auto re-projection on Standalone QgsMapCanvas
>>
>>
>> Hi again
>>
>>
>>
>> On Tue, Mar 29, 2011 at 9:23 AM, Tim Sutton <[email protected]> wrote:
>> > Howzit Terence
>> >
>> > The c++ version of what you are trying to do is something like (you
>> > need to have already teh myCRSID variable defined):
>> >
>> > QgsMapRenderer* myRenderer = mMapCanvas->mapRenderer();
>> > QgsCoordinateReferenceSystem srs( myCRSID,
>> > QgsCoordinateReferenceSystem::InternalCrsId );
>> > myRenderer->setDestinationCrs( srs );\
>>
>> You probably need trunk / nightly builds to use this the above call
>> was missing from the python interface and Martin has just added it.
>>
>> Regards
>>
>> Tim
>>
>>
>> > myRenderer->setMapUnits( QGis::Meters );
>> > myRenderer->setProjectionsEnabled( true );
>> >
>> >
>> > I'm not a python guru but you can probably replace those :: and -> 's
>> > with '.' and it should mostly work.
>> >
>> > Regards
>> >
>> > Tim
>> >
>> >
>> > On Mon, Mar 28, 2011 at 4:04 PM, Terence Van Zyl <[email protected]>
>> wrote:
>> >> Hi All, Some help please..
>> >>
>> >> From Python I have created a standalone QgsMapCanvas to which I have
>> added a
>> >> number of layers, one raster and then some vector. Is there a way to
>> get the
>> >> vector layers to auto reproject? If Not then how would we do this
>> manually.
>> >>
>> >> Thanks
>> >>
>> >> Terence
>> >>
>> >> --
>> >> This message is subject to the CSIR's copyright terms and conditions,
>> e-mail
>> >> legal notice, and implemented Open Document Format (ODF) standard.
>> >> The full disclaimer details can be found at
>> >> http://www.csir.co.za/disclaimer.html.
>> >>
>> >> This message has been scanned for viruses and dangerous content by
>> >> MailScanner,
>> >> and is believed to be clean. MailScanner thanks Transtec Computers for
>> their
>> >> support.
>> >>
>> >> _______________________________________________
>> >> Qgis-developer mailing list
>> >> [email protected]
>> >> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
>> > ==============================================
>> > Please do not email me off-list with technical
>> > support questions. Using the lists will gain
>> > more exposure for your issues and the knowledge
>> > surrounding your issue will be shared with all.
>> >
>> > Visit http://linfiniti.com to find out about:
>> >  * QGIS programming and support services
>> >  * Mapserver and PostGIS based hosting plans
>> >  * FOSS Consulting Services
>> > Skype: timlinux
>> > Irc: timlinux on #qgis at freenode.net
>> > ==============================================
>> >
>>
>>
>>
>> --
>> Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
>> ==============================================
>> Please do not email me off-list with technical
>> support questions. Using the lists will gain
>> more exposure for your issues and the knowledge
>> surrounding your issue will be shared with all.
>>
>> Visit http://linfiniti.com to find out about:
>> * QGIS programming and support services
>> * Mapserver and PostGIS based hosting plans
>> * FOSS Consulting Services
>> Skype: timlinux
>> Irc: timlinux on #qgis at freenode.net
>> ==============================================
>>
>> --
>> This message is subject to the CSIR's copyright terms and conditions,
>> e-mail legal notice, and implemented Open Document Format (ODF) standard.
>> The full disclaimer details can be found at
>> http://www.csir.co.za/disclaimer.html.
>>
>>
>> This message has been scanned for viruses and dangerous content by *
>> MailScanner* <http://www.mailscanner.info/>,
>> and is believed to be clean. MailScanner thanks Transtec 
>> Computers<http://www.transtec.co.uk/>for their support.
>>
>
>
>
> --
> Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
> ==============================================
> Please do not email me off-list with technical
> support questions. Using the lists will gain
> more exposure for your issues and the knowledge
> surrounding your issue will be shared with all.
>
> Visit http://linfiniti.com to find out about:
>  * QGIS programming and support services
>  * Mapserver and PostGIS based hosting plans
>  * FOSS Consulting Services
> Skype: timlinux
> Irc: timlinux on #qgis at freenode.net
> ==============================================
>



-- 
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to