Skip to main content

Hi,

I have encountered a problem. I have built a script that reads in from several SHP files followed by multiple SpatialFilters against another SHP file (A). The aim of my script is to check which polygons from (A) intersect with any of the other SHP files. I never know how many polygons from (A) will intersect because it is regularly updated.

So, here is my problem. The result of this is a CSV and an SHP that contains the polygons that have intersected, and all the attributes from the SHP it checks against are appended. I want to remove all the attribute columns that contain only missing as values, but I have not been able to do that. The result can contain up to 25-30 different attributes! 

I have tried AttributeManager, NullAttributeMapper, and PythonCaller, but I can't make anything work.

Any suggestions would be very helpful!

I think I would try a Tester using Has a value, then use the  NoFeaturesTester to check if any of the 2 ports has no features coming through. Then based on that you can use the AttributeRemover.


Reply