<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Calibri;font-size:12pt;color:#000000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Center">
UNCLASSIFIED<br>
</p>
<br>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
hey Grant</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
You can take a colour from a raster and apply, this expression goes in the data defined override for the colour of the symbology, it takes the centroid and looks at each band of a raster ('wellington_0075m_urban_aerial_photos_2021_91c5e45d_9ea8_43e1_b49e_a24953a0c0c1',
in the example) for the colour</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
color_rgba(</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
raster_value( 'wellington_0075m_urban_aerial_photos_2021_91c5e45d_9ea8_43e1_b49e_a24953a0c0c1', 1, centroid( $geometry )),</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
raster_value( 'wellington_0075m_urban_aerial_photos_2021_91c5e45d_9ea8_43e1_b49e_a24953a0c0c1', 2, centroid( $geometry )),</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
raster_value( 'wellington_0075m_urban_aerial_photos_2021_91c5e45d_9ea8_43e1_b49e_a24953a0c0c1', 3, centroid( $geometry )),</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
255</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
)</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
here its just showing the roof colour</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
<img style="max-width: 1123px;" size="559690" data-outlook-trace="F:1|T:1" src="cid:ebd637a8-2e5e-4db8-a19b-022294644f38"></div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
were you trying to get colour from a raster and apply to a vector symbology?</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
so you just need to figure out which point you want to apply it to</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
Pete</div>
<div id="appendonsend"></div>
<br>
<p style="font-family:Calibri;font-size:12pt;color:#000000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Center">
UNCLASSIFIED<br>
</p>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> QGIS-User <qgis-user-bounces@lists.osgeo.org> on behalf of Brent Wood via QGIS-User <qgis-user@lists.osgeo.org><br>
<b>Sent:</b> Monday, August 4, 2025 12:53 PM<br>
<b>To:</b> qgis-user@lists.osgeo.org <qgis-user@lists.osgeo.org>; boxerg@iinet.net.au <boxerg@iinet.net.au><br>
<b>Subject:</b> Re: [Qgis-user] Colourising contour lines</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi Grant,</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm not sure I understand your question, or at least the context in detail.</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
This depends on how the grid colours are defined in QGIS.</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
If the grid is of elevation data, pixel values are elevations (heights/depths) then to get colours applied you must be applying a colour map to the grid which assigns different colours to different elevation values. Applying the same colour map to your vector
contours should give the same colours assigned to the same values in the grid.</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
If you are not already aware of it, QGIS can import colour maps from cpt-city & colour brewer, both of which have a very wide range of predefined colour maps.</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Choose "Create new color ramp" in the QGIS layer Symbology->color ramp properties.</div>
<div class="x_elementToProof" id="x_Signature">
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="margin-right:0px; margin-left:0px; font-family:Calibri,Arial,Helvetica,sans-serif">
Brent Wood<br>
<br>
Principal Technician, Fisheries<br>
NIWA<br>
DDI: +64 (4) 3860529</div>
</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> QGIS-User <qgis-user-bounces@lists.osgeo.org> on behalf of Grant Boxer via QGIS-User <qgis-user@lists.osgeo.org><br>
<b>Sent:</b> Sunday, August 3, 2025 15:35<br>
<b>To:</b> qgis-user@lists.osgeo.org <qgis-user@lists.osgeo.org><br>
<b>Subject:</b> [Qgis-user] Colourising contour lines</font>
<div> </div>
</div>
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Aptos}
p.x_x_MsoNormal, li.x_x_MsoNormal, div.x_x_MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Aptos",sans-serif}
span.x_x_EmailStyle17
{font-family:"Aptos",sans-serif;
color:windowtext}
.x_x_MsoChpDefault
{font-size:11.0pt}
@page WordSection1
{margin:72.0pt 72.0pt 72.0pt 72.0pt}
-->
</style>
<div lang="EN-AU" style="word-wrap:break-word">
<div class="x_x_WordSection1">
<p class="x_x_MsoNormal">I would like to apply colours to vector contour lines that would be derived from a coloured grid of the same data. Anyone have any thoughts on how this is best done?</p>
<p class="x_x_MsoNormal">Cheers Grant</p>
<p class="x_x_MsoNormal"> </p>
</div>
</div>
<br>
<div style="margin-bottom:10px; line-height:1.2"><b>Brent Wood </b><br>
<span style="color:#1822f8">Principal Technician - GIS and Spatial Data Management
<br>
Programme Leader - Environmental Information Delivery</span>
<div style="width:100%; white-space:normal; word-break:keep-all">+64-4-386-0529 </div>
301 Evans Bay Parade Hataitai Wellington New Zealand<br>
Earth Sciences New Zealand </div>
<div style="border-bottom:solid 3px #1822F8; background-color:black!important; height:42px; width:100%; align-items:center">
<a href="https://earthsciences.nz/" originalsrc="https://earthsciences.nz/"><img alt="Earth Sciences New Zealand" style="height:42px; margin-right:15px" src="https://webstatic.earthsciences.nz/static/logo/earth-sciences-signature.png"></a>
</div>
<div style="border-bottom:solid 1px #1822F8; width:100%; margin-top:10px; padding:0px 0px 10px 0px; font-size:8pt; font-family:Aptos">
The Institute of Geological and Nuclear Sciences Limited and the National Institute of Water and Atmospheric Research Limited joined to become the New Zealand Institute for Earth Science Limited. We are known as Earth Sciences New Zealand. For more information
on the Earth Sciences transition <a href="https://niwa.co.nz/about-niwa/science-sector-reforms" originalsrc="https://niwa.co.nz/about-niwa/science-sector-reforms">
click here</a>.<br>
<br>
<b>Notice:</b> This email may contain information which is confidential and/or subject to copyright, and may not be used, published or redistributed without the prior written consent of Earth Sciences New Zealand. If you are not the intended recipient, please
immediately notify the sender and delete the email and any attachments. Any opinion or views expressed in this email are those of the individual sender and may not represent those of Earth Sciences New Zealand.<br>
<br>
For information about how we process data and monitor communications please see our
<a href="https://niwa.co.nz/about-niwa/privacy-policy" originalsrc="https://niwa.co.nz/about-niwa/privacy-policy">
privacy policy</a>. </div>
</div>
<br>
<hr>
<font face="Verdana" color="Black" size="2"><br>
This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please
notify us immediately (Phone 0800 665 463 or customersupport@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.<br>
</font>
</body>
</html>