Customer Service | Training | Contact Us
You are here: Home > User Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects Visual Basic for Application (VBA) forum

Proportional Symbols for negative, positive...   Christopher Blinn Nov 06, 2009
Report Inappropriate Content • Top • Print • Reply    
Subject Proportional Symbols for negative, positive and zero values... really?! 
Author Christopher Blinn 
Date Nov 06, 2009 
Message So, I remember back in the day when I was told that if I were to ever make a proportional symbols map that all my values must be positive.

Well, I disagree...

I'm sitting here thinking that, you know what, I think you can map negative values, at least in my case. Maybe not, lets see what you think.

I know how to create a proportionalsymbolrenderer, assign the table, and you know the drill. But, for my newest challenges, I have made a form to map temperature deviations for airports in North America. So far, I just have simple graduated colors/symbols for selectable symbology in my form. I want to spice it up.

The negative values represent a cooling temperature deviation. I figured I could make 3 separate tables to make this happen. Make a cursor to select the values of the field, and If..Then statement to decide of the values are positive, negative or zero, then addRow or feature into the proper table for the corresponding values. For the negative values, I would take the absolute value, then add them into the table. Then make a new simplemarkersymbol for each field. This would work in terms of the sizes being correct because the greater the deviation, whether colder or warmer, would require a bigger symbol.

If I am out of my mind for thinking to attempt this, then please tell me before I spend hours writing useless code. Having said that, below is a pseudo code of my approach for this project. Let me know if I am forgetting something, or need to fix anything!

Hopefully, if this works, it can help people realize that making proportional symbol maps with any values is feasible.

 
 
Set FeatureCursor = Field.Search(Nothing, True)

If Feature.Value(Field.Index or Integer if known) = 0 Then
TableZero.AddRow = Feature
Set propsymrendererzero = new propsymrenderer
      With propsymrendererzero
             blah
             blah
             blah etc.
ElseIf Feature.Value(Field.Index or Integer if known) > 0 Then
TablePositive.AddRow = Feature
Set propsymrendererpositive = new propsymrenderer
             With propsymrendererpositive
             blah
             blah
             blah etc.
ElseIf Feature.Value(Field.Index or Integer if known) < 0 Then
y = abs(feature.Value(Field.Index or Integer if known))
TableNegative.AddRow = y
Set propsymrenderernegative = new propsymrenderer
             With propsymrenderernegative
             blah
             blah
             blah etc.
End If

From here, I know how to assign the proper field to the renderer, but is this a logical approach?