Hi Grant,
What I meant is that, using the Field calculation you can create new fields for 
each thing you want to style. In your case you want a field for colour.
Using the field calculator you can set up a script, for example...

CASE
  WHEN "class" = 'Igneous' THEN '#fc9403'
  WHEN "class" = 'Sedimentary ' THEN '#03fc56'
  WHEN "class" = 'Igneous rocks' THEN '#7303fc'
  WHEN "class" = 'Metamorphic' THEN '#fc03e7'
  ELSE '#fc0303'
END

This will then assign a colour to each feature, which you can assign using the
This can be done for a lot of the styling options as I mentioned before.

As I said below, and as you mentioned in your message, this won't be reflected 
in the Legend, only in the Map. The above probably isn't the solution you are 
looking for.

Another suggestion is to look into creating a set of Standard Styles stored 
centrally. When you load a Layer into Qgis you can load these styles as 
required, which will apply the rules you previously set.

You can also create default styles for a particular layer and every time you 
load the layer into a Project the style is automatically loaded with the layer. 
You can do this from in the Layer Properties and going down to the Style Button 
selecting Save as default

Kind Regards,

Richard


--
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 46 942 2409
https://gov.ie/opw

--
To send me files larger than 30MB, please use the link below 
https://filetransfer.opw.ie/filedrop/richard.mcdonn...@opw.ie

Email Disclaimer: 
https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/

--
MSc GIS, FME Certified Professional

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 46 942 2409
https://https://gov.ie/opw<https://www.opw.ie>

--
Email Disclaimer: 
https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/<https://www.opw.ie/en/disclaimer/>
From: box...@iinet.net.au <box...@iinet.net.au>
Sent: 12 December 2022 10:24
To: Richard McDonnell <richard.mcdonn...@opw.ie>
Subject: RE: [Qgis-user] Colouring Geological Maps

Hi Richard,

I can colourise the polygons using the color(rgb) algorithm but this does not 
flow back to the layers panel or the map layout legend.

What do you mean "storing..as a set of attribute values"?

Thanks for your assistance,
Cheers Grant


From: Richard McDonnell 
<richard.mcdonn...@opw.ie<mailto:richard.mcdonn...@opw.ie>>
Sent: Monday, 12 December 2022 6:18 PM
To: box...@iinet.net.au<mailto:box...@iinet.net.au>; 
qgis-user@lists.osgeo.org<mailto:qgis-user@lists.osgeo.org>
Subject: RE: [Qgis-user] Colouring Geological Maps

Morning,
I'm not sure if this is a solution for you, but have you considered using 
attribution and storing your styling requirements as a set of attribute values. 
You can do this for Fill Colour, Stroke Thickness, Font, Sizes...etc...
You could build a graphic modeller to add the attribution to your data and then 
have a single default style, which has all the Styling Variables set to use the 
new attribution.
The only issue with this is that you won't generate a legend...
Kind Regards,

Richard


--
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 46 942 2409
https://gov.ie/opw

--
To send me files larger than 30MB, please use the link below 
https://filetransfer.opw.ie/filedrop/richard.mcdonn...@opw.ie

Email Disclaimer: 
https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/



--
MSc GIS, FME Certified Professional

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 46 942 2409
https://https://gov.ie/opw<https://www.opw.ie>

--
Email Disclaimer: 
https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/<https://www.opw.ie/en/disclaimer/>

From: QGIS-User 
<qgis-user-boun...@lists.osgeo.org<mailto:qgis-user-boun...@lists.osgeo.org>> 
On Behalf Of Grant Boxer via QGIS-User
Sent: 11 December 2022 08:48
To: qgis-user@lists.osgeo.org<mailto:qgis-user@lists.osgeo.org>
Subject: [Qgis-user] Colouring Geological Maps

I am trying to find an easier way of colouring a geological map. The only way I 
can find to colourise the polygons in both the map window and layers panel - 
and hence the displayed legend - is to use the rule-based rendering option. 
Each rule has to be manually styled.

Is there a way to get QGIS to interrogate a text file for styling information? 
I can't seem to find one anywhere in the algorithms. Aiming to use this in a 
graphical modeller to automate colourising geological maps. I can use a fixed 
qml file but that has to be done for each individual map unless you have a wide 
range of set styles.

Cheers Grant, Perth WA

_______________________________________________
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

Reply via email to