Skip to main content
Question

Filter/selective use of VectorOnRasterOverlayer?

  • November 24, 2023
  • 1 reply
  • 15 views

aron
Enthusiast
Forum|alt.badge.img+16

I am trying to tint some terrain shadows (raster) with overlaying polygons of different colours (RGB). Thing is that the polygons are larger than the shadings so VectorOnRasterOverlayer colours a larger area than I wish. I only want to tint the "black/greys" in the raster, not the white areas.

 

I have tried to filter out the unwanted areas using a RasterExpressionEvaluator, setting everything beyond break point to white. Unfortunately I have not been able to figure out a syntax that does not also change the hues.

 

Any ideas on how to approach this?

 

Looking at the example below I would like to keep the darker/shaded areas and shift the flat ones to white.

 

Skärmavbild 2023-11-24 kl. 09.49.45 

1 reply

takashi
Celebrity
  • November 24, 2023

Hi @aron​ ,

Just an idea. Create a polygon from the white area of the original raster beforehand, clip the resulting colored raster output from the VectorOnRasterOverlayer by the polygon representing the original white area.

 [Addition]

I think you can also draw white on the area with the second VectorOnRasterOverlayer using the polygon representing the original white area, using FeatureColorSetter to set white color to the polygon beforehand.