Skip to main content
Solved

Problem with "RasterCellCoercer"


Forum|alt.badge.img

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

Best answer by uba_kp

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

View original
Did this help you find an answer to your question?

14 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 27, 2017

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


Forum|alt.badge.img
  • Author
  • April 27, 2017
jdh wrote:

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?

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 27, 2017
uba_kp wrote:
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?

 

 


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • April 27, 2017
jdh wrote:

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.

 

 


Forum|alt.badge.img
  • Author
  • April 27, 2017

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


Forum|alt.badge.img
  • Author
  • April 27, 2017
itay wrote:
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.

 

 


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • April 27, 2017
uba_kp wrote:

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.

 

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 27, 2017

The ListConcatenator needs to come after the RasterCellCoercer.


Forum|alt.badge.img
  • Author
  • Best Answer
  • April 27, 2017

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


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 27, 2017
uba_kp wrote:

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 ?

 

 


Forum|alt.badge.img
  • Author
  • April 27, 2017
jdh wrote:
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.

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 27, 2017
uba_kp wrote:
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.

 


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • April 27, 2017

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


Forum|alt.badge.img
  • Author
  • April 27, 2017
jdh wrote:
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!!!

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