Re: [Qgis-developer] How to load a QLR file with pyQGIS ?

2015-04-15 Thread Nathan Woodrow
Hey, QLR files are not style files they can't be loaded like that. Unfortunately the API for loading a QLR is broken in 2.8.1 but will be fixed in 2.8.2, however the logic isn't very complex and you can translate it to Python from C++. The source is here https://github.com/qgis/QGIS/blob/master/

Re: [Qgis-developer] How to load a QLR file with pyQGIS ?

2015-04-15 Thread Geo DrinX
Very strange :( I inserted also thetriggerRepaint() but nothing changes. This is my sourcecode: https://github.com/geodrinx/smartroadsense/blob/master/smartroadsense.py If I drag and drop in QGIS my "srs_data.qlr" file, it works. Instead, from python code, the style is not applie

[Qgis-developer] Processing: two PostGIS import tools

2015-04-15 Thread Paolo Cavallini
Hi all. I see in Processing there are two tools to import data into PostGIS. One (that based on OGR) seems much more efficient than the other. Is there a reason to keep the second? All the best. -- Paolo Cavallini - www.faunalia.eu QGIS & PostGIS courses: http://www.faunalia.eu/training.html _

[Qgis-developer] Customized VectorLayer for ArcGIS REST API Connector

2015-04-15 Thread Carmelo Schumacher
Hi Devs I am currently working on the "ArcGIS REST API Connector Plugin"[1] trying to find a way to use QgsVectorLayer. The webservice (callef "ArcGIS Feature Service") returns valid GeoJSON and the QgsVectorLayer's datasource url can point to the service that provides this GeoJSON (this is don

Re: [Qgis-developer] How to load a QLR file with pyQGIS ?

2015-04-15 Thread Gary Sherman
On 4/15/15 2:24 AM, Geo DrinX wrote: Hello, there is a way to load a QLR file with pyQGIS ? I tried using vlayer.loadNamedStyle(qlrFileName)but it seems not to work. What is the correct way ? That is the correct way. Have you done the following after applying the style?: vlayer

[Qgis-developer] Designing a plugin : TypeError raised on MacOS machines but not on Windows

2015-04-15 Thread Junior Delaz
Hi all, I'm testing a plugin I created with Plugin Builder on different platforms and encounter a problem I can't understand. The same piece of code works on Windows machines but not on MacOS ones where I get this error message. Traceback (most recent call last): File "/Users/harrissou/.qgis2/p

[Qgis-developer] How to load a QLR file with pyQGIS ?

2015-04-15 Thread Geo DrinX
Hello, there is a way to load a QLR file with pyQGIS ? I tried using vlayer.loadNamedStyle(qlrFileName)but it seems not to work. What is the correct way ? Thank you Roberto ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org h

Re: [Qgis-developer] PyQGIS script - asPoint() always returning "(0, 0)"

2015-04-15 Thread Jakob Lanstorp
I have seen this error when the table has geometries of multipoints and not points. If this is the case try to convert your multipoint layer to points. Jakob - Jakob Lanstorp -- View this message in context: http://osgeo-org.1560.x6.nabble.com/PyQGIS-script-asPoint-always-returning-0-0-tp5