Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using ArcGIS 10, and I have layers of the 2010 Census blocks, block groups, and tracts. There are thousands of polygons in these layers.

I want to color them so that each is distinct from its neighbors, but all I can figure out is how to give each one a distinct color. The color of each polygon does not really matter; I just want to easily distinguish each from its neighbor by color, rather than with a border.

Or is that something you only see in an elementary school map of the 50 United States?

share|improve this question
9  
(+1) Technically, ArcGIS does provide distinct colors, because it can select them randomly among (I believe) a palette of 2^24 and therefore the chances of two neighbors getting exactly the same color are low. This suggests you really want to fix a small number of readily differentiable colors and assign them so no neighboring polygons get the same color. There's an algorithm to do this for five or more colors when all polygons are connected and simply connected. (Manifold has a built-in procedure to five-color any polygon layer :-).) –  whuber Jun 8 '12 at 18:02
6  
There is also a plugin in QGIS called "topocolour" that provides this capability. You might be able to look at their code and build something yourself if you cannot find a canned utility in ArcGIS. –  RyanDalton Jun 8 '12 at 18:16
9  
I wrote the aforementioned topocolour plugin! I think it might struggle with thousands of polygons though, to work out all the adjacencies. I've also recently written a version in R just in case anyone wants to colour maps in R that way. I won't touch ArcGIS though! –  Spacedman Jun 8 '12 at 18:53
2  
BTW, ArcGIS has efficient internal procedures now for computing polygon adjacencies. I recall doing all blocks within a state (about half a million of them) in about 30 minutes: 15 for calcs, 15 for writing the adjacency file. With newer machines the job would go 5-10 times faster. So you could have your R code chew on an adjacency file produced by ArcGIS, which sounds like an optimal way to use both platforms for this problem. –  whuber Jun 8 '12 at 19:45
2  
"Four colors suffice" (someone had to say it). –  barrycarter Jul 9 '12 at 15:47

5 Answers 5

you could apply symbology classification on a unique identifier/GWID field.

share|improve this answer
9  
This won't guarantee a unique color across neighboring polygons –  user3461 Jun 21 '12 at 20:02
    
It should be since the RGB value can range from 0 to 255 for each, meaning there is a vast array of combinations for the R, B, and G values. so technically your won't have the same hue, unless you have well over a billion unique records. –  GISdork Jul 31 '12 at 17:37
4  
This technique won't guarantee that two adjacent polygons have dissimilar colors in order "to easily distinguish each [polygon] from its neighbor". Even though the RGB combinations are unique they may look very similar. So if two neighboring polygons are assigned similar values, it won't be easy/possible to tell them apart. Please see whuber's first comment on the original question. –  user3461 Jul 31 '12 at 18:13

Have you considered http://colorbrewer2.org/ I seem to remember a plugin for ArcGIS or QGis being available.

share|improve this answer
2  
Please see Kevin's comment to the other reply. –  whuber Jul 25 '12 at 15:24

I have coded an ArcPy tool that assigns an attribute from the provided list to the polygons using a neighbourhood table so that no neighbours share the same color. It usually manages to use less than six colors using a simple graph coloring heuristic (or, if need be, it can assign the colors randomly, still respecting the neighbourhood).

The toolbox together with some documentation can be downloaded from http://geocite.ic.cz/coloring.zip.

share|improve this answer
    
see also here : gis.stackexchange.com/questions/54029/… –  radouxju May 30 at 12:07

You are looking for a tool that can achieve the 4-colors theorem

I use FME for that purpose, but such script should exists in arcPy also.

share|improve this answer

Perform a Flood fill on the polygons in Python adding a set amount of colour change to a recursive call to the flood fill function, altering the colour as you go.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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