Skip to main content
Solved

Problem with "RasterCellCoercer"

  • April 27, 2017
  • 14 replies
  • 77 views

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.

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.

14 replies

jdh
Contributor
Forum|alt.badge.img+40
  • 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

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+40
  • Contributor
  • April 27, 2017
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+18
  • Supporter
  • 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

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
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+18
  • Supporter
  • April 27, 2017

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+40
  • 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+40
  • Contributor
  • April 27, 2017

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
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+40
  • Contributor
  • April 27, 2017
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+18
  • 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
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!!!