Solved

How to make selection of shp files?

  • 24 November 2017
  • 6 replies
  • 0 views

I have about 11 thousand SHP files with unique names and a XLS list with ID that contains in ID field of SHP. How can i select this SHP files that is in XLS list and write them into another folder?

icon

Best answer by markatsafe 24 November 2017, 19:33

View original

6 replies

Badge +2

Assuming that the ID field is an attribute in your Shape files and all you have in your Excel file is a list of those IDs. I think the quickest way to do this would be:

1. use the DBF reader (rather then the Shape reader) to build an index of ID & directory/file name, as a CSV file or SQLite table.

2. use the Excel reader to look-up the directory/file name and then use the File Copy writer to move your shape files to your target folder.

I'm suggesting the DBF reader instead of the Shape reader since you don't need to read the shape geometries to lookup the ID.

Where can i get file copy writer? Is this a transformer or its stand alone module?

Userlevel 6
Badge +32

Where can i get file copy writer? Is this a transformer or its stand alone module?

It is a Writer, hit Writers, Add Writer..., enter File Copy in Format Field.

 

You also can click in the Canvas and enter File Copy.

 

Or click in the Canvas and enter FeatureWriter and define File Copy in its parameters.

 

Oh i understand. But what tool do I use to compare the values from the excel and the ID field.

Userlevel 6
Badge +32

Oh i understand. But what tool do I use to compare the values from the excel and the ID field.

FeatureMerger :-)

Thanks. its work good.

Reply