Jump to content

 
Photo

Symbolizing neighboring polygons in ArcGIS

- - - - -

  • Please log in to reply
9 replies to this topic

#1
wick

wick

    Contributor

  • Validated Member
  • PipPip
  • 27 posts
  • Gender:Male
  • United States

I am using ArcGIS 9x with ArcView license. I want to symbolize all the county polygons in a state with 4 colors so that no 2 colors touch. Is there a scipt that I can use to achieve this, or is there a way to even do this through the standard symbology interface?

Thanks for your help!

-Jesse
Jesse Wickizer
Maps.com

#2
David T

David T

    GIS Manager, USMC, MCIWEST-MCB Camp Pendleton

  • Validated Member
  • PipPipPipPip
  • 192 posts
  • Gender:Male
  • Location:San Diego, California
  • United States

I am using ArcGIS 9x with ArcView license. I want to symbolize all the county polygons in a state with 4 colors so that no 2 colors touch. Is there a scipt that I can use to achieve this, or is there a way to even do this through the standard symbology interface?

Thanks for your help!

-Jesse


Jesse,

Have you checked ESRI's support site? I haven't looked there myself, as I don't normally have a need to do what you're doing in ArcGIS. But it's worth a look to see if something is there.

Your problem was a classic challenge in my intro carto class. Trying to find a way to color things so no two things colors touched. It's actually a fun exercise to do, if you have the time to do it. But, I understand your need to get something done as quick as possible.

Report back if you find anything.
David Toney, GISP
GIS Manager
United States Marine Corps
West Coast Installations

#3
benbakelaar

benbakelaar

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 658 posts
  • Gender:Male
  • Location:North Brunswick, NJ
  • Interests:maps, information, technology, scripting, computers
  • United States

I am using ArcGIS 9x with ArcView license. I want to symbolize all the county polygons in a state with 4 colors so that no 2 colors touch. Is there a scipt that I can use to achieve this, or is there a way to even do this through the standard symbology interface?

Thanks for your help!

-Jesse


If your need is to accomplish the end result, just do it by hand, it will be much easier than finding a script or writing one yourself. You can easily find an example map online, for instance, here: http://arcdata.esri....er_download.cfm

That's 5 colors BTW. Maybe that means its impossible with 4 colors - is there any state that has 4 neighbors?

[EDIT: Sorry I misread the question - you are talking about counties, not states. But I guess my question is still appropriate - is there any county that has more than 3 neighbors? If so, you won't be able to use a 4 color scheme]

#4
DaveB

DaveB

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,049 posts
  • Gender:Not Telling
  • Location:Redlands, CA
  • United States

I did a quick search on the ESRI support site and found a script for ArcView 3.x that does this by adding a value to your table. The script is called Color Optimizer. If you have access to 3.x you could try running this, then you could use the field to symbolize your counties in ArcMap with unique values.

p.s. Got this info from a colleague: if you have access to ESRI's Developer Network (EDN) there is sample code called "Four Color Map" for doing this in ArcGIS 9.x. This also sets up a field in the data's table that you can then use to symbolize with unique values.
Dave Barnes
Esri
Product Engineer
Map Geek

#5
benbakelaar

benbakelaar

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 658 posts
  • Gender:Male
  • Location:North Brunswick, NJ
  • Interests:maps, information, technology, scripting, computers
  • United States

Also for future reference... this sounds like something Manifold can do "in the box".

http://www.manifold....d_gis_users.htm

#6
benbakelaar

benbakelaar

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 658 posts
  • Gender:Male
  • Location:North Brunswick, NJ
  • Interests:maps, information, technology, scripting, computers
  • United States

Wow this is a one-sided conversation here :) Look what I learned on the interweb.

http://72.14.205.104...lient=firefox-a

""
It turns out that the best definition is that two regions are adjacent if they touch along a border rather than at a single point, or even a finite number of individual points. So in the ?Four Corners? region of the U.S., Arizona and Colorado aren?t considered neighbors ? they could share a color.

