Re: [Qgis-user] Rule-based symbol for point within polygon in QGIS

2021-08-30 Thread Jeanneret Cédric
Thank you very much Stefan, it works !

I couldn't find the correct syntax, and didn't know the difference between the 
expression parameter and the filter parameter.

I posted that question on stack.exchange earlier : I wanted to use your answer 
to respond to my initial post. Tell me please if you mind.

Here's the link
https://gis.stackexchange.com/questions/409455/rule-based-symbol-for-point-within-polygon-in-qgis


Cédric Jeanneret

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread Andrea Giudiceandrea

Nicolas Cadieux Mon, 30 Aug 2021 04:27:27 -0700
This is the plugin I was referring to.  I don’t see it in the current plugins 
(experimental turned on)  so I figured it’s QGIS 2 only.


https://github.com/ArMoraer/QGISMergeLines


Hi Nicolas,
I've ported that plugin to QGIS3.

You could download and install the new plugin version (hopefully working 
without issues on QGIS 3.16) from 
https://github.com/agiudiceandrea/QGISMergeLines


Anyway, I don't think it does what you need.

Regards.

Andrea
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread Nicolas Cadieux

Thanks Charles,

This will be very useful. Nice to know I'am not the only one going crazy 
with this!!!


Nicolas

On 2021-08-30 4:42 p.m., Charles Dixon-Paver wrote:
I thought this would be easily solved with an expression but sadly I 
haven't been able to get reliable results at all.


My first thought was 
collect($geometry,filter:=intersects($geometry,geometry(@parent))) and 
when that didn't work I tried various aggregates and union operations 
to no avail. Something like this might be useful if you can get it 
into a usable form (I managed to get various multigeometries in the 
form you are looking for but wasn't able to do much with them and 
there seemed to be artifacts):


collect_geometries(array_foreach(aggregate(layer:='lines',aggregate:='array_agg',expression:=$geometry,filter:=intersects($geometry,geometry(@parent))),@element))

I was actually waiting for someone else to come up with a more elegant 
solution, but it would probably also be possible to identify 
intersecting features and get the minimum/ maximum feature id for 
intersecting features with this:


aggregate(layer:='lines',
aggregate:='min',
expression:="fid",
filter:=intersects($geometry,geometry(@parent)))

You could use that in the field calculator to create a field for 
"grouping" various intersecting features to dissolve on, however it's 
only going to identify the minimum of the currently intersecting 
features so you would need to iterate through the process multiple 
times. I can't think of an effective way to implement a "while" 
conditional either.


It's a pretty clanky way to do it, but if you are really struggling I 
think it's possible.


On Mon, 30 Aug 2021 at 22:10, Nicolas Cadieux 
mailto:njacadieux.git...@gmail.com>> wrote:


Hi,

Seems like the plugin is available so I will try it out.  The
ability to create multi-linestring out of any touching lines
(touch here means intersects at the first or last node) would be
nice to have it if I can include it in a model.

My goal is for this model to work for anyone with a basic install
of QGIS LTR or 3.20 with minimal efforts so I am trying to
eliminate the need to rely on external plugins or scripts.

This is also my first attempt with models. It’s a learning curve
but I am having fun… I think this probably should have been a
plugin but my knowledge of GUI programming is basically 0.  That
will be for a next project…

Nicolas Cadieux
https://gitlab.com/njacadieux 


Le 30 août 2021 à 14:59, David Strip mailto:qgis-u...@stripfamily.net>> a écrit :

 I looked at the source for this plug-in and as far as I can
tell  it only merges lines that meet at endpoints. It ignores
multi-lines, and only creates linestrings, so there are no
vertices of degree >2 (ie, no junctions/forks). Also, the plug-in
doesn't look for intersections between vertices (since it only
looks to merge endpoints.)
The StackExchange post appears to want multi-linestrings, which
gives forks and such. Is that what you need?

On 8/30/2021 5:27 AM, Nicolas Cadieux wrote:

