Skip to main content
Question

How can i make a raster reader "Optional"


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?

3 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • October 27, 2021

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


styx_a38
Contributor
Forum|alt.badge.img+3
  • Contributor
  • December 12, 2024

Hello,
is there another possibility? We use the ignore failed reader option at the moment (could use featureReaders as well, had the same effect), and it works, but our workspace is quite complicated by now with 8 readers and the user choose wich to use...so a lot of errors in the log file all the time. That is quite annoying when you try to find an error that causes the workflow to crash with all the “irrelevant” error messages.
Is there a way to have a truly optional reader, so one that only tries to read when selected?


s.jager
Influencer
Forum|alt.badge.img+16
  • Influencer
  • December 12, 2024

First of all: It is better to start a new topic with your question, instead of digging up a post that is 3 years old. Although that happens a lot here, I’ve noticed…

 

Anyway: Of  course there is a way to do what you want. Use a Folder and File Pathnames reader. Then you can first examine which files exist, which files must be processed, and based on that you can route the appropriate file- and pathnames to the right FeatureReader. No more need for the user to choose.


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