3

I am just trying to follow Anita Graser's examples in https://anitagraser.com/2017/04/08/a-guide-to-geometry-generator-symbol-layers/ - where the "Creating a line between features in different layers" part caught my attention.

Is there a way to select more than one feature based on an adequate function using wildcards or expressions for numerical fields ... like ReturnAnyFeatrue('from_layer', 'with_field', >= 200) ?

get_feature just returns the first element that matches the "attribute"/"value" settings - thus the following expression returns a set of lines from any object of the current layer to a specific STATION - i.e. 'Millennium Tower':

make_line(  
centroid( $geometry ),  
geometry( get_feature( 'Citybike', 'STATION', 'Millennium Tower' ) )  
)  

I am interestet in a way to draw geometry-generator-lines from current layers' points to any station starting with - for instance - "Mi" based on an expression like 'Mi*'
is there a way that just makes use of geometry generator and simple expression ?

(unfortunately, there is still a lack of documentation and examples concerning geometry generator ... )

MrXsquared
  • 34,292
  • 21
  • 67
  • 117
robert tuw
  • 898
  • 1
  • 9
  • 20
  • ... just an additional note: i didn't find a documentaion of the geometry-related functions which are listed in the "Geometry"section of the "Expression string builder"-window. in particular i am looking for a comprehensive parameter desciption ... any ideas where to find it ?? – robert tuw Jun 29 '17 at 09:36
  • 1
    Did u see the integrated help in the right part of this panel ? Could surely be more detailed but ... there's something ... – Snaileater Jun 29 '17 at 10:46
  • in know - there used to ba an integrated help. was desperately searching for that, but any of the "expression editor - windows" do not show that part of the window. and i have no idea where i have lost that part ... painful it is ! – robert tuw Jun 29 '17 at 12:06
  • @roberttuw I think you can get only one feature per time using the built-in expressions. Instead, you may recur to a custom function for getting whatever you want. I can try to help you if you are add more information and context to your issue. – mgri Jun 29 '17 at 12:21
  • @mgri - thx for support. i've just posted a refined question which reflects that. – robert tuw Jun 29 '17 at 12:30
  • @ mgri - semi-off-topic: do you eventually have any idea how i can "turn on" that help section again ? ... it is definitely not visible in any of the "expression editor" dialogs – robert tuw Jun 29 '17 at 12:33
  • 1
  • @underdark: thx ! – robert tuw Jun 30 '17 at 09:16
  • count me in as curious as well, I've been trying to work this out myself - I tried playing around with the new collect() function in QGIS 3 but this results in a multipoint geometry and the centroid only connects to the first of those. – she_weeds Jan 18 '18 at 11:00
  • See this answer here, that might work for you as well: https://gis.stackexchange.com/a/381819/88814 – Babel Dec 13 '20 at 12:26
  • thx to #babel - valuable hint ! – robert tuw Dec 15 '20 at 08:48

0 Answers0