[QGIS-Developer] Plugin [1235] View Attributes approval notification.

2017-05-09 Thread noreply

Plugin View Attributes approval by pcav.
The plugin version "[1235] View Attributes 0.1b Experimental" is now approved
Link: http://plugins.qgis.org/plugins/viewAttributes/
___
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 [1235] View Attributes approval notification.

2017-05-09 Thread noreply

Plugin View Attributes approval by pcav.
The plugin version "[1235] View Attributes 0.1c Experimental" is now approved
Link: http://plugins.qgis.org/plugins/viewAttributes/
___
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 [740] qgis2web approval notification.

2017-05-09 Thread noreply

Plugin qgis2web approval by pcav.
The plugin version "[740] qgis2web 2.17.0" is now approved
Link: http://plugins.qgis.org/plugins/qgis2web/
___
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] Handling different GDAL versions in PyQGIS

2017-05-09 Thread Tom Chadwin
Hello all

An issue I face is different users' different GDAL versions meaning making
Processing GDAL calls in a plugin difficult, as you have to get the
arguments right:

https://github.com/tomchadwin/qgis2web/blob/v2.17.0/utils.py#L314

I've got these different argument lists wrapped in try: blocks, but was
wondering if a different approach might be better. If I call, for example,
processing.runalg("gdalogr:warpreproject") without arguments from the
console, I get an error back:

Error: Wrong number of parameters
ALGORITHM: Warp (reproject)
INPUT 
SOURCE_SRS 
DEST_SRS 
NO_DATA 
TR 
METHOD 
RAST_EXT 
EXT_CRS 
RTYPE 
COMPRESS 
JPEGCOMPRESSION 
ZLEVEL 
PREDICTOR 
TILED 
BIGTIFF 
TFW 
EXTRA 
OUTPUT 


METHOD(Resampling method)
0 - near
1 - bilinear
2 - cubic
3 - cubicspline
4 - lanczos
RTYPE(Output raster type)
0 - Byte
1 - Int16
2 - UInt16
3 - UInt32
4 - Int32
5 - Float32
6 - Float64
COMPRESS(GeoTIFF options. Compression type:)
0 - NONE
1 - JPEG
2 - LZW
3 - PACKBITS
4 - DEFLATE
BIGTIFF(Control whether the created file is a BigTIFF or a classic TIFF)
0 - 
1 - YES
2 - NO
3 - IF_NEEDED
4 - IF_SAFER

Can I rely on getting this kind of output from all GDAL versions? If so, I
can try to figure out the best way to parse out the arguments it needs, and
supply them.

Should this work?

Thanks

Tom



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Handling-different-GDAL-versions-in-PyQGIS-tp5319952.html
Sent from the QGIS - Developer mailing list archive at Nabble.com.
___
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] Troubles with Python init script for forms

2017-05-09 Thread Neumann, Andreas
Hi, 

Problem solved. I forgot to specify the "Function Name" in the widget.
After doing that, it works fine. 

On the other issue: it seems like it "autoloads" the code every time I
did some changes in the code. So that seems to work well either. 

Andreas 

On 2017-05-08 17:40, Neumann, Andreas wrote:

> Hi, 
> 
> It's been a long time since I last wrote python init scripts for forms. 
> 
> Now I have troubles writing even the simplest code. Nothing happens if I 
> click on a feature. The form opens, but no error messages and no reaction to 
> my code ... This is on QGIS 2.18.7. I use the mode "Provide code in this 
> dialog" and add the code in the "Python init code" widget of the "Fields" 
> tab. 
> 
> Below is my really simple code that should write something to the message bar 
> when the form is loaded: 
> 
> -- 
> 
> # -*- coding: utf-8 -*-
> """
> QGIS-Formulare können eine Python-Funktion haben, die beim Öffnen des 
> Formulars gestartet wird. 
> 
> Hier kann dem Formular Extra-Logik hinzugefügt werden. 
> 
> Der Name der Funktion wird im Feld "Python-Init-Function" angegeben.
> Ein Beispiel:
> """
> from PyQt4.QtGui import QWidget
> 
> def my_form_open(dialog, layer, feature):
> msgBar = iface.messageBar()
> msgBar.pushInfo("Message from init script: ","Hi There") 
> 
>  
> 
> My other question: 
> 
> If I change the code in the "Fields" widget - would it "auto-load" or do I 
> have to do something to trigger a reload of the script? 
> 
> -- 
> 
> Thank you for your help, 
> 
> Andreas 
> 
> ___
> 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 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] [Qgis-developer] Processing toolbox SAGA not working

2017-05-09 Thread roy roy
Thanks for the helpful info Giovanni!



Il 04/05/2017 21:40, Giovanni Manghi ha scritto:
> Hi,
>
>
>
>> i'm experiencing problems with saga
>>
>> in processing toolbox, SAGA modules they do
>>
>> not work, it seems like SAGA have been updated (2.3.1)
>>
>> but processing is not longer compatible with the new
>>
>> version, is this true or do I have a specific problem with
>>
>> my setup ?
>
> yes, there are known issues. If you use Windows/osgeo4w for now is
> better to stick with SAGA 2.1.2 (from osgeo4w)
>
> https://issues.qgis.org/issues/16423
>
> the above issue is not a Processing one, but rather a packing one.
>
> cheers!
>
> -- G --
> ___
> 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 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] [attributetable] #15803 "Sort on Top" regression or feature ?

2017-05-09 Thread Luigi Pirelli
Hi devs

***In short:
The sortOrder value in QgsProject section:



can be any value for some reason (e.g. flexibility for the future) or
it is a bug?

I would ask to especially to Nyall that git blames is the author of
this section:
https://github.com/qgis/QGIS/blob/master/src/core/qgsattributetableconfig.cpp#L200

***Details:
during hackmeeting I also worked on:
https://issues.qgis.org/issues/15803

in the team we had problem replicating the issue on QGIS 3.x so we
discovered that the origin of the problem is in
QgsAttributeTableConfig saved in Layer style section of the qgis
project.

here an example of a project I had with wrong values

  

  
  
  
  

  

the value is casted to Qt:SortOrder enum with:
https://github.com/qgis/QGIS/blob/master/src/core/qgsattributetableconfig.cpp#L200

that is undefined in case sortOrder value does not belong to the enum
range, but in the implementation the value is leaved to 158 (as in the
example)

This generate some side effects in the attribute table => the
sortOnTop button does not work because of:
https://github.com/qgis/QGIS/blob/master/src/gui/attributetable/qgsattributetablefiltermodel.cpp#L53
and
https://github.com/qgis/QGIS/blob/master/src/gui/attributetable/qgsattributetablefiltermodel.cpp#L57

that obviously returns always false

The actual patch in:
2.18 - https://github.com/qgis/QGIS/pull/4306
3.x - https://github.com/qgis/QGIS/pull/

protect the attribute table from having wrong sortOrder values, but
does not try to fix it's value in AttributeTable config that can be a
value set for some reason by the user or other components.

***Workaroud
a simple workaround is apply a column sort and save the project to fix
the wrong value

Luigi Pirelli

**
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS 2nd Edition:
* 
https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
**
___
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 [1213] BoundingBox approval notification.

2017-05-09 Thread noreply

Plugin BoundingBox approval by pcav.
The plugin version "[1213] BoundingBox 1.1" is now approved
Link: http://plugins.qgis.org/plugins/BoundingBox/
___
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] What are best graph possibilities in QGIS

2017-05-09 Thread Luigi Pirelli
from your land (but UE financed) you can also explore this python lib
to prepare graphs (depepnding on dataset size)

http://vaex.astro.rug.nl/
Luigi Pirelli

**
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS 2nd Edition:
* 
https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
**


On 8 May 2017 at 16:47, Richard Duivenvoorde  wrote:
>
> Hi,
>
> wanting to create a nice looking graph (widget) in QGIS, I wonder what
> the options are, and if there is some common consensus on what is the
> best option for the near future:
>
> I know of (seen used in Mutant plugin):
> - qwt
> - mathplot lib
> But these look a little crude...
>
> Another option would be to create the graph(s) via javascript using some
> kind of javascript lib and show the image or html in a web widget.
> Or maybe even a create custom dedicated d3js widget?
>
> Do 'we' (as the community) have a stand in this?
> Is one option more future proof (for QGIS) then others?
>
> Regards and thanks for any input,
>
> Richard Duivenvoorde
> ___
> 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 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] What are best graph possibilities in QGIS

2017-05-09 Thread Paolo Cavallini
Il 09/05/2017 12:44, Martin Dobias ha scritto:

> Aprart from the libraries mentioned above, I believe for a future
> proof code (QGIS >= 3) the choice should be the Qt Charts library. It
> used to be distributed separately under commercial license, but since
> Qt 5.8 (IIRC) it is included in standard Qt5 distribution with open
> source license. This library has the advantage of being native to the
> Qt ecosystem and it seems to be quite powerful as well.

Indeed:
http://doc.qt.io/qt-5/qtcharts-examples.html
Thanks Martin.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
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] What are best graph possibilities in QGIS

