Skip to main content
Solved

Problem with "RasterCellCoercer"

  • Apr 27, 2017 4:56 PM UTC
  • 14 replies
  • 158 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.

View original
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+41
  • Contributor
  • Apr 27, 2017 4:59 PM UTC

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
  • Apr 27, 2017 5:13 PM UTC

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+41
  • Contributor
  • Apr 27, 2017 5:18 PM UTC
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+19
  • Supporter
  • Apr 27, 2017 5:22 PM UTC

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
  • Apr 27, 2017 5:29 PM UTC

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


Forum|alt.badge.img
  • Author
  • Apr 27, 2017 5:31 PM UTC
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+19
  • Supporter
  • Apr 27, 2017 5:32 PM UTC

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+41
  • Contributor
  • Apr 27, 2017 5:36 PM UTC

The ListConcatenator needs to come after the RasterCellCoercer.


Forum|alt.badge.img
  • Author
  • Best Answer
  • Apr 27, 2017 5:42 PM UTC

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


jdh
Contributor
Forum|alt.badge.img+41
  • Contributor
  • Apr 27, 2017 5:45 PM UTC

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
  • Apr 27, 2017 5:47 PM UTC
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+41
  • Contributor
  • Apr 27, 2017 5:51 PM UTC
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+19
  • Supporter
  • Apr 27, 2017 5:54 PM UTC

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


Forum|alt.badge.img
  • Author
  • Apr 27, 2017 5:56 PM UTC
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!!!