Skip to main content
Solved

Merging SHP located in different directories

  • July 19, 2022
  • 1 reply
  • 7 views

gerard
Participant
Forum|alt.badge.img

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!

 

Best answer by gerard

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.

View original
Did this help you find an answer to your question?

1 reply

gerard
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • Best Answer
  • July 19, 2022

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings