Python Forum

Full Version: How to give polygons a colour value with python?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I'm working with arcpy since a few weeks and I have question and hopefully somebody knows how to deal with it.

I have a feature class with polygons, for example the second administration level for France. The feature class has an attribute which is called "colour_value". I have a list of six colour values like [59,63,70,72,78,82]. I want to give all polygons one of these values, which sounds easy, but it should be like that: the polygon with the 59 shouldn't have a neighbour polygon which has also the 59, and this rule also for the other values. How can I do that?

Thanks for help in advance.

Greets,
Fabian
I have never worked with Arcpy before,
but you have six colors! That's a lot, so, theoretically it is possible to solve your problem (even four colors would be sufficient).
Did you see the following thread? It might be helpful.