Question

How can i make a raster reader "Optional"

  • 27 October 2021
  • 1 reply
  • 11 views

I have several types of rasters in my folders (ecw, png, tiff..). Not all folders i want to process contain all of the types. In my workspace i created one reader for each type, but when one type is not available, i can not launch the workspace. How can i make a reader optional so it will accept no input data?


1 reply

Userlevel 1
Badge +21

There is a setting under workspace parameters to Ignore Failed Readers which you could set to Yes.

 

Personally I prefer to use FeatureReaders, with a logger set to the rejected port. This allows the workspace to proceed even if the reader fails. Using FeatureReaders instead of the Ignore Failed Readers parameter gives a more granular level of control. It may be that it is acceptable for some readers to fail, but if other readers fail you want the workspace to terminate

image

Reply