Skip to main content
Hi,

 

 

I have a folder with jpeg images and a txt with latitude and longitude for each image name.

 

I would like to delete all files in the folder, that are located outside a polygon.

 

Can somebody help me getting started? (e.g. How to delete files in a folder, ...)

 

 

Best,

 

J.
Hi,

 

 

you could use a SpatialFilter to isolate the jpegs that are outside your polygon. Then send them to a PythonCaller for deletion:

 

 

import os

 

import fmeobjects

 

def FeatureProcessor(feature):

 

    os.remove(feature.getAttribute('fme_dataset'))

 

 

David
Thank you David!

Reply