Select to view content in your preferred language

Symbolizing features based on geoJSON colour attribute - how to do that?

03-15-2023 04:43 AM
New Contributor III

Hello everyone,

I have a number of JSON files that will be converted into geoJSON standard. One of the attributes contain information about the designed colour to be used for symbolization within feature class. This colour is provided as a string value in HEX format, e.g. "#FF0000". 

Is there any way (using arcpy) to symbolize the output features within a class (I plan to use JSON to Features) based on the colour value?

To give an example, let's say I have a geoJSON file as below, describing two point features with the colour attribute. How, using the given file, can I create a point feature class within which these two point features would be coloured red and green (based on the hex codes)?

Thank you in advance!




{"type":"Feature","properties":{"colour": "#FF0000"},

{"type":"Feature","properties":{"colour": "#00FF00"},



0 Kudos
1 Reply
New Contributor III

Okay, that issue seems to be more complicated than I thought. 

Anyway, I found some sort of a workaround - attribute driven symbology:

This works exactly as I want, i.e. it uses the HEX colour value from an attribute and the uses it to paint the output but... The problem is that I need to have it scripted.

Has anyone tried scripting and automatizing this feature?

0 Kudos