Skip to main content

I have one shapefile with polygons representing a cartographic sheets at some scale. Each polygon has an unique identifier (IDn).

I have used SpatialRelator transformer (see attached image) to look for neighbor sheets for each of them, and ListConcatenator to save for each polygon the list of neighbor polygons identifiers.

 

The attached example shows that selected polygon (ID0) has 3 neighbor polygons (ID1,ID2,ID3). The IDn is the identifier included in the shapefile name located in some directory following this pattern: .\\IDn\\*IDn*.shp

I have to merge the 4 shp corresponding to ID0, ID1, ID2, ID3 to output only one shapefile.

 

I have used Directory and File Pathnames READER in other context but here I don't know how to look for these files. Maybe using WorkspaceRunner or PythonCaller? Please, could you give some advice?

 

Thank you in advance!

 

Sorry for the noise, I have found the answer.

I have created a new FME workspace where I can read all four shapefiles using a single Shape Reader (option "Single merged feature type") and write the data to a Shape writer using one new featuretype.


Reply