Solved

Problem with "RasterCellCoercer"


Badge

Dear FME-Users,

I've a problem with "RasterCellCoercer", because this transformer don't write pixel values into an attribute.

It only works with "RasterToPolygonCoercer" (attribute "_label").

What I'm doing wrong?

Thnak you very much and best regards.

Konrad

icon

Best answer by uba_kp 27 April 2017, 19:42

View original

14 replies

Badge +22

The rasterCellCoercer outputs a list, rather than an attribute, so depending on which band(s) you want the value from you can use a ListIndexer or ListConcatenator

Badge

The rasterCellCoercer outputs a list, rather than an attribute, so depending on which band(s) you want the value from you can use a ListIndexer or ListConcatenator

Thank you @jdh, but both transformers does not work. Do you've some more ideas?

 

Badge +22
Thank you @jdh, but both transformers does not work. Do you've some more ideas?

 

What exactly do you mean by does not work, are they throwing errors or not doing anything? Can you post some sample data or the results of a logger attached to the RasterCellCoercer?

 

 

Badge +16

The rasterCellCoercer outputs a list, rather than an attribute, so depending on which band(s) you want the value from you can use a ListIndexer or ListConcatenator

could it be that you are using the table view in the Data Inspector? have a look at the result via the feature information window, the table view does not show lists and its elements.

 

 

Badge

I've added to screenshots, take a look to the attachement please.

Badge
could it be that you are using the table view in the Data Inspector? have a look at the result via the feature information window, the table view does not show lists and its elements.

 

 

No I used ArcMap instead of Data Inspector.

 

 

Badge +16

I've added to screenshots, take a look to the attachement please.

You need to connect the ports of the transformer to the writer (they become green) to write the values.

 

 

Badge +22

The ListConcatenator needs to come after the RasterCellCoercer.

Badge

Both does not work @itay @jdh . The attribute "_con" is still empty.

Badge +22

Both does not work @itay @jdh . The attribute "_con" is still empty.

Did you change the parameter on the ListConcatenator to point to _band{}.value ?

 

 

Badge
Did you change the parameter on the ListConcatenator to point to _band{}.value ?

 

 

I don't know what you mean. I've added a screenshot of this transformer already.

 

Badge +22
I don't know what you mean. I've added a screenshot of this transformer already.

 

And in the screenshot you posted, you are concatenating a list called netcdf_data_variable.valid_range{}, which presumably is empty since _con is empty.

 

 

You need to concatenate the list that is produced by the RasterCellCoercer which is called _band{}.value.

 

Badge +16

And in addition make sure the writer data type and lenght is correctly set.

Badge
And in the screenshot you posted, you are concatenating a list called netcdf_data_variable.valid_range{}, which presumably is empty since _con is empty.

 

 

You need to concatenate the list that is produced by the RasterCellCoercer which is called _band{}.value.

 

Now it works! :) Thank your very much @jdh and @itay!!!

Reply