Hi,
This is the plugin I was referring to.  I don’t see it in the
current plugins (experimental turned on)  so I figured it’s QGIS
2 only.

https://github.com/ArMoraer/QGISMergeLines


Nicolas Cadieux
https://gitlab.com/njacadieux 




___
Qgis-user mailing list
Qgis-user@lists.osgeo.org 
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



--
Nicolas Cadieux
https://gitlab.com/njacadieux

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Issue using Symbology Style

2021-08-30 Thread Nuno Manuel de Figueiredo de Santos Loureiro
Hello all,

I'm producing a LCLU map and I 've created Symbols with Colours and Font 
Markers. Units are always configured as 'Map Units'.

In some of the polygons the letters appear and disappear when the scale 
changes. The same happens when I prepare Layouts. Depending on the scale being 
used, the letters are either visible or invisible. This does not happen on all 
polygons. It only happens in some...

Can anyone give suggestions on the cause of this problem, and how to solve it?

Very grateful in advance!


Nuno
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] QGIS 3.20 odense freezing, ubuntu error messages

2021-08-30 Thread abisheridee
Hi all,

I hope you can help me, I'm only a shallow user of QGIS but I'm in the
middle of writing my thesis and really need to produce some maps!!

I use ubuntu 20.04, and when I opened QGIS for the first time in a while I
saw it had updated. Version 3.16 worked perfectly and I had little to no
freezing problems. However now it's totally unusable, freezes immediately
on opening a layer or even browsing files to open. I've tried uninstalling,
purging, and reinstalling but that doesn't seem to work.

When I ask ubuntu to update I get this error, even after I've
uninstalled/purged QGIS

"N: Skipping acquisition of configured file 'main/binary-i386/Packages', as
repository 'https://qgis.org/ubuntu focal InRelease' doesn't support
architecture 'i386'
N: Skipping acquisition of configured file 'main/binary-i386/Packages', as
repository 'https://qgis.org/debian focal InRelease' doesn't support
architecture 'i386'"

To install I follow the instructions on the QGIS site so I'm not doing
anything weird. This all started after the automatic update. Please let me
know if you need more info, I'm not confident with any of this so please
explain to me like I'm an idiot.

Thanks
Abi
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] QGIS 3.20 odense freezing, ubuntu error messages

2021-08-30 Thread Randal Hale

Try this:

go to /etc/apt/sources.list and look for your qgis.list file

Open it using your favorite editing program and add  [arch=amd64] (and 
this is mine for hirsuite):


deb [arch=amd64] https://qgis.org/ubuntu hirsute main

See if that works for you.

Randy

On 8/30/21 1:27 PM, abisheridee wrote:

Hi all,

I hope you can help me, I'm only a shallow user of QGIS but I'm in the 
middle of writing my thesis and really need to produce some maps!!


I use ubuntu 20.04, and when I opened QGIS for the first time in a 
while I saw it had updated. Version 3.16 worked perfectly and I had 
little to no freezing problems. However now it's totally unusable, 
freezes immediately on opening a layer or even browsing files to open. 
I've tried uninstalling, purging, and reinstalling but that doesn't 
seem to work.


When I ask ubuntu to update I get this error, even after I've 
uninstalled/purged QGIS


"N: Skipping acquisition of configured file 
'main/binary-i386/Packages', as repository 'https://qgis.org/ubuntu 
 focal InRelease' doesn't support 
architecture 'i386'
N: Skipping acquisition of configured file 
'main/binary-i386/Packages', as repository 'https://qgis.org/debian 
 focal InRelease' doesn't support 
architecture 'i386'"


To install I follow the instructions on the QGIS site so I'm not doing 
anything weird. This all started after the automatic update. Please 
let me know if you need more info, I'm not confident with any of this 
so please explain to me like I'm an idiot.


Thanks
Abi


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


--
---
Randal Hale
rjh...@northrivergeographic.com
https://www.northrivergeographic.com
(423)653-3611

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [QGIS-it-user] Funzione "Aggregate" con espressione algebrica

2021-08-30 Thread Andrea Giudiceandrea

Il 30/08/2021 17:01, Fabio Pifferini ha scritto:

expression:=length(intersection(geometry(@parent), $geometry)) * ‘costo’,


Ciao Fabio,
i nomi dei campi vanno indicati fra doppi apici (o anche senza alcun 
apice, ma è sempre meglio usarli per evitare ambiguità) e non fra 
singoli apici.


Quindi dovresti riscrivere l'espressione come:
length(intersection(geometry(@parent), $geometry)) * "costo"

A presto.

Andrea
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [Qgis-user] QGIS 3.20 odense freezing, ubuntu error messages

2021-08-30 Thread Charles Dixon-Paver
Hey there, step one for troubleshooting is that you can try a new user
profile.

To create a new profile, go to Settings >> User Profiles >> New User Profile

Alternatively you can remove your existing user profile from the
home directory (on ubuntu usually
~/.local/share/QGIS/QGIS3/profiles/yourprofilename/). You can also find it
by using Open Active Profile Folder from the user profile menu in QGIS.

User profiles store configuration, plugins, and other user specific
settings and resources, so resetting tends to fix most issues.

Profiles are distinct from the QGIS version, so you could, for example,
have a plugin or resource not compatible with the newer QGIS version and
removing it would help resolve your stability problems. There is always a
chance that something else is wrong, but it's a good place to start.

Regards

On Mon, 30 Aug 2021 at 19:27, abisheridee 
wrote:

> Hi all,
>
> I hope you can help me, I'm only a shallow user of QGIS but I'm in the
> middle of writing my thesis and really need to produce some maps!!
>
> I use ubuntu 20.04, and when I opened QGIS for the first time in a while I
> saw it had updated. Version 3.16 worked perfectly and I had little to no
> freezing problems. However now it's totally unusable, freezes immediately
> on opening a layer or even browsing files to open. I've tried uninstalling,
> purging, and reinstalling but that doesn't seem to work.
>
> When I ask ubuntu to update I get this error, even after I've
> uninstalled/purged QGIS
>
> "N: Skipping acquisition of configured file 'main/binary-i386/Packages',
> as repository 'https://qgis.org/ubuntu focal InRelease' doesn't support
> architecture 'i386'
> N: Skipping acquisition of configured file 'main/binary-i386/Packages', as
> repository 'https://qgis.org/debian focal InRelease' doesn't support
> architecture 'i386'"
>
> To install I follow the instructions on the QGIS site so I'm not doing
> anything weird. This all started after the automatic update. Please let me
> know if you need more info, I'm not confident with any of this so please
> explain to me like I'm an idiot.
>
> Thanks
> Abi
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread Charles Dixon-Paver
I thought this would be easily solved with an expression but sadly I
haven't been able to get reliable results at all.

