1

I have a table that has a field that matches a field in a feature class. the table has M records for 1 row in the feature class. I would like each row in the table to have the geometry of the feature class. This would result in stacked geometries with different attributes.

If this were a 1:1 relationship, I would join the table to the FC and then export for the result I want. if I join the FC to the table the attributes line up, but there is no geometry included in the table.

Any Ideas on a tool or workflow for this?

I am working with 10.3 standard.

6
  • The attribute transfer toolbar will do this. But it’s a manual clicking process. Possible with python.
    – Fezter
    Nov 14, 2017 at 19:14
  • You should perform the 1-to-Many join and export the results, looking for stacked Polygons. I know ArcGIS 10.4 and 10.5 support this when you save the results to a new Feature Class.
    – klewis
    Nov 14, 2017 at 19:16
  • What type of geometry?
    – FelixIP
    Nov 14, 2017 at 19:28
  • the geometry is polygon
    – Randy W.
    Nov 14, 2017 at 19:32
  • Fezter- the attribute transfer tool will not do what I am looking for, as there is no shape field in the table to store geometry
    – Randy W.
    Nov 14, 2017 at 19:52

2 Answers 2

1
  • Transfer coordinates of polygon centroids into table.
  • Create XY events from relevant columns
  • Buffer points to get M wrong shape polygons:

enter image description here

Run this field calculator expression on field Shape:

mxd = arcpy.mapping.MapDocument("CURRENT")
LR=arcpy.mapping.ListLayers(mxd)[0]
def getShape(id):
 with arcpy.da.SearchCursor (LR,["ID","Shape@"],'"ID" ='+str(id)) as cursor:
  for i,shp in cursor:  break
 return shp

------------

getShape( !ID! )

To import correct shapes:

enter image description here

In the picture above "table" polygons labelled by one of their attribute. NOTE: tested on shapefiles with common field ID of integer type. Query in search cursor will change if used on FGDB or different field type.

1
  • I like the method of creating false geometries. I am going to give this a try.
    – Randy W.
    Nov 15, 2017 at 18:02
0

You could create a model or script some geoprocessing tools which iterate over the similar field from the table, join to the same records in the feature class, export the joined feature class. Repeat this for all values, then merge your results together.

4
  • if you join a feature class to a table the result is a table. The geometry is not included in this operation.
    – Randy W.
    Nov 14, 2017 at 19:46
  • if you join a feature class to a table then export the feature class it contains the data from the table
    – Maksim
    Nov 14, 2017 at 19:46
  • I have thought of using a search cursor to read the geometry of the table record, and then writing the geometry into the table, but I don't know how to add a field of type "shape" to store the geometry.
    – Randy W.
    Nov 14, 2017 at 19:48
  • what youre going to want to do is join a record from the table to its geometry in the feature class, export that joined feature class record, repeat, then combine everything at the end
    – Maksim
    Nov 14, 2017 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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