Now for the miracle: four colors are always enough! Any map you can possibly create in 2 dimensions can be colored with at most 4 colors (provided, of course, we agree on the rules about boundaries). You can color
hundreds of maps to convince yourself this is true, but in math we would like to convince ourselves and each other about things like this in a more straightforward way. In other words, we want to prove it. But here?s a shock: our simple problem and simple answer took nearly 150 years to prove, with the best mathematicians trying hard all that time! Even now, the proof is complicated and requires a computer ? not so nice and neat as
mathematicians would like. The proof is not easy to understand, but you might enjoy looking at it anyway. There are some great references on the Internet, some of them by the mathematicians who came up with the latest proof. For a good discussion and some useful links, try http://www.math.gate.../fourcolor.html. You can also get a nice historical account of the development of this problem and its solution in the book Mathematics Today edited by Lynn Arthur Steen.
""

#7
Martin Gamache

Martin Gamache

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 980 posts
  • Gender:Male
  • Location:Washington DC
  • Interests:History of Topographic Cartography
    Topographic Mapping
    History of Relief Depiction
    Thematic Cartography
    Demographic Cartography
    Cartographic techniques, methods, and tools
    Orienteering
    Panoramic & Kite Photography
  • United States

An entire book was written on this subject a few years ago.

#8
MapMedia

MapMedia

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,029 posts
  • Gender:Male
  • Location:Davis, California
  • United States

That's fascinating. I tend to think that math (geometry, algebra, calc) are best attending the needs of geodesy, GIS, etc., and not the artistic elements of cartography (optimal colors) - basically there is no hard-line optimal rules. For a county map of the US, 4 colors wouldn't suffice for me (personally) or on a soils map. Science can inform our decisions (4 color theory), but ultimately a map should reflect the best a cartographer has to offer it in terms of technical and artistic skills & decisions. Meanwhile I think I'll put the book on my reading list - thanks for tip.

Wick - Let us know what solution you end up using.

#9
wick

wick

    Contributor

  • Validated Member
  • PipPip
  • 27 posts
  • Gender:Male
  • United States

Wick - Let us know what solution you end up using.


Sorry it's been a long time since I originally posted this.
My goal was to assign color values to each of the counties in the USA with a 1,2,3 or 4.

I first found the "Four Color Map" developer sample from ESRI. http://edndoc.esri.c...ourColorMap.htm
This works, but it was extremely slow to process even 1 state at a time (and I wanted them all!).

I ended up doing a few states manually before later finding "For Color a Map" (note the subtle name difference) on the ESRI forums. http://arcscripts.es....asp?dbid=14822
With this I installed a toolbox containing a simple tool that allowed be to fly through the entire USA counties dataset in seconds! The only work left to do was update the number value for island counties, as those were not given a 1,2,3 or 4.

Hope this helps.
Jesse Wickizer
Maps.com

#10
Kalai Selvan

Kalai Selvan

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 159 posts
  • Gender:Male
  • Location:India
  • Interests:Map Making & Map making
  • India

Wick - Let us know what solution you end up using.


Sorry it's been a long time since I originally posted this.
My goal was to assign color values to each of the counties in the USA with a 1,2,3 or 4.

I first found the "Four Color Map" developer sample from ESRI. http://edndoc.esri.c...ourColorMap.htm
This works, but it was extremely slow to process even 1 state at a time (and I wanted them all!).

I ended up doing a few states manually before later finding "For Color a Map" (note the subtle name difference) on the ESRI forums. http://arcscripts.es....asp?dbid=14822
With this I installed a toolbox containing a simple tool that allowed be to fly through the entire USA counties dataset in seconds! The only work left to do was update the number value for island counties, as those were not given a 1,2,3 or 4.

Hope this helps.



Hi!!!

I was surfing for a script to color my polygons, and saw this thread quite interesting.But i deed everything that the readme txt file said and to everthing written and said things to color my polygons, but everything was invain. can somebody suggest me any better script than this one which is easier to use. Or else will someone give me a step by step process to install this script, which includes dll registry to final coloring please. Coz i don't know what am i missing.

any help will be appreciated.
Thanks
GISGURU

Thanks and Regards
Kalai Selvan





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->