My first thought was
collect($geometry,filter:=intersects($geometry,geometry(@parent))) and when
that didn't work I tried various aggregates and union operations to no
avail. Something like this might be useful if you can get it into a usable
form (I managed to get various multigeometries in the form you are looking
for but wasn't able to do much with them and there seemed to be artifacts):

collect_geometries(array_foreach(aggregate(layer:='lines',aggregate:='array_agg',expression:=$geometry,filter:=intersects($geometry,geometry(@parent))),@element))

I was actually waiting for someone else to come up with a more elegant
solution, but it would probably also be possible to identify intersecting
features and get the minimum/ maximum feature id for intersecting features
with this:

aggregate(layer:='lines',
aggregate:='min',
expression:="fid",
filter:=intersects($geometry,geometry(@parent)))

You could use that in the field calculator to create a field for "grouping"
various intersecting features to dissolve on, however it's only going to
identify the minimum of the currently intersecting features so you would
need to iterate through the process multiple times. I can't think of an
effective way to implement a "while" conditional either.

It's a pretty clanky way to do it, but if you are really struggling I think
it's possible.

On Mon, 30 Aug 2021 at 22:10, Nicolas Cadieux 
wrote:

> Hi,
>
> Seems like the plugin is available so I will try it out.  The ability to
> create multi-linestring out of any touching lines (touch here means
> intersects at the first or last node) would be nice to have it if I can
> include it in a model.
>
> My goal is for this model to work for anyone with a basic install of QGIS
> LTR or 3.20 with minimal efforts so I am trying to eliminate the need to
> rely on external plugins or scripts.
>
> This is also my first attempt with models. It’s a learning curve but I am
> having fun… I think this probably should have been a plugin but my
> knowledge of GUI programming is basically 0.  That will be for a next
> project…
>
> Nicolas Cadieux
> https://gitlab.com/njacadieux
>
> Le 30 août 2021 à 14:59, David Strip  a écrit :
>
>  I looked at the source for this plug-in and as far as I can tell  it
> only merges lines that meet at endpoints. It ignores multi-lines, and only
> creates linestrings, so there are no vertices of degree >2 (ie, no
> junctions/forks). Also, the plug-in doesn't look for intersections between
> vertices (since it only looks to merge endpoints.)
> The StackExchange post appears to want multi-linestrings, which gives
> forks and such. Is that what you need?
>
> On 8/30/2021 5:27 AM, Nicolas Cadieux wrote:
>
> Hi,
> This is the plugin I was referring to.  I don’t see it in the current
> plugins (experimental turned on)  so I figured it’s QGIS 2 only.
>
> https://github.com/ArMoraer/QGISMergeLines
>
> Nicolas Cadieux
> https://gitlab.com/njacadieux
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Projecting a Layer Correctly: Project Properties?

2021-08-30 Thread Lisa Marun
Hi, Jonah.

To add to Bernd's message, when you 'had to reload the file into QGIS,' it
seems like you may have opened up a new project with a different CRS. In
your new project, have you tried going to Project > Properties, and
ensuring that the CRS is set to EPSG 3857? If it is not, changing the CRS
here will likely resolve the issue.

Good luck!

Lisa
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread Nicolas Cadieux
Hi,

Seems like the plugin is available so I will try it out.  The ability to create 
multi-linestring out of any touching lines (touch here means intersects at the 
first or last node) would be nice to have it if I can include it in a model. 

My goal is for this model to work for anyone with a basic install of QGIS LTR 
or 3.20 with minimal efforts so I am trying to eliminate the need to rely on 
external plugins or scripts.

This is also my first attempt with models. It’s a learning curve but I am 
having fun… I think this probably should have been a plugin but my knowledge of 
GUI programming is basically 0.  That will be for a next project…

Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 30 août 2021 à 14:59, David Strip  a écrit :
> 
>  I looked at the source for this plug-in and as far as I can tell  it only 
> merges lines that meet at endpoints. It ignores multi-lines, and only creates 
> linestrings, so there are no vertices of degree >2 (ie, no junctions/forks). 
> Also, the plug-in doesn't look for intersections between vertices (since it 
> only looks to merge endpoints.)
> The StackExchange post appears to want multi-linestrings, which gives forks 
> and such. Is that what you need? 
> 
>> On 8/30/2021 5:27 AM, Nicolas Cadieux wrote:
>> Hi,
>> This is the plugin I was referring to.  I don’t see it in the current 
>> plugins (experimental turned on)  so I figured it’s QGIS 2 only.
>> 
>> https://github.com/ArMoraer/QGISMergeLines
>> 
>> Nicolas Cadieux
>> https://gitlab.com/njacadieux
>> 
> 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread Nicolas Cadieux
Hi Andrea,

That is great news.  It may work for me in certain conditions.  Will the plugin 
pop up in processing?  It would be nice to include it in the QGIS plugin 
directory so that more people have access to it.

Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 30 août 2021 à 15:08, Andrea Giudiceandrea  a écrit 
> :
> 
> Nicolas Cadieux Mon, 30 Aug 2021 04:27:27 -0700
>> This is the plugin I was referring to.  I don’t see it in the current 
>> plugins (experimental turned on)  so I figured it’s QGIS 2 only.
>> https://github.com/ArMoraer/QGISMergeLines
> 
> Hi Nicolas,
> I've ported that plugin to QGIS3.
> 
> You could download and install the new plugin version (hopefully working 
> without issues on QGIS 3.16) from 
> https://github.com/agiudiceandrea/QGISMergeLines
> 
> Anyway, I don't think it does what you need.
> 
> Regards.
> 
> Andrea
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread David Strip

  
  
I looked at the source for this plug-in and as far as I can tell  it
only merges lines that meet at endpoints. It ignores multi-lines,
and only creates linestrings, so there are no vertices of degree
>2 (ie, no junctions/forks). Also, the plug-in doesn't look for
intersections between vertices (since it only looks to merge
endpoints.)
The StackExchange post appears to want multi-linestrings, which
gives forks and such. Is that what you need? 

On 8/30/2021 5:27 AM, Nicolas Cadieux wrote:

  
  Hi,
  This is the plugin I was referring to.  I don’t see it in the
current plugins (experimental turned on)  so I figured it’s QGIS
2 only.


https://github.com/ArMoraer/QGISMergeLines
  
  Nicolas Cadieux
https://gitlab.com/njacadieux
  
  
  

  


  

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Projecting a Layer Correctly

2021-08-30 Thread Bernd Vogelgesang

your layer is displayed perfectly with EPSG 3857 (Web mercator)

On 30.08.21 18:49, Jonah Bass wrote:

Hello,

I am having trouble projecting a layer into QGIS. I am looking to map a set
of electric substations in Spain. When I originally created the shapefile
of the substations, it projected correctly. I had to make some additions to
the list of substations and had to reload the file into QGIS. Since then,
the layer shows up to the west of Spain in the Atlantic Ocean. The shape of
the layer makes sense, but it will not project correctly. Please see the
.csv attached. Any help or suggestions to fix this would be greatly
appreciated.

Thank you,
Jonah Bass


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Projecting a Layer Correctly

2021-08-30 Thread Jonah Bass
Hello,

I am having trouble projecting a layer into QGIS. I am looking to map a set
of electric substations in Spain. When I originally created the shapefile
of the substations, it projected correctly. I had to make some additions to
the list of substations and had to reload the file into QGIS. Since then,
the layer shows up to the west of Spain in the Atlantic Ocean. The shape of
the layer makes sense, but it will not project correctly. Please see the
.csv attached. Any help or suggestions to fix this would be greatly
appreciated.

Thank you,
Jonah Bass


Spain Substations.csv
Description: MS-Excel spreadsheet
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Rule-based symbol for point within polygon in QGIS

2021-08-30 Thread Stefan Giese (WhereGroup)
Depends on your QGIS version, from 3.16 onwards you can use the 
overlay-functions to proof if the point and polygonlayer are in a 
spatial relation like intersects or touches and so on. The expression 
for your first rule will be like this one:


/"VAL_PROTECTION_EP3" = '1' AND  "TYPE"  = 1 AND overlay_intersects( 
layer:='pol', filter := ("TYPE" in ('P','E') AND "CAT_CANTON" = 2) OR 
("TYPE" in ('P','E') AND "CAT_CANTON" = 3))/


In the overlay_intersects-part you have to change the layername to your 
polygon layer.


If you have an older QGIS Version you can achieve the more or less same 
result with the refFunctions Plugin.


Hope this helps

Best regards

Stefan

--
Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant
--
Aufwind durch Wissen!
Jetzt neu: Webinare und Online-Schulungen
bei der www.foss-academy.com
--

WhereGroup GmbH
Schwimmbadstr. 2
79100 Freiburg
Germany

Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

stefan.gi...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885

Am 30.08.2021 um 16:36 schrieb Jeanneret Cédric:


I would like to use a set of rules to draw features from a point_layer 
that are within a polygon_layer.


Points that answer true to

("VAL_PROTECTION_EP3" = '1' AND  "TYPE"  = 1)

and that are within polygons that answer true to

("TYPE" in ('P','E') AND "CAT_CANTON" = 2) OR ("TYPE" in ('P','E') AND 
"CAT_CANTON" = 3)


should be displayed as red dots

Points that answer true to

("VAL_PROTECTION_EP3" = '2' AND  "TYPE"  = 1)

and that are within polygons that answer true to

("TYPE" in ('P','E') AND "CAT_CANTON" = 2) OR ("TYPE" in ('P','E') AND 
"CAT_CANTON" = 3)


should be displayed as orange dots

Points that answer true to

("VAL_PROTECTION_EP3" = '3' AND  "TYPE"  = 1)

and that are within polygons that answer true to

("TYPE" in ('P','E') AND "CAT_CANTON" = 1)

should be displayed as yellow dots

I cannot find the right combination of expressions for the rule to work.

Any help would be appreciated: what would a working syntax be for such 
a rule to work in QGIS Layer Styling panel ?


Cédric Jeanneret


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user




OpenPGP_signature
Description: OpenPGP digital signature
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[QGIS-it-user] Funzione "Aggregate" con espressione algebrica

2021-08-30 Thread Fabio Pifferini
Ciao a tutti,
volevo sapere se è fattibile con la funzione "aggregate", ottenere come 
risultato la somma delle lunghezze degli elementi contenuti in un perimetro, 
moltiplicate per un valore di un campo specifico di ogni elemento.

In pratica ho un layer con elementi poliline inerenti le strade, un campo del 
layer è il costo della strada per metro lineare (costo).

Attualmente ottengo le sole lunghezze con questa formula:

aggregate(
layer:='Strada',
aggregate:='sum',
expression:=length(intersection(geometry(@parent), $geometry)),
filter:= ("Tipo"='Nazionale' AND intersects( $geometry,geometry(@parent)))
)


Ho provato a modificarla come segue, ma mi da errore all'esecuzione:

aggregate(
layer:='Strada',
aggregate:='sum',
expression:=length(intersection(geometry(@parent), $geometry)) * 'costo',
filter:= ("Tipo"='Nazionale' AND intersects( $geometry,geometry(@parent)))
)


Ringrazio anticipatamente per i suggerimenti

Fabio





Fabio Pifferini
Ingegnere SUP, Project manager PMP®
Membro di direzione


MASOTTI & ASSOCIATI SA
Via Mirasole 1  |  CH-6501 Bellinzona  |  Tel. +41 (0)91 825 52 40  |  Fax +41 
(0)91 825 91 13  |  i...@masotti.ch |  
www.masotti.ch

...salvaguarda l'ambiente; stampa questo messaggio soltanto se è veramente 
necessario...
___
Questo messaggio di posta elettronica potrebbe contenere informazioni 
riservate. Qualora non foste il destinatario corretto, Vi preghiamo di 
comunicarlo immediatamente al mittente e di distruggere il presente messaggio. 
E' strettamente vietato duplicare, divulgare, modificare o usare (in qualsiasi 
modo) senza autorizzazione le informazioni contenute nel messaggio. Grazie.
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient, please notify the sender immediately and destroy 
this e-mail. Any unauthorized copying, disclosure, modification or use (in any 
way) of the material in this e-mail is strictly forbidden. Thank you

___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


[Qgis-user] Rule-based symbol for point within polygon in QGIS

