European river and catchment database, version 2.0 (CCM2) analysis tools.
Date: 2007-06-29
Institutions: Institute for Environment and Sustainability
Subjects: data processing, database, environmental research, hydrology, watercourse

CCM River and Catchment Database 

Version 2.0 

Analysis Tools 

Jürgen Vogt  and  Stéphanie Foisneau 

2007 

EUR 22649 EN 

 
 
The mission of the Institute for Environment and Sustainability is to provide scientific and 
technical support to the European Union’s policies for protecting the environment and the 
EU Strategy for Sustainable Development.   

European Commission 
Directorate-General Joint Research Centre 
Institute for Environment and Sustainability 

Contact information: 
Address:      
E-mail:       
Tel.:       
Fax:       

Dr. Jürgen Vogt 
TP 262, 21020 Ispra (Varese), Italy 
juergen.vogt@jrc.it 
+39-0332-785481 
+39-0332-789803 

http://agrienv.jrc.it 
http://ies.jrc.cec.eu.int 
http://www.jrc.cec.eu.int 

Legal Notice  
Neither the European Commission nor any person acting on behalf of the Commission 
is responsible for the use which might be made of this publication. 

A great deal of additional information on the European Union is available on the Internet. 
It can be accessed through the Europa server 
http://europa.eu 

EUR   22649 EN 
ISBN  978-92-79-04872-2 
ISSN  1018-5593 
Luxembourg: Office for Official Publications of the European Communities 

© European Communities, 2007 

Reproduction is authorised provided the source is acknowledged 

Printed in Italy 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
European River and Catchment 
Database 

Version 2.0 (CCM2) 

Analysis Tools  

Jürgen Vogt  and  Stéphanie Foisneau 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Table of Contents 

Table of Contents....................................................................................................... 5 

1. 

Introduction......................................................................................................... 6 

2.  Theoretical Concepts ......................................................................................... 6 

2.1.  Strahler Order........................................................................................ 6 

2.2.  Pfafstetter Hydrological Feature Codes ................................................ 8 

3.  Analysis Tools .................................................................................................. 12 

3.1. 

Installing the Tools .............................................................................. 12 

3.1.1.  Registering the Tools ............................................................ 12 

3.1.2.  Declaring the Tools in ArcGIS ............................................... 13 

3.2.  Uninstalling the Tools .......................................................................... 14 

3.3.   Upstream – Downstream Analysis Tool .............................................. 14 

3.3.1.  How to Use the Tool.............................................................. 14 

3.3.2.  Error Messages ..................................................................... 15 

3.3.3.  Known Limitations and Areas of on-going Development....... 15 

3.4.  Station Catchment Tool....................................................................... 16 

3.4.1.  How to Use the Tool.............................................................. 16 

3.4.2.  Error Messages ..................................................................... 17 

3.4.3.   How to Suppress the Labels ................................................. 17 

3.4.4.  Known limitations and areas of on-going development ......... 18 

References............................................................................................................... 19 

 
Page 6 of 22 

J. Vogt and S. Foisneau (2007): 

1. 

Introduction 

The CCM River and Catchment Database for Europe contains digital data on river 
networks  and  catchment  boundaries  for  the  entire  European  continent.  The  data 
are structured in a nested manner from small river reaches and their catchments 
to  large  rivers  and  their  river  basins.  Different  hierarchical  catchment  levels  are 
linked to each other and river reaches are linked to their catchments (i.e. the area 
they drain) through a common identifier. 

River  reaches  and  catchments  carry  a  set  of  attributes,  including  their  Strahler 
Order  and  their  Pfafstetter  Hydrological  Feature  Code.  Both  attributes  are 
fundamental  for  understanding  and  analysing  the  data  and  are  briefly  introduced 
below.  Detailed  descriptions  of  the  development  of  the  database,  the  underlying 
data and the characteristics of the database are given in Vogt et al. 2007.  

Following this introduction we explain the theoretical concepts of Strahler ordering 
and  of  Pfafstetter  coding,  followed  by  the  description  of  two  tools,  which  were 
developed  to  support  working  with  the  database.  The  first  one  allows  analysing 
upstream  –  downstream  relationships  within  river  networks.  It  is  based  on  the 
Pfafstetter  hydrological  feature  codes.  The  second  one  allows  for  displaying  the 
catchment of a hydrological monitoring station by clicking on the station. This tool 
is specific to a set of several thousand stations from EEA’s Waterbase, which have 
been located within the CCM River and Catchment database.  

2. 

Theoretical Concepts 

2.1.  Strahler Order 

The  Strahler  order  (Strahler  1957,  1964)  is  based  on  the  structure  of  the  river 
network  and  reflects  the  level  of  each  river  reach  in  the  hierarchy  of  the  river 
network.  Strahler  ordering  starts  from  the  smallest  river  reaches  having  no 
tributaries,  which  obtain  a  Strahler  order  of  one  (so-called  first  order  channels). 
When two first order channels join, a second order channel is formed. This second 
order  channel  extends  down  to  the  point,  where  it  joins  another  second  order 
channel.  At  this  point  a  third  order  channel  is  formed,  and  so  on.  If  a  channel  of 
any  given  order  joins  a  channel  of  a  higher  order  (e.g.,  a  channel  of  order  one 
joins  a  channel  of  order  two  or  three)  no  increase  in  Strahler  order  occurs.  The 
trunk  stream  of  any  catchment  carries  the  highest  order  of  the  entire  upstream 
system.  The  principle  is  illustrated  for  the  Thames  River  Basin  (UK)  in  Figure  1 
below. 

 
 
CCM – Version 2.0 Analysis Tools 

Page 7 of 22 

River Mouth. 
Trunk Stream 
of Strahler 
Order 5 

Thames River Basin, UK: Principle of Strahler Ordering. 

Figure 1:  

The  Strahler  system  of  a  river  network  carries  information  on  the  dimension  and 
complexity  of  a  drainage  network  and  serves  as  a  basis  for  the  calculation  of  a 
series of characteristics of the system (Strahler 1964). The Thames river basin as 
shown in figure one, for example, obtains a Strahler order of five in the CCM River 
and Catchment Database. The Danube River Basin in contrast reaches an order 
of nine due to its larger size and higher complexity.   

Strahler  orders  are  an  easy  way  to  group  river  reaches  and  catchments 
hierarchically.  Therefore  all  catchments  carry  the  Strahler  order  as  an  attribute. 
The  principle  is  illustrated  in  Figure  2,  where  different  levels  of  catchments  (sub-
basins) of the Thames River Basin are shown.  

 
 
 
 
 
 
 
 
 
 
Page 8 of 22 

J. Vogt and S. Foisneau (2007): 

Strahler Order 1 

Strahler Order 2 

Strahler Order 3 

Strahler Order 4 

Figure 2:  

Thames River Basin: Sub-basins (catchments) of Strahler Orders 1 to 4. 

2.2.  Pfafstetter Hydrological Feature Codes 

A more complex and smart way to characterise the structure of a river network is 
the assignment of structured hydrological feature codes. The Pfafstetter system is 
an example of such a coding system that is widely used. It consists of a numbering 
scheme  developed  by  Otto  Pfafstetter,  a  Brazilian  engineer  (Verdin  and  Verdin, 
1999). This system has been recommended by the GIS Working Group under the 
Common Implementation Strategy for the Water Framework Directive (Vogt et al., 
2002).  

Following  the  Pfafstetter  logic,  river  basins  and  drainage  networks  are  tagged 
according  to  a  numbering  scheme  based  upon  the  topology  of  the  drainage 
network and the size of the surface area drained. The numbering scheme is self-
replicating, making it possible to provide identification numbers to the level of the 
smallest  river  reaches  and  sub  basins.  For  a  given  location  it  is  possible  to 

 
 
 
 
 
 
 
CCM – Version 2.0 Analysis Tools 

Page 9 of 22 

automatically  identify  all  upstream  sub  basins,  all  upstream  river  reaches,  or  all 
downstream reaches solely from the code without the need to look at a graphical 
representation  of  the  river  network  itself.    This  allows  for  fast  queries  on  a 
database. 

For assigning Pfafstetter codes first the main stem of the river network of a given 
river  basin  has  to  be  identified.  This  can,  for  example,  be  done  automatically, 
based  on  the  flow  length.  Once  the  main  stem  is  identified,  the  area  drained  by 
this  river  (the  river  basin)  is  subdivided  into  coded  sub-basins  and  inter-basins. 
The  four  largest  tributaries,  according  to  the  criterion  of  area  drained,  form  sub-
basins. These are assigned the numbers 2, 4, 6, and 8, in the order in which they 
are encountered as one goes upstream along the main stem.  

Next,  the  inter-basins  are  numbered  1,  3,  5,  7,  and  9,  again  working  upstream 
from  the  mouth  of  the  main  stem.  Inter-basin  1  is  the  area  drained  by  the  main 
stem  between  the  mouth  of  sub-basin  2  and  the  mouth  of  the  main  stem.  Inter-
basin 3 is the area drained by the main stem between the mouths of sub-basins 2 
and 4. Inter-basin 9 always consists of the headwaters area of the main stem, and 
by definition always drains more area than sub-basin 8 (9 being the remainder of 
the main stem and hence more significant than 8, a tributary). If a closed basin is 
encountered, it is assigned the number 0 (zero).  

It should be noted that the river reaches along the main stem are identified by the 
inter-basin  codes.  Ultimately,  the  inter-basin  codes  define  the  full  river  network. 
They also identify the areas that drain in a diffused manner into that network. This 
system is then iteratively repeated for the sub-basins and inter-basins down to the 
level of the smallest river reaches. Due to its characteristics the Pfafstetter system 
allows  to  add  more  detail  as  more  information  becomes  available,  without 
necessarily disrupting the higher level codes. 

Figure 3 demonstrates the principle of Pfafstetter coding. The resulting coding for 
the Thames River basin is shown in Figures 4 and 5. 

5
5

41
41

42
42

43
43

Sub-basins 46x
Sub-basins 46x

462
462

465
465

461
461

463
463

464
464

45
45

47
47

44
44

48
48

466
466

467
467

49
49

Sea
Sea

4
4

3
3

Principle of Pfafstetter Coding for a Hypothetical River Basin with Code 4. 

Figure 3:  

 
Page 10 of 22 

J. Vogt and S. Foisneau (2007): 

Figure 4:  

Thames River Basin: Pfafstetter Codes of Level 2. 

Figure 5:  

Thames River Basin: Full Pfafstetter Codes. 

 
 
 
CCM – Version 2.0 Analysis Tools 

Page 11 of 22 

Once  Pfafstetter  codes  are  assigned,  they  can  be  used  to  analyse  upstream-
downstream relationships within a river network and its sub-basins. The analysis is 
based on simple larger-smaller and odd-even comparisons of the individual digits 
of the code. An example is given in Figure 6. 

Figure 6:  

Example of Analysing Pfafstetter Codes. 

Figure  6  illustrates  the  concept  for  identifying  river  stretches  affected  by  a  point 
source  pollution  entering  the  system  in  the  branch  with  code  464.    Note  that  the 
code  is  not  to  be  understood  as  a  number  (i.e.  fourhundertsixtyfour)  but  that  the 
individual  digits  of  the  code  have  to  be  considered  (i.e.  four-six-four).  In  the 
example a point source pollution enters the drainage system at branch 4-6-4 of a 
hypothetical  river  basin  with  code  4.  By  simple  larger-smaller  and  odd-even 
comparisons  of  the  different  digits,  potentially  polluted  stretches  can  easily  be 
identified. Detailed explanations are given in the figure. The same applies for the 
identification of upstream river stretches and their catchments. An example for the 
latter  case  would  be  the  identification  of  potential  source  areas  for  a  pollution 
measured at a given point in the system.  

The simplicity of the code and the fact that it implicitly encodes the topology of the 
system  allows  for  the  development  of  automatic  queries  on  a  database  without 
even displaying the river system graphically.  

 
 
 
Page 12 of 22 

J. Vogt and S. Foisneau (2007): 

3. 

Analysis Tools 

The tools described below have been developed in Visual Basic and are delivered 
in the form of Dynamic Link Libraries (DLL). Each DLL needs to be registered with 
the operating system and declared in ArcGIS. After that, the tools will be usable as 
an extension to ArcGIS.  

3.1. 

Installing the Tools 

3.1.1. Registering the Tools 

Before using a tool, it needs first to be registered: 

1.  Save the DLL in a directory of your choice.  

2.  Open the Windows Start menu and launch the Run window.  

3.  Type regsvr32.exe <Your Path> <DLL Name>: 

4.  Click OK.  

The  following  window  should  appear  to  indicate  that  the  registration  was 
successful. 

 
 
 
 
 
 
 
 
 
 
 
 
CCM – Version 2.0 Analysis Tools 

Page 13 of 22 

3.1.2. Declaring the Tools in ArcGIS 

The second step consists in declaring the tool in ArcGIS.  

1.  Open the Tools menu and then the Customize dialog.  

2.  Select an existing toolbar or optionally click on New to define your personal 

toolbar.  

3.  Under the Commands tab, click on Add from file and select the Tool to be 

declared.  

4.  Drag the tool into an existing or your personal toolbar. 

5.  If the corresponding toolbar is activated, the tool icon should now be visible 

in ArcGIS. 

 
 
 
 
 
 
Page 14 of 22 

J. Vogt and S. Foisneau (2007): 

3.2.  Uninstalling the Tools 

In case you want to uninstall a tool, use the un-register command  

1.  Open the Windows Start menu and launch the Run window.  

2.  Type regsvr32.exe /u   <Your Path> <DLL Name>: 

3.3.   Upstream – Downstream Analysis Tool 

The  DisplayUpstreamDownstream  GIS  Tool  allows  to  identify  and  to  display 
both the upstream and the downstream river segments with respect to a selected 
segment of a river. The purpose of this tool is to rapidly identify river stretches that 
can  be  affected  by  a  pollution  entering  the  river  network  in  the  selected  river 
segment and/or to identify the potential source area of a pollution measured in the 
selected river segment. 

3.3.1. How to Use the Tool 

1.  In  the  ArcGIS  Layers  list,  select  the  river  layer  for  which  you  want  to 

display the upstream and the downstream rivers. 

2.  Click on the tool icon  

. 

3.  Click on one river segment you want to study.  

All upstream rivers  will display in orange, the downstream  river stretches in thick 
blue and the selected river stretch itself in yellow. 

Select River Layer ! 

 
 
 
 
 
 
 
CCM – Version 2.0 Analysis Tools 

Page 15 of 22 

3.3.2. Error Messages 

In  case  you  did  not  select  a  river  layer  layer,  the  following  error  message  will 
appear. 

If the selected river theme doesn’t have the Pfafstetter information, the following 
error message will appear. 

3.3.3. Known Limitations and Areas of on-going Development 

The current Upstream/Downstream tool is a prototype developed with data from 
the  CCM  River  and  Catchment  database,  version  1.2.  It  will  need  to  be  tested 
with  and  adapted  to  the  upcoming  version  2.0  of  the  database,  which  will 
contain  Pfafstetter  codes  amended  by  unique  identifiers  for  all  European  river 
basins and coastal waters.  

 
 
 
 
 
 
 
 
 
 
 
 
Page 16 of 22 

J. Vogt and S. Foisneau (2007): 

3.4.  Station Catchment Tool  

The  AddCatchment  GIS  Tool  allows  loading  the  catchment  of  a  selected 
measurement station into the ArcGIS project. 

3.4.1. How to Use the Tool 

1.  Select the station layer in the layers list. 

2.  Click on the tool icon  

. 

3.  Click on a station for which you want to load and display its 

corresponding catchment. 

4.  The catchment of the station will be loaded and displayed. At the same 

time the station will be labelled with its station code (STATCODE). 

 
 
 
 
 
 
 
 
 
 
CCM – Version 2.0 Analysis Tools 

Page 17 of 22 

3.4.2. Error Messages  

In  case  you  did  not  select  a  station  layer  in  the  layers  list,  the  following  error 
message will appear: 

If  the  selected  station  layer  does  not  point  to  the  EEA  Eurowaternet  Stations 
positioned on the CCM River network, the following error message will appear: 

3.4.3.  How to Suppress the Labels  

To suppress the station label created by the tool:  

1.  Open the Properties Window of the station layer  

2.  Open the Labels Tab 

3.  Select the “LabelSel” and delete it. 

 
 
 
 
 
 
 
 
 
 
Page 18 of 22 

J. Vogt and S. Foisneau (2007): 

3.4.4. Known limitations and areas of on-going development 

The  current  AddCatchment  tool  is  a  prototype  developed  with  data  from  the 
CCM River and Catchment database, version 1.2. It will need to be tested with 
and  adapted  to  the  upcoming  version  2.0  of  the  database.  Currently  the  tool 
works  with  station  and  catchment  data  stored  on  path  \agrienv\elisa\database\ 
eurowaternet2004,  which  contains  the  measurement  stations  for  the  stations 
stored in the EEA-Waterbase 2004 and their corresponding catchments. 

 
 
 
 
CCM – Version 2.0 Analysis Tools 

Page 19 of 22 

References 

Britton, P. (2002): Review of Existing River Basin Coding Systems. WFD GIS 

Working Group, October 2002, http://193.178.1.168/River_Codin_Review.htm, 
29 p. 

Strahler, A.N. (1957): Quantitative Analysis of Watershed Geomorphology. Trans. 

Am. Geophys. Union. 38: 913-929. 

Strahler, A.N. (1964): Quantitative Geomorphology of Drainage Basins and 
Channel Networks. In: V.T. Chow (Ed.) Handbook of Applied Hydrology. 
McGraw Hill, New York, 4.39 - 4.76. 

Verdin, K. L., Verdin, J. P.  (1999): A Topological System for Delineation and 

Codification of the Earth's River Basins. J. of Hydr., 218: 1-12 

Vogt, J.V. (Ed.) (2002): Guidance Document on Implementing the GIS Elements 
of the Water Framework Directive. EC-JRC, (EUR 20544 EN) Luxembourg, 
166 p. http://agrienv.jrc.it/publications/pdfs/GIS-GD.pdf 

Vogt, J.V., P. Soille, A. de Jager, W. Mehl, E. Rimaviciute, P. Haastrup, K. Bodis, 
J. Dusart, M.L. Paracchini, C. Bamps, S. Foisneau (2007):  CCM River and 
Catchment Database. Version 2.0.  European Commission. (in preparation, 
check http:/agrienv/publications). 

 
 
 
 
European Commission 

EUR 22649 EN 

DG Joint Research Centre, Institute for the Environment and Sustainability 

Title:  

European  River  and  Catchment  Database  –  Version  2.0  (CCM2)  – 
Analysis Tools 

Authors:  Jürgen Vogt, Stéphanie Foisneau 

Luxembourg: Office for Official Publications of the European Communities 

2007 – 22 pp. – 21.0 x 29.7 cm 

EUR - Scientific and Technical Research series; ISSN 1018-5593 

ISBN 978-92-79-04872-2 

Abstract 

The  CCM  River  and  Catchment  Database  for  Europe  contains  digital  data  on 
river networks and catchment boundaries for the entire European continent. The 
data  are  structured  in  a  nested  manner  from  small  river  reaches  and  their 
catchments  to  large  rivers  and  their  river  basins.  Different  hierarchical 
catchment  levels  are  linked  to  each  other  and  river  reaches  are  linked  to  their 
catchments (i.e. the area they drain) through a common identifier. 

River reaches and catchments carry a set of attributes, including their Strahler 
Order  and  their  Pfafstetter  Hydrological  Feature  Code.  Both  attributes  are 
fundamental 
the  data  and  are  briefly 
introduced.  

for  understanding  and  analysing 

In this document the theoretical concepts of Strahler ordering and of Pfafstetter 
coding  are  explained,  followed  by  the  description  of  two  tools  that  were 
developed  to  support  working  with  the  CCM  River  and  Catchment  database. 
The first one allows analysing upstream – downstream relationships within river 
networks. It is based on the Pfafstetter hydrological feature codes. The second 
one allows for displaying the catchment of a hydrological monitoring station by 
clicking on the station. This tool is specific to a set of several thousand stations 
from  EEA’s  Waterbase,  which  have  been  located  within  the  CCM  River  and 
Catchment database.  

 
 
 
 
 
 
 
 
 
 
The  mission  of  the  JRC  is  to  provide  customer-driven  scientific  and  technical 
support for the conception, development, implementation and monitoring of EU 
policies.  As  a  service  of  the  European  Commission,  the  JRC  functions  as  a 
reference  centre  of  science  and  technology  for  the  Union.  Close  to  the  policy-
making  process,  it  serves  the  common  interest  of  the  Member  States,  while 
being independent of special interests, whether private or national. 

-

L
B
N
A
-
2
2
6
4
9
-
E
N
N

-