Skip to main content

Hi all,

 

I have a number of shapefiles covering a range of dates, with each date recorded in the file name. I also have a number of area of interest polygons and I have been tasked with finding out how much overlap there is with each area of interest and each date period.

 

For each area of interest I was going to create a spreadsheet with the date taken from the corresponding file used as a field heading populated with an area value for amount of overlap.

 

There are instances where there is no overlap between the two files. Is it possible to still take the date from the file name and attach it to the area of interest polygon and populate the field with 0?

 

I have attached some sample data below

 

Many thanks,

 

Matthew

 

Hi @mattenvsys​ , if I understood your requirement correctly, this workflow is a possible solution.

That is, "_related_candidates" created by the SpatialRelator would store the number of the polygons for each date spatially related to the AOI, including case of 0 (no overlap).

workflow

 

The same approach, different implementation.

workflow-2


Hi @Takashi Iijima​ 

 

I've uploaded an example output to this comment help explain what I'm trying to achieve.

 

So I have multiple shapefiles mapping certain features. And I would like to show how much of that feature exists in each area of interest spanning multiple dates.

 

I was hopping to take the date from the file name from the input files (20171128_UYD.shp, 20171125_UYD.shp) using a substring extractor. Take that string and use it as a fieldname to store the area value.

 

I was thinking of using a clipper or area on area overlayer to find out the area coverage within each zone. But I thought if I were to use a clipper and no polygons overlap the zone, then no values would be sent through the output port of the clipper. So I wondered I how would I pass the date and the value of 0 square metres to the output file?

 


Hi @Takashi Iijima​ 

 

I've uploaded an example output to this comment help explain what I'm trying to achieve.

 

So I have multiple shapefiles mapping certain features. And I would like to show how much of that feature exists in each area of interest spanning multiple dates.

 

I was hopping to take the date from the file name from the input files (20171128_UYD.shp, 20171125_UYD.shp) using a substring extractor. Take that string and use it as a fieldname to store the area value.

 

I was thinking of using a clipper or area on area overlayer to find out the area coverage within each zone. But I thought if I were to use a clipper and no polygons overlap the zone, then no values would be sent through the output port of the clipper. So I wondered I how would I pass the date and the value of 0 square metres to the output file?

 

Do you need to calculate overlapped area between the AOI and date polygons for each date?​


Do you need to calculate overlapped area between the AOI and date polygons for each date?​

Yes, that's correct. So one date it might be 0, another 600 and so on


Hi @Takashi Iijima​ 

 

I've uploaded an example output to this comment help explain what I'm trying to achieve.

 

So I have multiple shapefiles mapping certain features. And I would like to show how much of that feature exists in each area of interest spanning multiple dates.

 

I was hopping to take the date from the file name from the input files (20171128_UYD.shp, 20171125_UYD.shp) using a substring extractor. Take that string and use it as a fieldname to store the area value.

 

I was thinking of using a clipper or area on area overlayer to find out the area coverage within each zone. But I thought if I were to use a clipper and no polygons overlap the zone, then no values would be sent through the output port of the clipper. So I wondered I how would I pass the date and the value of 0 square metres to the output file?

 

OK. I hope this workflow might help you. Bit a long story...

Step 1

workflow-3-1

Step 2

workflow-3-2

Step 3

workflow-3-3

Result

result

 

 


OK. I hope this workflow might help you. Bit a long story...

Step 1

workflow-3-1

Step 2

workflow-3-2

Step 3

workflow-3-3

Result

result

 

 

Thank you very much @Takashi Iijima​ . It looks to have worked perfectly. Just a quick clarification, The Step1 image has a path from FeatureMerger 1 - merged to FeatureMerger 2 - Requestor. But Step 2 has the FeatureMerger 2 - Requestor input as a ListExploder. Was the ListExploder not required in the end and the Step2 image is from a previous iteration of your example?

When I first thought about this workbench I didn't expect this many transformers would be needed!

Thank you once again for taking the time to investigate this

 


Reply