Symbology for an unlimited number of polygons

2266
2
Jump to solution
10-20-2015 02:59 PM
LoriKoepsell1
New Contributor III

I have an SQL database that I use in a geoprocessing service that is published to a web page.  The users on the webpage can add or delete points.  The SQL automatically assigns random numbers to those that are added so that each is unique.  The geoprocessing service creates a viewshed polygon based on user provided parameters.   The results are then displayed in the web viewer.  I am running into problems with symbolizing those polygons.  My first attempt was to user Layer Properties and the Symbology Tab choosing Categories and Unique Values.  I added in values using "Add Values".  I added in values to 100.  That works fine as long as the random number stays lower than 100.  What I have been finding is that the SQL  is really random and I have gotten numbers in the 10, 100's and now 1000's.  I can probably hand add all those in but even then I can't be sure that the numbers automatically assigned won't be 5000's.  How can I set the symbology to be unique to the randomly assigned number yet not have to worry about "Add Values" .   Thanks for any help on this. -Lori

0 Kudos
1 Solution

Accepted Solutions
LoriKoepsell1
New Contributor III

HI Dan, Thanks for your thoughts on this.  My problem was a bit different that the color shading.  I have an unknown number of points being selected out of the SQL.  I would run a viewshed on each and then try to display those results in an Appended feature class.  I tried making symbols for them by to going into the Properties/Symbology Tab.  I had tried using the "Add Value" and putting in numbers from 1 - 100 so that the resulting Viewshed would "look through" all the choices available to display - find the one that matched to the point number (i.e. if the point had an ID of 3 and it would use the 3 in the Symbol Value to display a purple polygon).  It had worked just fine up until recently when the SQL had started randomly assigning an ID number  of 1000 and above.  It quickly occurred to me that I can't manually add in numbers in the "Add Values" to go beyond 1000.  My solution in the end was to create a python script that searched for each point ID, if the ID was one number then it reassigns it to a 1 (I added a new Field to the feature class for this new number) as the script moves through the pointID field and it finds a new number it reassigns a 2, and so on.  I then can use a much smaller number of polygon symbols and is much easier to display and see -- like you mention above.  Thanks again for your help on this.  - Lori

View solution in original post

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

Late I suppose...but I wouldn't even bother, the human eye wouldn't recognize more than a few 10's of symbols as being different.

0 Kudos
LoriKoepsell1
New Contributor III

HI Dan, Thanks for your thoughts on this.  My problem was a bit different that the color shading.  I have an unknown number of points being selected out of the SQL.  I would run a viewshed on each and then try to display those results in an Appended feature class.  I tried making symbols for them by to going into the Properties/Symbology Tab.  I had tried using the "Add Value" and putting in numbers from 1 - 100 so that the resulting Viewshed would "look through" all the choices available to display - find the one that matched to the point number (i.e. if the point had an ID of 3 and it would use the 3 in the Symbol Value to display a purple polygon).  It had worked just fine up until recently when the SQL had started randomly assigning an ID number  of 1000 and above.  It quickly occurred to me that I can't manually add in numbers in the "Add Values" to go beyond 1000.  My solution in the end was to create a python script that searched for each point ID, if the ID was one number then it reassigns it to a 1 (I added a new Field to the feature class for this new number) as the script moves through the pointID field and it finds a new number it reassigns a 2, and so on.  I then can use a much smaller number of polygon symbols and is much easier to display and see -- like you mention above.  Thanks again for your help on this.  - Lori

0 Kudos