[Qgis-user] defining a variable width vector style
hi folks, i'm trying to define a style which varies along the length of the line it's applied to, according to the position along that line. at the moment, as far as i can see, all styles are continuous along the line so, for example let's say i want the line to be drawn as a cone, i would define the width of the style as proportional to the position on the line. something like: line_width = line_pos x 0.1 at the start of the line, the width of the style should be 0m 1m along the line, the width should be 0.1m 1.5m along the line, the width should be 0.15m 10m along the line, the width should be 1m and so on any ideas about the best way to do this? i considered adding a *lot* of nodes and varying the width in small steps at each node, but that would be clumsy and fiddly. cheers, -- robin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] defining a variable width vector style
Hi Robin: I just noticed in the documentation for 2.16 at: http://qgis.org/fr/site/forusers/visualchangelog216/index.html#feature-aggregate-support-for-expressions Under: Feature: Arrow Symbol Layer It appears that you can make arrows with tapered shafts. The shafts hasve start and end width settings and the heads could be set small. The shafts can also follow curved lines. Haven't tried it yet Good luck Tom On Fri, Aug 12, 2016 at 8:16 PM, Robin Paulson wrote: > hi folks, > i'm trying to define a style which varies along the length of the line > it's applied to, according to the position along that line. at the moment, > as far as i can see, all styles are continuous along the line > > so, for example let's say i want the line to be drawn as a cone, i would > define the width of the style as proportional to the position on the line. > > something like: line_width = line_pos x 0.1 > > at the start of the line, the width of the style should be 0m > 1m along the line, the width should be 0.1m > 1.5m along the line, the width should be 0.15m > 10m along the line, the width should be 1m > and so on > > any ideas about the best way to do this? > > i considered adding a *lot* of nodes and varying the width in small steps > at each node, but that would be clumsy and fiddly. > > cheers, > > -- > robin > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user -- tolen...@gmail.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] defining a variable width vector style
On 2016-08-15 08:16, Tom Lennon wrote: It appears that you can make arrows with tapered shafts. The shafts hasve start and end width settings and the heads could be set small. The shafts can also follow curved lines. Haven't tried it yet yep, that worked. cheers Tom. unfortunately i realised there's a further problem: my style is more complicated than a simple line, so it doesn't quite work as i need. i may have to dive into python. can anyone recommend any good tutorials for getting started with qgis styles and python? -- robin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user