Re: [Qgis-developer] Selection color in Composition

2017-01-20 Thread Nyall Dawson
On 21 January 2017 at 02:13, René-Luc Dhont  wrote:
> Hi devs,
>
> How the selection color is set in composition ?

It's not - compositions never show the selection.

I suspect it was this 3 year old commit which broke the server
behaviour: https://github.com/qgis/QGIS/commit/aaa7003 . This was done
to prevent accidental selections showing in exports from composer. My
guess is that this broke the selection behaviour in composer, but
given that there was no unit test and no-one has noticed it until now
I'm guessing this feature is not used often on server! (I didn't even
know it was something server supported)

>
> I found a regression in QGIS Server about selection in GetPrint request. I'd
> like to fix it but I don't know which commit has generated this regression.
> It is the reason of my question.

How is this supposed to work on server? Is the selection color
configurable? Does it affect all maps in a composition or do you
specify which map to show a selection in?

You'll probably need to do something like:

- add a Flag enum to QgsComposition, with a ShowSelection option
- Q_DECLARE_FLAGS this to a QgsComposition::Flags type
- Add a flags()/setFlags() option to composition so that server can
set the ShowSelection flag
- Make QgsComposerMap::mapSettings check the associated compositions
flags to determine whether the selection should be shown
- (If selection color is configurable) add a getter/setter to
QgsComposition to set the selection color

Nyall


>
> Regars,
> René-Luc
> ___
> 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] Problems in clipping lines with polygons

2017-01-20 Thread Paolo Cavallini
Il 20/01/2017 13:56, Giovanni Manghi ha scritto:
>> I am clipping lines with polygons, and I found issues:
>> * QGIS alg does not cut the line at the change of the polygon
>> * GDAL alg does not produce an output
> 
> they both work ok here on 2.14.11

Confirmed also for 2.14. It must have to do with layer validity, as I get:

GDAL command output:
ERROR 1: TopologyException: Input geom 1 is invalid: Self-intersection
at or near point 1591718.5859374921 4869828.5859374423 at
1591718.5859374921 4869828.5859374423
...

So, still the same old issue for gdal; what is strange is the behaviour
of QGIS.

All the best.
-- 
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

[Qgis-developer] Selection color in Composition

2017-01-20 Thread René-Luc Dhont

Hi devs,

How the selection color is set in composition ?

I found a regression in QGIS Server about selection in GetPrint request. 
I'd like to fix it but I don't know which commit has generated this 
regression. It is the reason of my question.


Regars,
René-Luc
___
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] Problems in clipping lines with polygons

2017-01-20 Thread Paolo Cavallini
Il 20/01/2017 13:56, Giovanni Manghi ha scritto:
>> I am clipping lines with polygons, and I found issues:
>> * QGIS alg does not cut the line at the change of the polygon
>> * GDAL alg does not produce an output
> 
> they both work ok here on 2.14.11

thanks giovanni for chacking
I'm on 2.18 here.
to be more clear, the attached is the result from QGIS clip.
all the best.

-- 
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] Problems in clipping lines with polygons

2017-01-20 Thread Giovanni Manghi
> I am clipping lines with polygons, and I found issues:
> * QGIS alg does not cut the line at the change of the polygon
> * GDAL alg does not produce an output

they both work ok here on 2.14.11

-- 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] Problems in clipping lines with polygons

2017-01-20 Thread Paolo Cavallini
Hi all,
I am clipping lines with polygons, and I found issues:
* QGIS alg does not cut the line at the change of the polygon
* GDAL alg does not produce an output
* GRASS v.overlay works fine.
Does anybody confirm?
All the best, and thanks.
-- 
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

[Qgis-developer] Getting data from another layer during digitizing

2017-01-20 Thread Paolo Cavallini
Hi all,
I have an interesting problem: I need to get, when digitizing a line,
some data from the closest line where the digitized line is snapped to.
Of course with a database this can be solved with a trigger, but in this
case I have to do it on shp (and it's an interesting exercise anyway).
I thought of using the default value for the field, getting it from an
expression finding the closest feature and getting the desired data from
it. This does not seem very easy to do, and I wonder if there is a
simpler method.
Thanks for any hint.
All the best.
-- 
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] Interrupt WFS request not working?

2017-01-20 Thread Paolo Cavallini
Il 19/01/2017 19:21, Even Rouault ha scritto:

> It is supposed to work. Do you reproduce that with a specific WFS
> endpoint (in which case which one?) or with all endpoints ?

Hi Even,
I tested again with a fast and stable connection, and it works as it
should. The context where i noticed the issue was possibly a corner
case, with a very slow connection (which BTW is where the Interrupt
would be most useful).
I'll see if I can replicate it more reliably.
Thanks.

-- 
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] Python bindings for "QgsMapToolCapture"

2017-01-20 Thread Bo Victor Thomsen

Hi Matthias -

Thanks for the tip and the hint :-)

Regards

Bo Victor



Den 19-01-2017 kl. 15:36 skrev Matthias Kuhn:

Hi Bo,

2.18.2 here:

from qgis.gui import QgsMapToolCapture
tool = QgsMapToolCapture()

Hint: You probably want to subclass QgsMapToolCapture

Matthias
On 01/19/2017 03:33 PM, Bo Victor Thomsen wrote:

To the QGIS developers (and not a newbie QGIS plugin developer like me) -

Is there a QGIS python binding for class "QgsMapToolCapture". Or do I
have to recreate the various point, line and polygon capture tools ?

My goal is to have 3 tools (point, line and polygon capture) available
though a QGIS plugin and show the capture -  result in the canvas using
QgsRubberBand. I can't find any documentations for the python bindings
for QgsMapToolCapture and I guess that they doesn't exist.

I refuse to believe I'm the only one having this problem - So:

   * Does the python bindings exist or not ?
   * If the first answer are "not": Is there some QGIS / qt / python
 based replacement for "QgsMapToolCapture" ??

Regards

Bo Victor Thomsen





___
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 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] Clipping by field

2017-01-20 Thread Niccolò Marchi
Hi devs,
I was looking for the possibility of iterating a clipping by field process but 
I saw that the only option is to use a script from the online collection (Cut 
by field).
On the web some old workarounds are proposed, but they mostly make use of 
direct programming or are related to arcgis 
(1,2).

What’s the idea behind making an alg become a core one? Due to teh fact that no 
other provider offers this functionality, could it be an idea to include that 
script among the core geoalgs avoiding the risk of losing it with some API 
breakage?

All the best,

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