Skip to main content
Solved

Select reader based on conditional statement


I have a large dataset split up into three shapefiles (south, middle, north). From this I use Clipper to cut out the area of interest. To save processing time I would like to only read the data necessary (i.e. one of the three files). I have a bounding box for my area of interest so I would like to select one (or two) of the files (south, middle, north) to read depending on the y-max/y-min values of my bounding box. Is this possible?

Best answer by redgeographics

Your best option would be to use the FeatureReader, you can have it read one or more files automatically based on the area of interest. In fact, it's worth investigating whether or not it'd be a time saver to simply have the FeatureReader take all three shapefiles but clip automatically to the extents of an Initiator feature (i.e. your area of interest), this would save you have to do a clip after reading the entire file.

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

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+50
  • Celebrity
  • Best Answer
  • October 23, 2020

Your best option would be to use the FeatureReader, you can have it read one or more files automatically based on the area of interest. In fact, it's worth investigating whether or not it'd be a time saver to simply have the FeatureReader take all three shapefiles but clip automatically to the extents of an Initiator feature (i.e. your area of interest), this would save you have to do a clip after reading the entire file.


Thank you for this reply. Using the FeatureReader with a spatial filter as you suggested reduced my processing time from ~10 min to ~50 sec!!


redgeographics
Celebrity
Forum|alt.badge.img+50
johan13karlsson wrote:

Thank you for this reply. Using the FeatureReader with a spatial filter as you suggested reduced my processing time from ~10 min to ~50 sec!!

That's good to hear! 😄


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