Skip to main content

Hi,

 

I'm fairly new to FME. I'm curently trying to set up a workbench that reads data from multiple sources and merges it. However, I have to be able to work repeatly within a specific extent which is provided with a shapefile (see pic below). For now, I just wan to manually input a shapefile with one feature ( hopefully I manage to find a way to loop the procedure with many features but that might be for another question).

 

Right now, I can't seem to be able to pass the extent coordinate (which I get from a BoundsExtractor) to the search envelop of a FeatureReader. This post (https://community.safe.com/s/question/0D54Q000080hXiFSAU/assign-bounding-extents-to-reader-search-envelope) talks about using spatialFilter after the Feature Reader but that means I have to read ALL the data and then filter it (which I don't find very optimal).

 

Has anyone have an idea on how I can go around this?

Kind regards,

Anne-Marie

image 

 

Instead of that second reader you can use a FeatureReader transformer, use a BoundingBoxReplacer instead of the BoundsExtractor and then pass that bounding box feature as an initiator into the FeatureReader.


Instead of that second reader you can use a FeatureReader transformer, use a BoundingBoxReplacer instead of the BoundsExtractor and then pass that bounding box feature as an initiator into the FeatureReader.

Thank you for fast reply! Any chance you could provide me with a visual example? I'm not sure how to set up/use an initiator...


Thanks for your great question. I made it one of two Questions of the Week! That means you get a special badge on the community, but more importantly, I cover the content in a video.

 

You can find a demonstration of the solution to your problem here: https://www.youtube.com/watch?v=mblkuhjv6gw&t=1340s

 

I hope this is useful and thanks again for posting your question to the community.


Hello Mark,

 

I want to thank you for going to such length to explain the details anwering my beginner's question. It was indeed extrememly useful for that and much more. I'm happy if anyone else can benefit from that. Now I just have to figure out how to apply this technique when the shapefile is not a nice rectangle.

 

Thanks again and cheers!


Found it! Just had to take "bounding box accumulator" transformer out and plug my shapefile directly in the initiator :)


Reply