Skip to main content
Best Answer

Select reader based on conditional statement

  • October 23, 2020
  • 3 replies
  • 102 views

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.

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

redgeographics
Celebrity
Forum|alt.badge.img+62
  • 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+62

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! 😄