2

I have a file showing for each disaster, which provinces were affected. The number of provinces affected varies and their names or associated code varies as well.

Example, if a flood in 2000 affected 3 provinces called Sichuan, Henan and Yunnan. I need to select those 3 provinces and create a new shapefile. Easy. But I need to do that for over 2000 disasters and the affected provinces always changes (in names and numbers of provinces affected).

I would like to automate this with ModelBuilder but I don't know how to change my SQL request for each disaster.

Do you know if there is a way for ModelBuilder to see in an Excel file, which are the provinces that need to be selected and select them and create the corresponding shapefile?

1 Answer 1

1

When automating a process you will need to take it one step at a time. I'll answer your first question:

Do you know if there is a way for ModelBuilder to see in an Excel file

Yes - as long as you are using an ArcGIS for Desktop version (10.2.1 or later, I think) you will be able to do this using the Excel To Table tool:

Converts Microsoft Excel files into a table.

If you drag and drop this tool from the Search window, after finding it there, into the ModelBuilder window then you will have accomplished your first step.

Your next step will be to investigate how to iterate through field values in a table using ModelBuilder.

2
  • Thank you. That's a good first step. So you are saying that it will be possible to use ModelBuilder to select by attributes different provinces for each disaster? How do I have to modify the SQL query that I need to write for selecting the correct provinces? Commented Feb 9, 2016 at 10:00
  • It should be but personally I would do this using ArcPy. There should be only one question asked per question (as per the tour) so that should really be researched/asked as a separate question. Try implementing this step first, then you have more prior research to show when/if you need to ask about the next part.
    – PolyGeo
    Commented Feb 9, 2016 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.