Hello all,
I am generating a 3D categorical voxel model (.nc file) from point data using a custom Python script and the netCDF4 library. I am using proprietary ESRI attributes to enforce discrete symbology (Unique Values) upon loading the layer in ArcGIS Pro.
While the unique values and labels are successfully loaded, the colors fail to apply automatically.
My goal is to load the Voxel Layer with correct Labels AND Colors applied automatically.
Data Type: Categorical codes stored as unsigned 8-bit integers (u1 / uint8).
Dimensions: 3D Voxel (z, y, x).
_FillValue: 255 (as uint8).
The main variable, sediment_code, is defined with the following attributes:
esri_unique_values np.array([...], dtype='u1') -> WORKS
esri_unique_labels np.array(['Su Extremely Low', ...], dtype=str) -> WORKS
esri_unique_colors RGBA String -> FAILS (Colors not applied)
flag_values / flag_meanings CF Standard -> WORKS
Here is how the main variable is created and the key attributes are assigned in the script that successfully loads the labels:
# Assuming cf_flag_values (dtype='u1'), flag_descriptions, and rgba_string are correctly calculated
# Variable creation using u1 (uint8)
sed_var = ncfile.createVariable(
'sediment_code',
'u1', # Unsigned 8-bit integer (working type)
('z', 'y', 'x'),
fill_value=255, # Working FillValue
zlib=False
)
# ... other essential attributes (standard_name, coordinates, grid_mapping)
# ArcGIS Pro Proprietor Attributes (Symbology)
sed_var.esri_unique_values = cf_flag_values
sed_var.esri_unique_labels = np.array(flag_descriptions, dtype=str)
sed_var.esri_unique_colors = rgba_string # <--- The failing attribute
# Example of RGBA string format (partially):
# "217 225 242 255 180 198 231 255 0 176 240 255 ..."
Given that esri_unique_values and esri_unique_labels are correctly read by ArcGIS Pro 3.x for this Voxel Layer, what could be the specific issue preventing esri_unique_colors from being applied?
Is there a required character limit, escaping rule, or specific formatting (e.g., using commas instead of spaces) for the RGBA string when defining colors for u1 variables?
Does the Voxel Layer symbology require the colors to be stored in a different dimension/variable rather than as an attribute?
Any guidance on the exact syntax or known limitations for the esri_unique_colors attribute on Voxel Layers would be greatly appreciated.
Thank you!