Re: [QGIS-Developer] What to do about incorrect SAGA algorithms?

2019-03-07 Thread Nyall Dawson
On Wed, 6 Mar 2019 at 22:11, Giovanni Manghi  wrote:
>
> Hi Nyall,
>
>
>> > add some kind of warning (for the tools we know can have issue), do not 
>> > remove, please. After all we never removed (nor deprecated) the native 
>> > QGIS tools when we knew (sometimes since long)  that they were spitting 
>> > very wrong results...
>>
>> See above for my new proposal. But I'm not convinced by this argument
>> at all -- it's basically saying "let's accept bugs (and the user data
>> corruption and frustration which result from them) because we once had
>> other bugs so it's fair".
>
>
> ummm... no, I really didn't meant that. What I was thinking was that SAGA 
> served us well (and will still serve) when we could not really rely on some 
> QGIS native tools (that lead to data corruption/wrong results and user 
> frustration). Also thinking about moving on to newer (bug free) releases I 
> didn't liked the idea to see tools disappear from Processing even if we have 
> very good native tools now. Anyway this is now an already obsolete 
> consideration, the solution you already implemented is good to me.

Great, I think it's a fair compromise.

>
>>
>> I understand the background you're coming
>> from
>
>
> I genuinely do not understand what you mean :)

What I meant was just that I acknowledge that we've had issues in the
past, and understand that we do have work to do to "regain" trust in
these native algorithms.

Nyall


>
> 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

Re: [QGIS-Developer] Windows only version of a QGIS 2.18x plugin

2019-03-07 Thread Christina.Ratcliff
Hi Nathan,

I’ve just checked and still can’t see it.  I also removed the html for the 
about tab as well and that hasn’t worked either.

I have noticed that for other plugins version tab shows External dependencies 
is None, and Experimental is either Yes or No. ( ie 
https://plugins.qgis.org/plugins/processing_r/version/1.0.5/)

For PAT External dependencies is  Yes and Experimental is blank.

Could this be the issue?

Cheers,
Christina


From: Nathan Woodrow [mailto:madman...@gmail.com]
Sent: Friday, 8 March 2019 11:58 AM
To: Ratcliff, Christina (A, Waite Campus) 
Cc: QGIS Developer 
Subject: Re: [QGIS-Developer] Windows only version of a QGIS 2.18x plugin

Hey  Christina,

Yeah, it's a bit odd it's not showing up at all in the XML output.  I wonder if 
it was the HTML in the changelog as I can't see anything else that is 
different.  I have edit the changelog and removed the HTML to see if that picks 
it up.

Edited the changelog on this version for now to test that theory: 
https://plugins.qgis.org/plugins/pat/version/0.1.0/

On Fri, Mar 8, 2019 at 11:11 AM 
mailto:christina.ratcl...@csiro.au>> wrote:
Hi QGIS Developers,

I’m  following up on this issue which I posted last month. While it triggered  
a lot of discussion I never received a firm answer as to whether my PAT plugin 
could be hosted and made discoverable as a QGIS plugin on the official plugins 
site.

About a week ago I uploaded a new version of PAT for some bug fixes, and it 
remains unapproved. Is this likely to get approved so users can find and 
install it via the plugin manager?

I was interested to see that PAT v0.1.0 has now had 131 downloads directly from 
the QGIS repository so there is definitely an interest.  Currently version 
0.1.0 is showing on the website as being approved, but when I search for it in 
using the QGIS plugin manager, I can’t find it, even with the experimental 
option ticked on. Is there a reason for this?
Kind Regards,

Christina

PLEASE NOTE: The information contained in this email may be confidential or 
privileged. Any unauthorised use or disclosure is prohibited. If you have 
received this email in error, please delete it immediately and notify the 
sender by return email. Thank you. To the extent permitted by law, CSIRO does 
not represent, warrant and/or guarantee that the integrity of this 
communication has been maintained or that the communication is free of errors, 
virus, interception or interference.

___
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] Any gotchas related to working with QgsVectorLayer inside a QgsTask?

2019-03-07 Thread Nyall Dawson
On Wed, 6 Mar 2019 at 02:56, Tejas L  wrote:
>
> Hello Team,
>
> I know that the UI must not be updated from the QgsTask.run() method. Are 
> there any similar restrictions on loading QgsVectorLayer from a file or 
> creating new layers from QgsTask.run() ?

Some. For a start, you CAN'T utilise a map layer (or its data
provider) created in the main thread in a background thread safely.
(This applies to all layer methods, not just edits/etc). But if you
create a NEW layer within a thread, you should be fine to utilise that
layer WITHIN that thread.

Now - the complexity comes if you want to "hand back" that layer to
the main thread when you're done with using it in the task (e.g. to
add to the QgsProject, which belongs in the main thread). You need to
first push the layer from the background thread into the main thread,
and then when you're back in the main thread you can take this layer
and add it to your project. Something like:

from background thread:

layer.pushToThread( QCoreApplication.thread() )
# don't do ANYTHING else with this layer in the background thread now!


when back in main thread:
QgsProject.instance().addMapLayer(layer)
...

Note that this same principal applies to all QObject subclasses, and
that you CANNOT "pull" an object from a different thread to the
current thread (i.e. you can PUSH from the current thread to another
thread, but you MUST be within that thread. You can't just snatch an
object from a different thread and try to push it to the current
thread).

Nyall

>
> I find that some operations on a GPKG layer do not work as expected when run 
> from a QgsTask.
> These operations work fine when they are done from a foreground thread.
>
> Example:
>
> class MyTask(QgsTask)
> ...
> def run(self):
>self.layer = QgsVectorLayer("geom.gpkg", "test_geom", "ogr")
>
> def finished(self, res):
>if self.layer.isValid():
>QgsProject.instance().addMapLayer(self.layer)# Layer loads, but 
> attribute table is not editable
>
> --
> On the other hand, the following works just as expected. The attribute table 
> is editable.
>
> layer = QgsVectorLayer("geom.gpkg", "test_geom", "ogr")
> QgsProject.instance().addMapLayer(layer)   # Layer loads and attribute table 
> is editable.
>
> What are the best practices for working with a QgsVectorLayer from within a 
> QgsTask?
>
> Regards,
> Tej
>
>
>
>
> ___
> 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] line_substring start- and end distance

2019-03-07 Thread Nyall Dawson
On Thu, 7 Mar 2019 at 19:12, Simon Gröchenig
 wrote:
>
> Hi all,
>
> I have a question concerning the line_substring and recently updated $length 
> expressions. I have a linestring (EPSG:4326) and a relative start- and 
> end-offset (in %) and I want to create the sub linestring. The start- and end 
> distances at the line_substring expression should be set in projection units 
> (e.g. degrees in EPSG:4326). With the previous behaviour of $length, I 
> multiplied the relative offset (in %) with the (planimetric) length to 
> calculate those distances. See the following example:
>
> geom_to_wkt(line_substring( geom_from_wkt('LINESTRING(13 46, 15 46)'),  0.4* 
> $length, 0.6* $length))  // $length => 2.0
>
> results in
>
> LINESTRING(13.8 46, 14.2 46)
>
> With the latest release (3.6.0-1 und 3.4.5-1), the $length expression 
> correctly calculates the ellipsoidal length 
> (https://issues.qgis.org/issues/19355) and I cannot use the above expression. 
> Is there a way to use relative distances in the line_substring function? Or 
> is there an alternative to calculate the planimetric length (without 
> implementing my own function)?

Yes -- the "length(...)" function always gives a purely Cartesian
length for a geometry. Using "length($geometry)" should give you what
you want.

Nyall
___
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 to do about incorrect SAGA algorithms?

2019-03-07 Thread Nyall Dawson
On Fri, 8 Mar 2019 at 07:21, Rainer Hurling  wrote:
>
> Hi Nyall,
>
> Thanks for this new plugin. It would be nice, if we could use this
> plugin for SAGA GIS >= 7.2., because some of us use SAGA GIS 7.3.0
> (devel version).
>

Good point! Can you file a bug ticket on the plugin page and I'll look
into this. Should be a matter of just removing the == part of the
check and replace with a >= part.

Nyall

> Many thanks in advance and best wishes,
> Rainer Hurling
>
>
> Am 05.03.19 um 02:45 schrieb Nyall Dawson:
> > On Tue, 5 Mar 2019 at 09:36, Nyall Dawson  wrote:
> >>
> >> 2. Copy the saga provider to a NEW "saga-next gen" plugin based
> >> provider, which targets the current SAGA v7 .2 release ONLY. This
> >> would be a community-maintained plugin (although, as a once off
> >> goodwill gesture I'm willing to do the initial plugin setup and host
> >> it on a North Road github repo). This plugin could be installed
> >> alongside the inbuilt SAGA LTR provider without issue, but it would
> >> NOT be included in a default QGIS install and users would have to
> >> manually install it via the plugin installer.
> >
> > Here's an (experimental) working version:
> > https://plugins.qgis.org/plugins/processing_saga_nextgen/
> >
> > Seems to be working ok for the couple of algorithms I've run it with,
> > but definitely experimental only for now ;)
> >
> > Nyall
> >
> >
> >>
> >> I think this approach is the best solution when could get given the
> >> constraints we are working around.
> >>
> >> Nyall
___
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] Windows only version of a QGIS 2.18x plugin

2019-03-07 Thread Nathan Woodrow
Hey  Christina,

Yeah, it's a bit odd it's not showing up at all in the XML output.  I
wonder if it was the HTML in the changelog as I can't see anything else
that is different.  I have edit the changelog and removed the HTML to see
if that picks it up.

Edited the changelog on this version for now to test that theory:
https://plugins.qgis.org/plugins/pat/version/0.1.0/

On Fri, Mar 8, 2019 at 11:11 AM  wrote:

> Hi QGIS Developers,
>
>
>
> I’m  following up on this issue which I posted last month. While it
> triggered  a lot of discussion I never received a firm answer as to whether
> my PAT plugin could be hosted and made discoverable as a QGIS plugin on the
> official plugins site.
>
>
>
> About a week ago I uploaded a new version of PAT for some bug fixes, and
> it remains unapproved. Is this likely to get approved so users can find and
> install it via the plugin manager?
>
>
>
> I was interested to see that PAT v0.1.0 has now had 131 downloads directly
> from the QGIS repository so there is definitely an interest.  Currently
> version 0.1.0 is showing on the website as being approved, but when I
> search for it in using the QGIS plugin manager, I can’t find it, even with
> the experimental option ticked on. Is there a reason for this?
>
> Kind Regards,
>
>
>
> Christina
>
>
> PLEASE NOTE: The information contained in this email may be confidential
> or privileged. Any unauthorised use or disclosure is prohibited. If you
> have received this email in error, please delete it immediately and
> notify the sender by return email. Thank you. To the extent permitted by
> law, CSIRO does not represent, warrant and/or guarantee that the integrity
> of this communication has been maintained or that the communication is free
> of errors, virus, interception or interference.
>
>
> ___
> 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] Windows only version of a QGIS 2.18x plugin

2019-03-07 Thread Christina.Ratcliff
Hi QGIS Developers,

I'm  following up on this issue which I posted last month. While it triggered  
a lot of discussion I never received a firm answer as to whether my PAT plugin 
could be hosted and made discoverable as a QGIS plugin on the official plugins 
site.

About a week ago I uploaded a new version of PAT for some bug fixes, and it 
remains unapproved. Is this likely to get approved so users can find and 
install it via the plugin manager?

I was interested to see that PAT v0.1.0 has now had 131 downloads directly from 
the QGIS repository so there is definitely an interest.  Currently version 
0.1.0 is showing on the website as being approved, but when I search for it in 
using the QGIS plugin manager, I can't find it, even with the experimental 
option ticked on. Is there a reason for this?
Kind Regards,

Christina

PLEASE NOTE: The information contained in this email may be confidential or 
privileged. Any unauthorised use or disclosure is prohibited. If you have 
received this email in error, please delete it immediately and notify the 
sender by return email. Thank you. To the extent permitted by law, CSIRO does 
not represent, warrant and/or guarantee that the integrity of this 
communication has been maintained or that the communication is free of errors, 
virus, interception or interference.

___
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 to do about incorrect SAGA algorithms?

2019-03-07 Thread Rainer Hurling
Hi Nyall,

Thanks for this new plugin. It would be nice, if we could use this
plugin for SAGA GIS >= 7.2., because some of us use SAGA GIS 7.3.0
(devel version).

Many thanks in advance and best wishes,
Rainer Hurling


Am 05.03.19 um 02:45 schrieb Nyall Dawson:
> On Tue, 5 Mar 2019 at 09:36, Nyall Dawson  wrote:
>>
>> 2. Copy the saga provider to a NEW "saga-next gen" plugin based
>> provider, which targets the current SAGA v7 .2 release ONLY. This
>> would be a community-maintained plugin (although, as a once off
>> goodwill gesture I'm willing to do the initial plugin setup and host
>> it on a North Road github repo). This plugin could be installed
>> alongside the inbuilt SAGA LTR provider without issue, but it would
>> NOT be included in a default QGIS install and users would have to
>> manually install it via the plugin installer.
> 
> Here's an (experimental) working version:
> https://plugins.qgis.org/plugins/processing_saga_nextgen/
> 
> Seems to be working ok for the couple of algorithms I've run it with,
> but definitely experimental only for now ;)
> 
> Nyall
> 
> 
>>
>> I think this approach is the best solution when could get given the
>> constraints we are working around.
>>
>> Nyall
___
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 3, pygis 101 Styling QgsPointClusterRenderer

2019-03-07 Thread Tom Chadwin
Is it that the symbol you set has to be a QgsMarkerSymbol, not just a
QgsSymbol?

Tom



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
___
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] QGIS 3, pygis 101 Styling QgsPointClusterRenderer

2019-03-07 Thread wambacher
Hi,

using QgsPointClusterRenderer() as renderer is working fine, but i can't
style it.

The old renderers are having arguments like "symbol"

symbol = QgsSymbol.defaultSymbol(pgLayer.geometryType())
symbol.setColor(QtGui.QColor.fromRgb(255,0,0))
symbol.setSize(4)

pgRenderer = pgLayer.setRenderer(QgsSingleSymbolRenderer(symbol))

and that is still running.

But the new renderers like PointCluster don't. There must be another way
(methods?) to configure that.

pgRenderer2 = pgLayer.setRenderer(QgsPointClusterRenderer()) 

pgRenderer2.setClusterSymbol(symbol)  # gives errors.

Searched for hours but can't solve that.

regards
walter


-- 
My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
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 [1644] SocialActivity approval notification.

2019-03-07 Thread noreply

Plugin SocialActivity approval by pcav.
The plugin version "[1644] SocialActivity 1.0" is now approved
Link: http://plugins.qgis.org/plugins/SocialActivity/
___
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 [1669] EnMAP-Box 3 approval notification.

2019-03-07 Thread noreply

Plugin EnMAP-Box 3 approval by pcav.
The plugin version "[1669] EnMAP-Box 3 3.3.20190303T2010.develop Experimental" 
is now approved
Link: http://plugins.qgis.org/plugins/enmapboxplugin/
___
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 [1667] Open ICGC approval notification.

2019-03-07 Thread noreply

Plugin Open ICGC approval by pcav.
The plugin version "[1667] Open ICGC 0.1b Experimental" is now approved
Link: http://plugins.qgis.org/plugins/OpenICGC/
___
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] QGIS-Kerning-Errors in HTML with small font sizes?

2019-03-07 Thread Elstermann, Mike
(Sorry, maybe the wrong list, but QGIS user didn't get an answer, so I try here)



Hello, everybody,



when I use mass text with different markups (font attributes) over HTML text, 
kerning errors occur especially with small but necessary font sizes, i.e. the 
spacing becomes incorrect. The screenshot [1] should illustrate this. It is 
simple HTML (on the right). The errors occur equally in QGIS 2.14 and 3.2. Does 
anyone have an idea or a workaround?  What other possibilities are there for 
mass text with different attributes?



Here is my Test-HTML:



August-Hermann-Francke

August-Hermann-Francke

August-Hermann-Francke

August-Hermann-Francke



August-Hermann-Francke

August-Hermann-Francke



August-Hermann-Francke

August-Hermann-Francke



Thanks, mikeE.



[1] ... http://www.geoobserver.de/QGIS-Kerning-Error_1.png

___
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] line_substring start- and end distance

2019-03-07 Thread Simon Gröchenig

Hi all,

I have a question concerning the line_substring and recently updated 
$length expressions. I have a linestring (EPSG:4326) and a relative 
start- and end-offset (in %) and I want to create the sub linestring. 
The start- and end distances at the line_substring expression should be 
set in projection units (e.g. degrees in EPSG:4326). With the previous 
behaviour of $length, I multiplied the relative offset (in %) with the 
(planimetric) length to calculate those distances. See the following 
example:


geom_to_wkt(line_substring( geom_from_wkt('LINESTRING(13 46, 15 46)'),  
0.4* $length, 0.6* $length))  // $length => 2.0


results in

LINESTRING(13.8 46, 14.2 46)

With the latest release (3.6.0-1 und 3.4.5-1), the $length expression 
correctly calculates the ellipsoidal length 
(https://issues.qgis.org/issues/19355) and I cannot use the above 
expression. Is there a way to use relative distances in the 
line_substring function? Or is there an alternative to calculate the 
planimetric length (without implementing my own function)?


Thanks for your help

Simon

___
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