Select to view content in your preferred language

Extracting Multiple Polygon Attributes to point data OR table at set location

3814
2
07-04-2013 07:12 AM
KieranBlacker
Emerging Contributor
Hi,

Not really seen a solution to this other than a spatial join.

I'm looking to extract a set polygon attribute (text field) at a set location (a point). I need to do this for a large number of feature classes (200+). If this can be done in model builder i would prefer it to repeating lots and lots of spatial joins.

Basically each map is a timeslice, and I want to extract all of the changes that take place at a single location over the course of all the maps. Each featureclass is labelled with a number for the time period it occupies, ie 1, 2, 3 etc, and the attributes are descriptions of the conditions in the polygon at that time.

At the moment I've basically extracted georeferenced jpeg's for each timeslice and used the sample tool to get RGB valueis, which i then match back to the original symbology style to get the attribute... there must be an easier way surely?

I have limited modelbuilder experience, but pick things up pretty quickly. If this has been asked before then please forgive this spam and link me to another thread!

Kieran
0 Kudos
2 Replies
markdenil
Frequent Contributor
The Select By Location tool lets you select features based on their location relative to features in another layer.

Say, select the polygons that contain the points.
You can then extract the text attribute values,
perhaps by grabbing the FIRST record with summary statistics, or
by using a cursor.

Then you loop to the second polygon layer and do it again.
0 Kudos
RichardFairhurst
MVP Honored Contributor
Hi,

Not really seen a solution to this other than a spatial join.

I'm looking to extract a set polygon attribute (text field) at a set location (a point). I need to do this for a large number of feature classes (200+). If this can be done in model builder i would prefer it to repeating lots and lots of spatial joins.

Basically each map is a timeslice, and I want to extract all of the changes that take place at a single location over the course of all the maps. Each featureclass is labelled with a number for the time period it occupies, ie 1, 2, 3 etc, and the attributes are descriptions of the conditions in the polygon at that time.

At the moment I've basically extracted georeferenced jpeg's for each timeslice and used the sample tool to get RGB valueis, which i then match back to the original symbology style to get the attribute... there must be an easier way surely?

I have limited modelbuilder experience, but pick things up pretty quickly. If this has been asked before then please forgive this spam and link me to another thread!

Kieran


Within Model Builder you would need to build the process for a polygon single feature class and then repeatedly process it with an iterator.  The particular Iterator set up that meets your needs depends on the required input you have to cycle through.  If you are actually working with real feature classes within a geodatabase (and not shape files) and a feature class is a valid input for your model (not a layer), then you could use the Iterate Feature Class tool.  If your model needs a layer as an input, you would have to add all of the feature classes as layers into your map and use the Iterate Multivalue tool in combination with an input variable of type Feature Layer.  You need to know how to work with variables, since you will need to generate a new feature class name with each iterator pass if you intend to create a new set of feature classes.

If you are actually trying to end up with over 200 fields on a point feature class with each field representing one feature class, you cannot use a shapefile and must use a file geodatabase or sde geodatabase.  The Iterator for Feature Class outputs both a name variable and a feature class variable and you would probably need to use both to create the new fields.  Python can do the same things (and more), but the code is completely different from using Model Builder Iterators, so you have to decide up front which form of automation you will be using.

If you wanted to process all of your locations at once and not just a single location you would need two models.  One to iterate over all of the feature classes with the Spatial Join tool to efficiently transfer the polygon attributes to all of the points at one time and output a new set of feature classes.  A second model would have to then iterate over all of the new Spatial Join feature classes and create a field for each one on the original points (which would have to be a point feature layer, not a point feature class) and process a join and field calculator operation to transfer the data from the spatial joins to the correct field on the points.  The second model has to correctly apply attribute indexes to increase the speed of each join and handle removing the joins as well to move to the next iteration.

That is all I will say about the process until you have a more specific idea about what you intend to create in your model or script.