2017-05-09 Thread Richard Duivenvoorde
On 09-05-17 12:44, Martin Dobias wrote:
> Hi Richard
> 
> On Mon, May 8, 2017 at 10:47 PM, Richard Duivenvoorde
>  wrote:
>>
>> Do 'we' (as the community) have a stand in this?
>> Is one option more future proof (for QGIS) then others?
> 
> Aprart from the libraries mentioned above, I believe for a future
> proof code (QGIS >= 3) the choice should be the Qt Charts library. It
> used to be distributed separately under commercial license, but since
> Qt 5.8 (IIRC) it is included in standard Qt5 distribution with open
> source license. This library has the advantage of being native to the
> Qt ecosystem and it seems to be quite powerful as well.


Thanks all for the libs and tips :-)

@Martin: I will have a look at Qt-graph, I think it is best to keep
close to our core libs. But not sure if it will soon be available in
repo's/distro's including the python bindings.

Besides this I'm doing this as part of a larger QGIS 2.x plugin, so will
eventually probably have to use both ways.

Regards,

Richard Duivenvoorde

___
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] What are best graph possibilities in QGIS

2017-05-09 Thread Martin Dobias
Hi Richard

On Mon, May 8, 2017 at 10:47 PM, Richard Duivenvoorde
 wrote:
>
> Do 'we' (as the community) have a stand in this?
> Is one option more future proof (for QGIS) then others?

Aprart from the libraries mentioned above, I believe for a future
proof code (QGIS >= 3) the choice should be the Qt Charts library. It
used to be distributed separately under commercial license, but since
Qt 5.8 (IIRC) it is included in standard Qt5 distribution with open
source license. This library has the advantage of being native to the
Qt ecosystem and it seems to be quite powerful as well.

Cheers
Martin
___
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] What are best graph possibilities in QGIS

2017-05-09 Thread G. Allegri
I agree that (Py)QtChart is the way to go. Recently I did some proof of
concepts starting from this simple example:
https://github.com/PierreRaybaut/plotpy/wiki/Using-Qt-Charts-(PyQtChart)-to-plot-curves-efficiently-in-Python
!

giovanni

Il 9 mag 2017 12:52, "Richard Duivenvoorde"  ha
scritto:

> On 09-05-17 12:44, Martin Dobias wrote:
> > Hi Richard
> >
> > On Mon, May 8, 2017 at 10:47 PM, Richard Duivenvoorde
> >  wrote:
> >>
> >> Do 'we' (as the community) have a stand in this?
> >> Is one option more future proof (for QGIS) then others?
> >
> > Aprart from the libraries mentioned above, I believe for a future
> > proof code (QGIS >= 3) the choice should be the Qt Charts library. It
> > used to be distributed separately under commercial license, but since
> > Qt 5.8 (IIRC) it is included in standard Qt5 distribution with open
> > source license. This library has the advantage of being native to the
> > Qt ecosystem and it seems to be quite powerful as well.
>
>
> Thanks all for the libs and tips :-)
>
> @Martin: I will have a look at Qt-graph, I think it is best to keep
> close to our core libs. But not sure if it will soon be available in
> repo's/distro's including the python bindings.
>
> Besides this I'm doing this as part of a larger QGIS 2.x plugin, so will
> eventually probably have to use both ways.
>
> Regards,
>
> Richard Duivenvoorde
>
> ___
> 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 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] GPS Stream Plugin Crashing QGIS

2017-05-09 Thread Joshua Quesenberry
Greetings Everyone,

 

I'm playing around with a plugin that's supposed to receive GPS Data over a
TCP socket and then once a new point is received the Vector Memory/Scratch
Layer has all features removed and a new Point feature added. I have a
worker thread running that processes the incoming TCP socket data (rate of
about 10 Hz) and then runs a function called addPoint. Currently the plugin
works great if I don't call addPoint and just print the contents of the
received message. Once I add in the addPoint function, however, the plugin
works for a bit (30-60 seconds) and then QGIS crashes.

 

My addPoint function is as follows:

 

def addPoint(self, point):

self.layer.startEditing()

caps = self.layer.dataProvider().capabilities()

if caps & QgsVectorDataProvider.DeleteFeatures:

for feat in self.layer.getFeatures():

self.layer.deleteFeature(feat.id())

if caps & QgsVectorDataProvider.AddFeatures:

feat = QgsFeature(self.layer.pendingFields())

feat.setGeometry(QgsGeometry.fromPoint(point))

(res, outFeats) = self.layer.dataProvider().addFeatures([feat])

self.layer.commitChanges()

 

Perhaps the issue is because I'm entering/exiting Edit mode so often (10
Hz)? Is there a more efficient method to accomplish what I'm doing? Or maybe
it's some sort of threading conflict?

 

Thanks,

 

Josh Q

___
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