Everybody makes simple example, but what if I needa do something more complicated? In my case I need to do the following: have a line shape file which I made from DWG file. I have several fields which I want to use for styling. I have colour, width and type. I need to specify colour, width and type independantly. For example colour=1, width=2 and type="dashed line" or colour=3, width=1 and type="continious line". Colours are not range or random colours, they should be specified manually 1 is red, 2 - is yellow etc. The same with line types. Width can be either range, or specified manually as well as colour and width.
Amazing Question. Thank you for being so clear. So first if you have a color that you want to change automatically when you change it in your attribute table it will need to have a specific format which is string [r,g,b,a] as int 0-255 or #RRGGBBAA as hex or color as color's name. Depending on how specific you want to be you can just have "red" or you can get a more controlled color by using the #RRGGBBAA format. As for the type use key words in the form of string [no|solid|dash|dot|dash dot|dash dot dot] Those are the different types. Now for width you will just be using a double value greater than 0 in one of your fields. These are the format acceptable in attribute table to define data. Now all you need to do is connect your lines to attribute table by going into the layer properties --> symbology tab --> you can use any of the symbol types but for simplicity in this example use single symbol. Click on the sub line under the parent line. You will see color, width stroke, and stroke style. There is a symbol at the end of each of these boxes click to define where data inputs from. Set field type to your attribute field. I know this explanation is long and ill need to work on a video for this, but if you have any further questions before video comes out let me know. When video is out I will send you the link.
@@HalHartQGIS Thank you so much! I didn't understand everything, but I figured out to general idea and how to do it with colours because there is a specific operator for colours "colour_rgb". But I didn't understand this [no|solid|dash|dot|dash dot|dash dot dot]. Which expression I need for dashed line for example?
Thanks a lot for making it so early.Much love from India❤️
Thanks man, I've been looking for this. I want to show COVID risk areas with colors by amount of risks. I hope we get rid off this trouble soon.
Yes, appreciate you checking out the content. Be Safe.
Big Help THANKS
Everybody makes simple example, but what if I needa do something more complicated? In my case I need to do the following: have a line shape file which I made from DWG file. I have several fields which I want to use for styling. I have colour, width and type. I need to specify colour, width and type independantly.
For example colour=1, width=2 and type="dashed line" or colour=3, width=1 and type="continious line". Colours are not range or random colours, they should be specified manually 1 is red, 2 - is yellow etc. The same with line types. Width can be either range, or specified manually as well as colour and width.
Amazing Question. Thank you for being so clear. So first if you have a color that you want to change automatically when you change it in your attribute table it will need to have a specific format which is string [r,g,b,a] as int 0-255 or #RRGGBBAA as hex or color as color's name. Depending on how specific you want to be you can just have "red" or you can get a more controlled color by using the #RRGGBBAA format. As for the type use key words in the form of string [no|solid|dash|dot|dash dot|dash dot dot] Those are the different types. Now for width you will just be using a double value greater than 0 in one of your fields. These are the format acceptable in attribute table to define data. Now all you need to do is connect your lines to attribute table by going into the layer properties --> symbology tab --> you can use any of the symbol types but for simplicity in this example use single symbol. Click on the sub line under the parent line. You will see color, width stroke, and stroke style. There is a symbol at the end of each of these boxes click to define where data inputs from. Set field type to your attribute field. I know this explanation is long and ill need to work on a video for this, but if you have any further questions before video comes out let me know. When video is out I will send you the link.
@@HalHartQGIS Thank you so much! I didn't understand everything, but I figured out to general idea and how to do it with colours because there is a specific operator for colours "colour_rgb". But I didn't understand this [no|solid|dash|dot|dash dot|dash dot dot]. Which expression I need for dashed line for example?
You just put dash in your attribute table and the line will automatically dash
The "||" separate each key world
@@HalHartQGIS hm, ok I'll try it.