2021-08-30 Thread Jeanneret Cédric
I would like to use a set of rules to draw features from a point_layer that are 
within a polygon_layer.
Points that answer true to
("VAL_PROTECTION_EP3" = '1' AND  "TYPE"  = 1)
and that are within polygons that answer true to
("TYPE" in ('P','E') AND "CAT_CANTON" = 2) OR ("TYPE" in ('P','E') AND 
"CAT_CANTON" = 3)
should be displayed as red dots
Points that answer true to
("VAL_PROTECTION_EP3" = '2' AND  "TYPE"  = 1)
and that are within polygons that answer true to
("TYPE" in ('P','E') AND "CAT_CANTON" = 2) OR ("TYPE" in ('P','E') AND 
"CAT_CANTON" = 3)
should be displayed as orange dots
Points that answer true to
("VAL_PROTECTION_EP3" = '3' AND  "TYPE"  = 1)
and that are within polygons that answer true to
("TYPE" in ('P','E') AND "CAT_CANTON" = 1)
should be displayed as yellow dots
I cannot find the right combination of expressions for the rule to work.
Any help would be appreciated: what would a working syntax be for such a rule 
to work in QGIS Layer Styling panel ?


Cédric Jeanneret

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread Nicolas Cadieux
Hi,
This is the plugin I was referring to.  I don’t see it in the current plugins 
(experimental turned on)  so I figured it’s QGIS 2 only.

https://github.com/ArMoraer/QGISMergeLines

Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 30 août 2021 à 06:56, Nicolas Cadieux  a 
> écrit :
> 
> Hi,
> 
> Thanks for the info.  There was also a line_merge (or merge line) plugin.   
> The problem with the function that you are indicating is that it take a 
> single Multilinestring and create a simple linestring if the ends are 
> connected.  What I am looking for is a way to select a file made of simple 
> linestrings and to merged them into a single multilinestring if they share a 
> node or share and object that shares a node.  So, for example, if you had two 
> cities separated by a river (and there was no way to cross the river), all 
> the roads would be merged in two objects, one for each city.
> 
> This post explains what I would like.  It offer a QGIS 2 script that could 
> help. 
> https://gis.stackexchange.com/questions/198317/join-merge-lines-that-touch-and-intersect-in-qgis
> 
> I will share a file with and example of what I am looking for.
> 
> Nicolas Cadieux
> https://gitlab.com/njacadieux
> 
>>> Le 29 août 2021 à 17:12, Andrea Giudiceandrea  a 
>>> écrit :
>>> 
>> 
>>> 
>>> Nicolas Cadieux Sun, 29 Aug 2021 08:18:08 -0700
>> 
>>> I did see a merge function but did not find the line_merge plugin in  the 
>>> repository.
>> 
>> Hi Nicolas,
>> "line_merge" is not a plugin. It is a function  available in QGIS expression 
>> / field calculator:
>> 
>> 14.3.13.53. line_merge
>> Returns a LineString or MultiLineString geometry, where any connected 
>> LineStrings from the input geometry have been merged into a single 
>> linestring. This function will return NULL if passed a geometry which is not 
>> a LineString/MultiLineString.
>> https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/functions_list.html#line-merge
>> 
>> Regards.
>> 
>> Andrea Giudiceandrea
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread Nicolas Cadieux
Hi,
Thanks for the tip.  I will play with the aggregate function. 

 My goal is not to used the snap as I am trying to identify groups of connected 
lines in order to find the nodes that need to be snapped.   The goal of my 
models is to find almost every possible linear network error that would create 
a problem in a graph analysis (ex shortest path). 

 So far, I can hunt down and find disconnected nodes and line, disconnected 
crossing lines, duplicates, parallel edges, self connected line, overlapping or 
partial overlapping line segments…. I wanted to use the ‘does not touch’ 
spatial query.  That works well if a single geometry does not touch (first or 
last node touching) but if one end touches a second geometry, then the spatial 
selection fails.  By grouping or merging all connected lines together, then « 
touch » would work as the fist and last node of this new object would be 
identified as not touching any other object.  

