Skip to main content
Question

Raster Expression Evaluator for segmentation

  • September 12, 2017
  • 1 reply
  • 24 views

Hi,

I have a pointcloud, each point has a value that spans between 0-50. I have separated these into 6 groups with the PointcloudFilter and collected these 6 categories of points into an attribute called Groups. Then I have created a NumericRaster grouped by Groups with a cellsize of 2mX2m.

What I want to do now is to make them into polygons, I have tried alternative routes with success however I would like to try the RasterToPolygonCoercer, therefore I need to alter the band of the raster to my group categories. My question is how I need to formulate the RasterExpressionEvaluator so that the Coercer makes polygons based on my previous filter groups?

1 reply

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • September 12, 2017

If I understand correctly you have 6 rasters, one for each of your groups, which contain pixel values somewhere in the range of 0-50, and you would like polygons with an attribute indicating which group they belong to.

If 0 is a valid data point, then your NumericRasterizer would have to explicitly be given a NoDataValue.

 

You can use a counter to assign a unique ID to each attribute.

 

 

An off aspect of the RasterExpressionEvaluator, is that if you set it to a fixed value, it overwrites the NoDataValue, but if you use a conditional statement, it ignores the NoDataValues.

 

 

So a condition like if(A[0]>=0,@Value(A:_count),0), will set every value pixel to your groupID and keep every noData pixel as is.

You can then use the RasterToPolygonCoercer.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings