Ask A Cartographer

Symbolizing stream flow with width and temperature with color

November 21 2008 | 11 comments

Recently I was asked if I could depict stream flow with the width of the stream line and stream temperature with a color ramp. I corrected the stream course on Washington DFW fish hydro layer and created the routes again. I stuck in some test data in an event table to create interpolated data between two sample points with the interpolated reaches at 10000 ft. apart. Then I tried multiple attributes symbology, but seem to be able to get either color or line width but not both. I haven't tried multiple attributes before so this might be my only remaining obstacle.

Mapping Center Answer:

The software currently does not support automatically symbolizing two quantitative variables, which is what you have (stream flow and stream temperature). We've got a number of ArcObjects examples (this one works for point symbols so I think it will also work for lines):

http://edndoc.esri.com/arcobjects/9.2/CPP_VB6_VBA_VCPP_Doc/COM_Samples_Docs/Cartography/Renderers/Bivariate_Renderers/73e5062c-16c5-4fa1-b18c-92022a6c4393.htm

It should do what you're asking for, but you'll need to install the .dll file (use the link at the bottom of the web page).

But I think I got it. posted by Paul Huffman on Nov 21 2008 1:31PM
I wasn't getting anything from repeated readings of the Help entry on "Drawing features to show multiple attributes". Just couldn't understand it. I tried a couple different ways of setting up multiple attributes in the symbology dialog, and it looks like I got it to work. See http://ykfp.org/images/testdata.jpg . It looks like for each temperature interval, there are four different line widths for stream flow. Now I'll have to see if I can improve the legend. Maybe I need to add the event table in twice more and just symbolize on one variable and have just these extra versions of the event table show in the legend.
Looks good! posted by Aileen Buckley on Nov 21 2008 1:36PM
This looks good! This is the way I have done it in the past as well -- create groups of features for one of the quantitative attributes and then symbolize within each group for the other attribute. Too bad we don't have this automated yet, but your map looks good!

You can, of course, work with the legend as a graphic by right clicking and converting it to graphics, then ungrouping it a few times to get to each individual element.

P.S. You might want to reduce the number of decimal points in your legend - my guess is that this ESRI default is too precise for your data -- it usually is!
But now I can't repeat posted by Paul Huffman on Feb 4 2009 8:48AM
Now that I have a big table with real data, I can't seem to to it again. It looks like I didn't save that old map. I'm going back in to Multiple Attributes tab again, randomly pushing buttons.
Multiple layers or tech support posted by Aileen Buckley on Feb 4 2009 4:35PM
I am a little confused by the description of your problem so I wonder if this might be an opportunity for you to contact tech support.

Regarding the symbology tab - I do not think that Multiple Attributes will do it for you -- that will only work if you have one qualitative variable and one quantitative variable.

One thing you could try is to create a new layer for each of the stream width categories, and within that you can classify the stream by temperature. Then set the colors so that the symbol for each stream temperature class is the same for each layer. Then for each layer, change the width of all the symbols so that they are all the same.
Separate layers posted by Paul Huffman on Feb 13 2009 9:09AM
I tried the method of making separate layers for temperature ranges from my data set. A problem with doing this was I could no longer use Proportional symbols for the stream width for stream flows. Each layer had a different range of flows so the symbols were proportioned differently and stream widths wouldn't match up where the temperature layers abutted. I was forced to go to Graduated symbols. Now I have 12 different flow ranges symbolized by width within 7 different temperature range layers. http://ykfp.org/images/catsymbols.jpg It's too bad that now the temperature colors abruptly change when I set up the event table to model changing temperature and flow every 1000 ft. I also need to figure out how to simplify the legend. Maybe I'll have to create a dummy layer of just temperature and one of just flow as the only items in the legend.
Compile error posted by Paul Huffman on Feb 13 2009 11:04AM
I hit a compile error when I try to use the EDN |Bivariate Renderer script. I get User-defined type not defined when I hit the line Set pBivariateRend = New BivariateRenderers.ColorSzBivariateRend. What dependency to I need?
Separate layers - answer posted by Aileen Buckley on Feb 13 2009 3:30PM
You wrote: I tried the method of making separate layers for temperature ranges from my data set. A problem with doing this was I could no longer use Proportional symbols for the stream width for stream flows. Each layer had a different range of flows so the symbols were proportioned differently and stream widths wouldn't match up where the temperature layers abutted. I was forced to go to Graduated symbols. Now I have 12 different flow ranges symbolized by width within 7 different temperature range layers. http://ykfp.org/images/catsymbols.jpg

