Skip to main content
Question

RasterExpressionEvaluator RGB Retrieve

  • January 2, 2019
  • 3 replies
  • 14 views

Hello, Experts. I struggle to perform a simple task. Wasn't able to find a solution by googling, I'm sorry.

I want to separate a red color from a raster (RGB 255 0 0) using RasterExpressionEvaluator. The end result should just be raster containing RGB 255 0 0 color:

 

I can't seem to find the right expression. Here is the screenshot of my workbench along with the RasterExpressionEvaluator parameters:

 

 

 

Thank you very much.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • 7843 replies
  • January 3, 2019

If you need to keep only red color (255,0,0), the RasterExpressionEvaluator and the RasterBandNodataSetter in this workflow might help you.

 


  • Author
  • 1 reply
  • January 3, 2019

If you need to keep only red color (255,0,0), the RasterExpressionEvaluator and the RasterBandNodataSetter in this workflow might help you.

 

Thank you for your reply.

Your workflow works just fine for a non- georeferenced TIFF (about 5Mb in size). However, if I georeference the same TIFF (it's about 500Mb in size), the output is a giant red rectangle:

 

Do you know what might cause it?

 

Thank you!


nathanatsafe
Safer
Forum|alt.badge.img+9
  • Safer
  • 284 replies
  • January 14, 2019

Thank you for your reply.

Your workflow works just fine for a non- georeferenced TIFF (about 5Mb in size). However, if I georeference the same TIFF (it's about 500Mb in size), the output is a giant red rectangle:

 

Do you know what might cause it?

 

Thank you!

Hi @babao,

I think Takashi's solution should work for georeferenced or non-georeferenced images. If you inspect the image beforehand, does the output make sense? Does it cover the same area? Where are the red pixels you expect to be output? Can you compare the two images side by side to see where the unexpected data is?

 

 

If you are able to share your source image and workspace the community might be able to further help troubleshoot.

 

Best,

Nathan