Skip to main content
Solved

How to use RasterPropertiesExtractor after a FeatureWriter?

  • September 26, 2016
  • 3 replies
  • 44 views

Hi there!

 

In a generic export workbench, I need to use a FeatureWriter to filter when a JPEG2000 output is selected.

No problem to export in JPEG2000. It works perfectly. Althought in this case, I need to generate a world file after so I added a RasterPropertiesExtractor transformer, but Ive got a error:

"@RasterProperties: Failed to obtain raster from feature. Only features with raster geometry are expected" ? Obviously it's raster geometry: the image has been exported.

I added a GeometryFilter to filter on Raster but still got the error

Could it be a limitation to the new FeatureWriter transformer?

Best answer by itay

Hi @steve14 the feature writer will return a non geometry feature describing a summery of the features written.

http://docs.safe.com/fme/2016.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/featurewriter.htm

Using that information you could read back the raster and extract its properties.

Hope this helps

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.

3 replies

itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • Best Answer
  • September 26, 2016

Hi @steve14 the feature writer will return a non geometry feature describing a summery of the features written.

http://docs.safe.com/fme/2016.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/featurewriter.htm

Using that information you could read back the raster and extract its properties.

Hope this helps


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • September 27, 2016

Probably be easier to make a duplicate connection from the transformer before the FeatureWriter. One goes to the FeatureWriter, another to the RasterPropertiesExtractor.


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • September 27, 2016

Probably be easier to make a duplicate connection from the transformer before the FeatureWriter. One goes to the FeatureWriter, another to the RasterPropertiesExtractor.

True, but that depends on the input and what is happening to it, without knowing that my guess will be to read the resulting features back to make sure the properties are correct.