Skip to main content
Solved

RasterExpression

  • January 24, 2018
  • 4 replies
  • 19 views

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies

Trying to get some calculations done.

But as soon is the band and the attributes are combined the calculation fails.

The pic shows the expressions.

The first 2 get a values rest drop to No Data.

Tried rounding using int8, 16 etc. , ceiling. Every time same result.

Tried different interpretations.

The input is a DEM; min= 0 and max 519 (Real64)

Any tips on this?

The calculation is a non-iterative variant for gradients. These work neatly in python script I made (did not invent the calculations , mind you)

tx for any thoughts!

Best answer by takashi

Hi @gio, the RasterExpressionEvaluator could generate unexpected results if the input raster had Nodata definition. If the input raster has Nodata, try removing the Nodata with RasterBandNodataRemover beforehand.

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.

4 replies

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • January 24, 2018

From the image you're going from a DEM in the range of 0-519 and casting (bounded) it to an int8 (-128-127) and then casting it again to grey8 (0-255)? But then how is the min-max range 255? Was the interperetationCoercer set to UINT8 when you got the inspector results?

What purpose does the RasterSelector serve? The RasterInterpretaionCoercer forces the raster to a single band, and the RasterExpressionEvaluator does not take into account band selection regardless.

I'm also not able to replicate your issues.

Does your source data have a NoDataValue set?


takashi
Celebrity
  • 7843 replies
  • Best Answer
  • January 25, 2018

Hi @gio, the RasterExpressionEvaluator could generate unexpected results if the input raster had Nodata definition. If the input raster has Nodata, try removing the Nodata with RasterBandNodataRemover beforehand.


gio
Contributor
Forum|alt.badge.img+15
  • Author
  • Contributor
  • 2252 replies
  • January 25, 2018

@takashi

Way to go Takashi!

Removing the Nodata solved it!

That was indeed the problem.

Thanks!

Arigat?gozaimashita (I hope it is correctly written )


takashi
Celebrity
  • 7843 replies
  • January 25, 2018

@takashi

Way to go Takashi!

Removing the Nodata solved it!

That was indeed the problem.

Thanks!

Arigat?gozaimashita (I hope it is correctly written )

Correct, but just "Arigato" is more friendly :-)

 

Formal and informal. Maybe similar to the difference between "Alstublieft" and "Alsjeblieft".