Thanks everyone for your help and ideas it’s very useful. 

Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 29 août 2021 à 16:41, Charles Dixon-Paver  a écrit :
> 
> 
> Hi Nicolas, I would urge you to try again as I was sure this would work and 
> when I tested it I had no issues (using freshly digitized data). Maybe you 
> need to run a snapping operation first?
> 
> One issue is that intersecting lines may break your ability to retrieve 
> attributes with aggregates. For example, I ran the following on my Single 
> parts geometries in the field calculator:
> 
> aggregate(layer:='lines',aggregate:='concatenate_unique',concatenator:=',',expression:=
>  "idtext",filter:=within( $geometry, geometry(@parent)))
> 
> This initially had no issue getting all the matching line info, but as  soon 
> as I added an intersecting line, the multipart to singlepart operation splits 
> those lines at the intersections, which results in a mismatch in the 
> retrieved attributes. Of course you could use an intersects() filter instead, 
> but then you'll be getting the intersecting lines attributes concatenated as 
> well...
> 
> Regards
> 
>> On Sun, 29 Aug 2021 at 17:18, Nicolas Cadieux  
>> wrote:
>> Hi,
>> 
>> Yes, Harrissou,
>> That does not work with lines unfortunately. I tried multiple times with 
>> different combinations.  It works with polygons when common borders need to 
>> be dissolved. I did see a merge function but did not find the line_merge 
>> plugin in  the repository. I figured it was QGIS2 and had been dropped.  Do 
>> you have any info of this?
>> 
>> Nicolas Cadieux
>> https://gitlab.com/njacadieux
>> 
 Le 29 août 2021 à 00:53, DelazJ  a écrit :
 
>>> Hi Nicolas,
>>> 
>>> What about using "Dissolve" and then "multiparts to singleparts"...
>>> There's also the line_merge function, if you want to go the expression 
>>> route.
>>> 
>>> Regards,
>>> Harrissou
>>> 
>>> Le 29 août 2021 05:26:24 GMT+02:00, Nicolas Cadieux 
>>>  a écrit :
 
 Hi,
 
 Just to clarify, I have no attribute to dissolve the lines on… so If you 
 have as easy way to create an attribute list of all connected lines 
 groups, I would also appreciate it.  This is easy in strait python but I 
 am making a model and trying to rely on existing algorithms.
 Thanks!
 
 Nicolas Cadieux
 https://gitlab.com/njacadieux
 
>> Le 28 août 2021 à 20:21, Nicolas Cadieux  a 
>> écrit :
>> 
> 
> Hi,
> 
> Is there an easy way, in processing, to dissolve lines that are touching? 
> Alternative, can I create a multilinestring with all the lines that are 
> touching?  Seems this should be a basic tool to have in QGIS…
> 
> Nicolas Cadieux
> https://gitlab.com/njacadieux
>>> 
>>> -- 
>>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma 
>>> brièveté.
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Line dissolve

2021-08-30 Thread Nicolas Cadieux
Hi,

Thanks for the info.  There was also a line_merge (or merge line) plugin.   The 
problem with the function that you are indicating is that it take a single 
Multilinestring and create a simple linestring if the ends are connected.  What 
I am looking for is a way to select a file made of simple linestrings and to 
merged them into a single multilinestring if they share a node or share and 
object that shares a node.  So, for example, if you had two cities separated by 
a river (and there was no way to cross the river), all the roads would be 
merged in two objects, one for each city.

This post explains what I would like.  It offer a QGIS 2 script that could 
help. 
https://gis.stackexchange.com/questions/198317/join-merge-lines-that-touch-and-intersect-in-qgis

I will share a file with and example of what I am looking for.

Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 29 août 2021 à 17:12, Andrea Giudiceandrea  a écrit 
> :
> 
> 
>> 
>> Nicolas Cadieux Sun, 29 Aug 2021 08:18:08 -0700
> 
>> I did see a merge function but did not find the line_merge plugin in  the 
>> repository.
> 
> Hi Nicolas,
> "line_merge" is not a plugin. It is a function  available in QGIS expression 
> / field calculator:
> 
> 14.3.13.53. line_merge
> Returns a LineString or MultiLineString geometry, where any connected 
> LineStrings from the input geometry have been merged into a single 
> linestring. This function will return NULL if passed a geometry which is not 
> a LineString/MultiLineString.
> https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/functions_list.html#line-merge
> 
> Regards.
> 
> Andrea Giudiceandrea
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user