Answer: Yes – this is what you would expect since the proportional symbols calculation would only take into account the data within the layer. However, you could get around this by using all features in each of the layers and using a Definition Query to set the visibility of the features. You could add, in your case, an attribute for Temp_Class, and each stream would contain a number from 1-7. Each layer would have a Definition Query that displays only one of the temperature range classes. That way the whole data set would be used in the proportional symbol size calculation but only the one temperature range class would be shown in the display.

So where does that leave you – you have 7 layers for the temperature ranges. Each of these are symbolized with a different color, say for example, ROYGBIV (red, orange, yellow, green, blue, indigo, violet). Within each of these layers, you can use proportional symbols to show stream flow. Because you are using the full data set in the calculation of the proportional symbol size, and a definition query to show only those features in that temperature range class, your symbols should have the right colors and the right widths.

You wrote: It's too bad that now the temperature colors abruptly change when I set up the event table to model changing temperature and flow every 1000 ft.

Answer: I guess I don’t understand this – the colors come from color you assign to each of your 7 temperature range classes. Since you only have 7 classes, the colors are probably going to be abrupt, especially if you use something like ROYGBIV. But the good thing is that your map readers will be able to see the distinct classes.

You wrote: I also need to figure out how to simplify the legend. Maybe I'll have to create a dummy layer of just temperature and one of just flow as the only items in the legend.

Answer: You will not be able to automate the whole legend – you can right click the legend in your data frame and convert it to graphics and then customize that.
Compile error - answer posted by Aileen Buckley on Feb 13 2009 3:34PM
Since this is a script on the EDN site, and I see you posted a comment there as well, they are the better ones to help you with this.
bizzare results with proportional symbols posted by Paul Huffman on Feb 18 2009 4:49PM
Last week, I started having some bizarre results with proportional symbols in my situation. I keep trying to get the symbol widths to match up between temperature zones but sometimes they would irreversibly revert to a narrow width, even when I would go back to change the min value line thickness back to the standard value I had picked. And when I checked the min value thickness had not changed. I tried setting up the proportional symbol range first, then copied the layer several times, then set up the temperature intervals, and that would work until the third temperature range and the line width would revert.

I rebooted the XP and brought the map back up and the TOC was filled with red marks indicating data source missing. I investigated an found the DBF table had disappeared! Believe me or not.

I started over. I retrieved the DBF table from my email inbox. I started a new map and added in just the stream route layer and the table as route events with line widths proportional to flow. Then I made six copies of the proportional flow layer. Then I added a query in each proportional flow layer to select one temperature zone. Was able to create a map with the line width proportional to sqrt flow, 6/23, and temperatures are in colors for temperature intervals. But still if I go back into the layer properties to check the values in a query, sometimes the line width will revert to narrow. I can fix this only by blanking out the query and retyping the query.

I just received and installed 9.3. Maybe my problems will be fixed. Maybe I'll just get a new set of problems.

I still need to figure out how to represent the temperature range colors in the legend.
Multiple Attributes and group values posted by Paul Huffman on Feb 19 2009 3:30PM
I think I figured out how I did this back in November with multiple attributes. I have been able to get good results by using multiple attributes, adding in the temperatures as the value field, adding all values, then grouping them by selecting then right clicking and using group values, manually selecting a color and label for each temperature group, then hitting the symbol size button and using flow for the symbol size. Maybe just as much work as adding in the layer 6 or seven times to the map, then using a different query in each layer instance to get a unique temperature range.

Either way, I don't think I can get the legend to automate. I may have to use a graphic or have the legend to display dummy data outside the map frame or entirely covered by the real feature.
Legend for bivariate symbology posted by Aileen Buckley on Feb 22 2009 1:03PM
Yes, you will need to make a custom legend. A good place to start is to add the default legend and then right click it and select "Convert to graphics". Then you can ungroup the graphic to get to the individual parts. Sometimes you have to ungroup more than once to get to the individual part you want.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |