Skip to main content
Solved

How to make selection of shp files?

  • November 24, 2017
  • 6 replies
  • 21 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?

Best answer by markatsafe

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

Forum|alt.badge.img+2
  • Best Answer
  • November 24, 2017

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.


  • Author
  • November 27, 2017

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


nielsgerrits
VIP
Forum|alt.badge.img+62

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.

 


  • Author
  • November 27, 2017

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


nielsgerrits
VIP
Forum|alt.badge.img+62

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

FeatureMerger :-)

  • Author
  • November 27, 2017

Thanks. its work good.