Re: [QGIS-Developer] QgsLayout returns different types on different platforms

2018-05-25 Thread Tim Sutton
Hi

> On 25 May 2018, at 22:06, Adam Borczyk  wrote:
> 
> Thanks a lot Tim, I'll give it a try. Looks like it's API 2 workaround and 
> the issue propagated to API 3 as well?

Correct.

Regards

Tim

> 
> 
> Adam Borczyk
> -
> 
> GIS Support Sp. z o.o.
> Dobrzańskiego 3, Lublin 20-262 
> 
> tel. +48 81 451 14 90, NIP: 9462641761
> 
> On 25 May 2018 at 21:43, Tim Sutton  > wrote:
> Hi
> 
> It is probably a well known issue with SIP bindings not recognising the 
> object type returned for the layout. A work around is here:
> 
> https://github.com/inasafe/inasafe/blob/develop/safe/report/processors/default.py#L54
>  
> 
> 
> Regards
> 
> Tim
> 
>> On 25 May 2018, at 19:51, Adam Borczyk > > wrote:
>> 
>> Hi all,
>> Using PyQGIS I load a layout .qpt file, then I access items in the 
>> composition. I do it using
>> 
>> document = QDomDocument()
>> document.setContent(content) # content is .qpt file content
>> composition = QgsPrintLayout( QgsProject.instance() )
>> composition.loadFromTemplate( document, QgsReadWriteContext() )
>> 
>> map_item = composition.itemById('main_map')
>> map_item.setExtent(canvas.extent())
>> 
>> 
>> Now map_item is of type QgsLayoutItemMap while I'm on Ubuntu, but it is 
>> QgsLayoutItem when I use Windows and therefore I receive an error 
>> (QgsLayoutItem does not have setExtent method). Does anybody have an idea 
>> why this happens?
>> 
>> Ubuntu 16.04 x64 + QGIS 3.0.2 with Python 3.5.2 installed last week
>> Windows 7 x64 + QGIS 3.0.3 with Python 3.6.0 (fresh now from OSGeo Installer)
>> 
>> Best regards
>> Adam Borczyk
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
> —
> 
> 
> 
> 
> 
> 
> 
> 
> Tim Sutton
> 
> Co-founder: Kartoza
> Ex Project chair: QGIS.org 
> 
> Visit http://kartoza.com  to find out about open source:
> 
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
> 
> Skype: timlinux
> IRC: timlinux on #qgis at freenode.net 
> 

—








Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux
IRC: timlinux on #qgis at freenode.net



signature.asc
Description: Message signed with OpenPGP
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QgsLayout returns different types on different platforms

2018-05-25 Thread Adam Borczyk
Thanks a lot Tim, I'll give it a try. Looks like it's API 2 workaround and
the issue propagated to API 3 as well?

* Adam Borczyk*

*-GIS Support Sp. z o.o.Dobrzańskiego 3,
Lublin 20-262
tel.
+48 81 451 14 90, NIP: 9462641761*

On 25 May 2018 at 21:43, Tim Sutton  wrote:

> Hi
>
> It is probably a well known issue with SIP bindings not recognising the
> object type returned for the layout. A work around is here:
>
> https://github.com/inasafe/inasafe/blob/develop/safe/
> report/processors/default.py#L54
>
> Regards
>
> Tim
>
> On 25 May 2018, at 19:51, Adam Borczyk 
> wrote:
>
> Hi all,
> Using PyQGIS I load a layout .qpt file, then I access items in the
> composition. I do it using
>
> document = QDomDocument()
> document.setContent(content) # content is .qpt file content
> composition = QgsPrintLayout( QgsProject.instance() )
> composition.loadFromTemplate( document, QgsReadWriteContext() )
>
> map_item = composition.itemById('main_map')
> map_item.setExtent(canvas.extent())
>
>
> Now map_item is of type QgsLayoutItemMap while I'm on Ubuntu, but it is
> QgsLayoutItem when I use Windows and therefore I receive an error
> (QgsLayoutItem does not have setExtent method). Does anybody have an idea
> why this happens?
>
> Ubuntu 16.04 x64 + QGIS 3.0.2 with Python 3.5.2 installed last week
> Windows 7 x64 + QGIS 3.0.3 with Python 3.6.0 (fresh now from OSGeo
> Installer)
>
> Best regards
> Adam Borczyk
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> —
>
>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Ex Project chair:* QGIS.org
>
> Visit http://kartoza.com to find out about open source:
>
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
>
> *Skype*: timlinux
> *IRC:* timlinux on #qgis at freenode.net
>
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QgsLayout returns different types on different platforms

