1

I am trying to create custom styling by using Geometry Generator in QGIS 3.6 but I got an error expression.

enter image description here

segments_to_lines ( $geometry)
 ramp_color('Viridis', 
  scale_linear( 
        length( 
            transform( 
     geometry_n($geometry ,
     @geometry_part_num),
     'EPSG: 4326' , 'EPSG: 26910'
     )
     ) / (
     m(end_point(
     geometry_n($geometry ,
     @geometry_part_num)))

    -
    m(start_point(
     geometry_n($geometry ,
     @geometry_part_num)))
     ) * 3.6,
     0,50,
     0,1
     ))
  • whats the error message if you click on 'more info'? – MrXsquared Jun 21 at 22:46
  • I can already see an error in your first line. QGIS will interpret this as your expression would end here. Set your brackets differently. Btw. what is your final goal, how should it look like? – MrXsquared Jun 21 at 22:54
  • Not 100% sure, that's why as comment. – GSienko Jun 25 at 16:35
  • One thing is first part, make segments from one line. And that's is in first line. The rest is color rendering, so it should be in place to set up color rendering. – GSienko Jun 25 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.