Skip to main content
Solved

How to use RasterPropertiesExtractor after a FeatureWriter?

  • September 26, 2016
  • 3 replies
  • 21 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

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

3 replies

itay
Supporter
Forum|alt.badge.img+16
  • 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+43
  • 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+16
  • Supporter
  • September 27, 2016
mark2atsafe wrote:

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.

 

 


Reply


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