I am hoping to get recommendations for an issue involving combining feature classes (polygons of forest land) to spreadsheets in Excel.

1522
6
01-04-2017 06:20 PM
JoshuaBrengel
New Contributor III

The feature classes are separate polygons I'd like to combine into one feature class (multiple polygons of a forest into one one forest district feature class).  The Excel spreadsheets include all data (things like forest number, polygon ID, forest name, hyperlinks to PDFs for the polygons, etc) associated with the individual polygons for the polygon's corresponding forest district (e.g. many rows for forest polygons saved in a single sheet for the forest district).  Ultimately, I am hoping to combine the forest polygon feature classes into corresponding forest district feature classes and use the "Identify" function on the forest polygon features to bring up the corresponding attribute information. 

It seems as if the main issue is that there is no corresponding (besides default fields) attribute data with unique identifiers in the individual polygons as is (we did not input any attribute data when initially creating polygons).  I've tried experimenting with various combination tools (Merge, Spatial Join, Union, etc), and I think Merge is the best way to combine the original state forest polygons into one forest district (opinions on this would be appreciated though!).  But, is there a way to somehow combine the Excel sheet of the data for each district to the merged district feature class without a unique identifier/attribute information in the original forest polygons attribute tables? And, ultimately be able to use Identify on each original polygon to bring up its individual data from the district spreadsheet?

If not, are there any ideas on how to automate the process of inputting unique identifiers/attribute information into feature class using Python?

Thank you so much for your help!!

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

merge will get your geometry together, but unless you know which polygon belongs to what record in the excel table, then you will have to identify the FID or OBJECTID in the featureclass/shapefile that correcsponds with what record in the table.  Once that is complete, then you can bring in the excel file and 'join' the attributes to the geometry

JoshuaBrengel
New Contributor III

Hi Dan, thanks for the response.  I assumed that this was the case and there was no "easy" fix. Even though it was the hard way, we learned our lesson in this case, to take a minute and input our unique identifiers when creating the polygons. Thanks again! 

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Do you have ANY coordinates in the excel spreadsheets that will allow you to create a point or other feature class?  A few different options to think about:

  • maybe you have coordinated of the center point or other coordinate that falls within the polygon?  If so, you could then create a centerpoint in the polys and try the near function.
  • use the spatial join
  • create a new field and a unique identification for each of the polygons (there are other threads and tools to do this....or you can just copy the FID or OBJECTID), then if there aren't two many and you know which is which, manually update you excel...then do an itemjoin (or is is joinitem ?)

In any case, you have to figure out a what that the polygons and the attributes can relate

0 Kudos
JoshuaBrengel
New Contributor III

Thanks for the response Rebecca! Unfortunately, we do not have coordinates in the excel spreadsheet that would allow a center point creation for the polygon (good idea though!).  It looks like inputting unique identifiers manually for our polygons and then merging is the route to go. If you happen to know of a thread that speeds up this input, I'd much appreciate it! 

0 Kudos
DanPatterson_Retired
MVP Emeritus

I imagine that the time taken to find a quasi-automated solution  will not save you much time.  If the locations were collected in some sort of logical order for the most part, then it will take far less time.  

RebeccaStrauch__GISP
MVP Emeritus

I agree with Dan, if there is no logic between the spreadsheet and data then trying to automate will wast more time than it will save most likely. 

I would still go ahead and create a new field with a unique identifier (populate it) in the polygon feature class , and a matching field (blank) in the the spreadsheet. (we always called ours uniqid).  The hopefully you have someone very knowledgeable with the data that can start viewing the data (show the unique id as a label) and start filling in the spreadsheet.  I would not have the spreadsheet as part of the mxd at this point.  You may start seeing a pattern between the two, at least to the point that you can (carefully) sort the spreadsheet to deal with a geographic part at a time.

If multiple polygons share the same attribute in the spreadsheet, you can combine those polys so they appear as one....but you would be best to have an attribute that shared a common value (then you should be able to dissolve), or select manually and merge them.

Depending on the number of poly and attribute records, you just need to start with that type of method and see what pops....or if it won't work at all.  without knowing the data, that is the best I can recommend.

0 Kudos