2018-05-25 Thread Tim Sutton
Hi

It is probably a well known issue with SIP bindings not recognising the object 
type returned for the layout. A work around is here:

https://github.com/inasafe/inasafe/blob/develop/safe/report/processors/default.py#L54

Regards

Tim

> On 25 May 2018, at 19:51, Adam Borczyk  wrote:
> 
> Hi all,
> Using PyQGIS I load a layout .qpt file, then I access items in the 
> composition. I do it using
> 
> document = QDomDocument()
> document.setContent(content) # content is .qpt file content
> composition = QgsPrintLayout( QgsProject.instance() )
> composition.loadFromTemplate( document, QgsReadWriteContext() )
> 
> map_item = composition.itemById('main_map')
> map_item.setExtent(canvas.extent())
> 
> 
> Now map_item is of type QgsLayoutItemMap while I'm on Ubuntu, but it is 
> QgsLayoutItem when I use Windows and therefore I receive an error 
> (QgsLayoutItem does not have setExtent method). Does anybody have an idea why 
> this happens?
> 
> Ubuntu 16.04 x64 + QGIS 3.0.2 with Python 3.5.2 installed last week
> Windows 7 x64 + QGIS 3.0.3 with Python 3.6.0 (fresh now from OSGeo Installer)
> 
> Best regards
> Adam Borczyk
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

—








Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux
IRC: timlinux on #qgis at freenode.net



signature.asc
Description: Message signed with OpenPGP
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] QgsLayout returns different types on different platforms

2018-05-25 Thread Adam Borczyk
Hi all,
Using PyQGIS I load a layout .qpt file, then I access items in the
composition. I do it using

document = QDomDocument()
document.setContent(content) # content is .qpt file content
composition = QgsPrintLayout( QgsProject.instance() )
composition.loadFromTemplate( document, QgsReadWriteContext() )

map_item = composition.itemById('main_map')
map_item.setExtent(canvas.extent())


Now map_item is of type QgsLayoutItemMap while I'm on Ubuntu, but it is
QgsLayoutItem when I use Windows and therefore I receive an error
(QgsLayoutItem does not have setExtent method). Does anybody have an idea
why this happens?

Ubuntu 16.04 x64 + QGIS 3.0.2 with Python 3.5.2 installed last week
Windows 7 x64 + QGIS 3.0.3 with Python 3.6.0 (fresh now from OSGeo
Installer)

Best regards
Adam Borczyk
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [1391] Asistente LADM_COL approval notification.

2018-05-25 Thread noreply

Plugin Asistente LADM_COL approval by pcav.
The plugin version "[1391] Asistente LADM_COL 0.2.0 Experimental" is now 
approved
Link: http://plugins.qgis.org/plugins/asistente_ladm_col/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [828] QBan(o) approval notification.

2018-05-25 Thread noreply

Plugin QBan(o) approval by pcav.
The plugin version "[828] QBan(o) 1.6" is now approved
Link: http://plugins.qgis.org/plugins/QBano/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [1350] Mascaret approval notification.

2018-05-25 Thread noreply

Plugin Mascaret approval by pcav.
The plugin version "[1350] Mascaret 0.1.3 Experimental" is now approved
Link: http://plugins.qgis.org/plugins/Mascaret/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Zonal statistics not working with different CRS

2018-05-25 Thread matteo
Done,

https://issues.qgis.org/issues/19027

thanks Nyall

Matteo
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [1412] GeoDataFarm approval notification.

2018-05-25 Thread noreply

Plugin GeoDataFarm approval by pcav.
The plugin version "[1412] GeoDataFarm 1.1.0" is now approved
Link: http://plugins.qgis.org/plugins/geodatafarm/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [1145] ClusterPoints approval notification.

2018-05-25 Thread noreply

Plugin ClusterPoints approval by pcav.
The plugin version "[1145] ClusterPoints 3.2" is now approved
Link: http://plugins.qgis.org/plugins/ClusterPoints/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [221] VectorFieldCalc approval notification.

2018-05-25 Thread noreply

Plugin VectorFieldCalc approval by pcav.
The plugin version "[221] VectorFieldCalc 1.4" is now approved
Link: http://plugins.qgis.org/plugins/VectorFieldCalc/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [1141] Stereonet approval notification.

2018-05-25 Thread noreply

Plugin Stereonet approval by pcav.
The plugin version "[1141] Stereonet 0.3" is now approved
Link: http://plugins.qgis.org/plugins/qgis-stereonet/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer