Ok, the third value is the river identifier number. Each contiguous river has its own unique number. If you start and stop in the middle of drawing a river in Map Editor, the unique identifier can change and cause the rivers not to join.
Also, those of you have have played around with making maps and end up with these strange black squares on your map, those are unattached river squares. You can edit the XML to remove them. Just look for a river tile with those coordinates and delete it or change the Unique Identifier to match the river it belongs to.
I still have not decoded those last 4 but I can now place or fix a river by looking for another river tile going in the same direction and copying it then matching the Unique Identifier.