1

I have run multiple processes in arcpy: convert rasters to feature classes, overlay multiple feature classes and intersect layers. I would like to keep all attributes of my data.

However, I've ended up with attribute table, which contain two fields with the same alias: gridcode (as I have converted two rasters to shp and overlaying them). The field names are actually different (gridcode and gridcode_1).

When I try to display my final map, the Symbology in Layer properties reads only gridcode values of one field. Or course, it is not the one I would like to visualize.

Did you experience not redible symbology? is it because of the same name of my fields? if yes, how can I avoid it? I tried to:

  • open the new .mxd document and load data,
  • copy my files to new database and load data,
  • qualify my field names in the arcpy environment settings

    arcpy.env.qualifiedFieldNames = False

All without success in ArcGIS 10.4.

Here is some illustration of the same field names with different values (originated from different rasters):

enter image description here

In Layer Properties -> Symbology I can read only the values of the second field...

enter image description here

If I run print [f.name for f in arcpy.ListFields("iBuffSmkGFW")] I've got back:

>>> [u'OBJECTID', u'Shape', u'FID_GFW_SVK_poly', u'Id', u'gridcode', u'FID_outSMKpoly', u'Id_1', u'gridcode_1', u'FID_buff_erased', u'ID_12', u'PARTS', u'CSZ', u'NAM', u'DTS', u'LEG', u'PSB', u'ZONA', u'VYHLASIL', u'LEGENDA', u'TYP_MCHU', u'ROK_VYHL', u'V_KN', u'POLY_AREA', u'NUM_POINTS', u'ORIG_FID', u'distance', u'Shape_Length', u'Shape_Area']
4
  • What gets printed out with: print [f.name for f in arcpy.ListFields("iBuffSmkGFW")]
    – Bera
    Commented Feb 22, 2018 at 20:48
  • 1
    did you try changing the alias on one of the fields?
    – Dan C
    Commented Feb 22, 2018 at 20:49
  • Looks like you dont have two fields named gridcode. You are probably looking at the aliases which i think can be the same.
    – Bera
    Commented Feb 22, 2018 at 20:56
  • @DanC I've changed one of my alias, and it works!!! :-DDDD
    – maycca
    Commented Feb 22, 2018 at 20:57

0

Browse other questions tagged or ask your own question.