Skip to main content

I have line and polygon features and I want to count the number of line segments that overlap each pixel of my polygon feature. For that I am using LineOnAreaOverlayer and it is working fine.

The problem is my output. I need multiple shapefile outputs based on an attribute of the line features. Explaining better: my line features have an attribute with A, B, C, D etc. values. I want a polygon feature output for each interaction of a type of line with the polygon features. For this I have already tried @Value (line_attribute) on writer name and FANOUT. For these, my output is a polygon feature with ONLY the features that have a line segment intercepting and I need all the polygon features, even those that don't have line interactions.

I'm not quite following.

 

Do you want all polygons output in each file, or do you want files with only the relevant interacting polygons in each file and the "left-over" polygons output as a separate file?

 

 


I want full-polygon-outputs for each type of line, pixels with and without interactions in the same file.


If I understood this correctly, you could do some statistics with lines to see how many different line_attributes do you have. This number you can use in Cloner to multiply polygons. This will ensure that every single polygon gets out on every fanout.

After that goes LineOnAreaOverlayer (group by _copynum). You can then assign every _copynum with line_attributes (AttributeValueMapper). Fanout data with _new_copynum.

This will give you all the polygons for every one of the different line_attribute. Right before writing you could create status_attribute and all those that line_attribute<>_new_copynum give "no crossings" value. This status_attribute is the one that differentiates crossed from non-crossed polygons for each fanout group.

Maybe I missed few things but that should be it. Correct me if I'm wrong. Hope it helps.


I think what you need to do is create a list - check the Generate List parameter in the LineOnAreaOverlayer transformer parameters dialog.

Then use a ListDuplicateRemover to keep only one instance of each type (ie if the line attribute is called xxxx, then select xxxx). Then use a ListExploder.

That will give you one polygon for each type of line that intersects it.

You can follow that up with a fanout/feature type name if you wish to separate out the data according to the line type that overlaps.


Reply