Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm pretty new to Modelbuilding, having just been turned onto it about a week ago on here. So my problem is, I currently have a dataset of habitats that change through time (from Immature to Mature, or remaining Mature, etc). I would like to create a shapefile for each habitat type for each year. Currently I am able to do this by hand, running a Feature Selection iteration on each field and running the "feature class to feature class" tool to export it as a shapefile. What I was wondering was, is there any way to automate this process across a number of different columns? So, run the iteration and shapefile export for the 1995 field, 1996 field, 1997 field, etc, etc. I'm trying my best right now to sort it out in Python, but today was day 1 of learning and was hoping that there was another method out there that someone may be able to point me in the right direction of.

Hopefully this makes sense, if you need any more info, please let me know.

Thanks very much in advance.

EDIT - Example data - The cut off for going from young (or Disturbance) to a mature forest is 40 years. So the field "Year" is the year the forest began growing (or year since it was removed) and under each year is the forest class for that year.

FID    Year    1995           1996          1997         1998
0      1992  Disturbance  Disturbance  Disturbance  Disturbance
1      1854  Black Spruce Black Spruce Black Spruce Black Spruce
2      1960  Disturbance  Disturbance  Disturbance  Disturbance
3      1875  Deciduous    Deciduous    Deciduous    Deciduous
4      1956  Disturbance  Disturbance  Jack Pine    Jack Pine
5      1957  Disturbance  Disturbance  Disturbance  Lowland Conifer

And this is the model I am currently using, I would like this to be re-run across all of my year fields (columns)

enter image description here

share|improve this question
2  
Can you explain a little more about how your data is structured? A few rows of sample data (input and output) would be useful. –  blah238 Feb 14 '13 at 0:41
1  
Ah yes, fair enough. Will do. Thanks –  HeidelbergSlide Feb 14 '13 at 0:42
2  
And what is the desired output given the sample input? –  blah238 Feb 14 '13 at 1:46
    
The desired output from the model I gave would be a shapefile for each unique habitat classification (one for Deciduous, one for Disturbance, one for Lowland Conifer, etc) for the year 2008. It would go down the entire row, subset each polygon that is associated with that classification, and create a new shapefile with all of the occurrences of that classification. So what I hope to do is make it so that the model would run through the field "2008", but would then run through the field "2009","2010",etc. Repeating for each year that I have. A new shapefile for each habitat class for each year –  HeidelbergSlide Feb 14 '13 at 4:53
    
I may have sorted it out on my own, although its not very elegant. But its essentially the same model as I posted above, but copying the "feature class to feature class" tool and in the equation bar saying "Year"=%Value% and changing "Year" to equal the Field that I want a new shapefile for. Its running through now, but is taking a while as the dataset is huge. If anyone know a better way to do this, please let me know. And if not, I'll check in the morning to see if it worked and if so I'll answer my own question. Thanks –  HeidelbergSlide Feb 14 '13 at 5:49
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.