Qgis Then and Now

QGIS turns twenty this year. I wrote the first lines of code in mid-February of 2002.

As many of you may know, the first time the code compiled and ran, it could do one thing:

  • Connect to a PostGIS database and draw a vector layer.

This was the humble beginning of one of the most popular open source GIS applications. GRASS GIS is of course the grandaddy of open source GIS, but the 20th birthday of QGIS is a testament to its longevity and commitment of all those who have made it what it is today.

I did an analysis of the code using cloc, which counts the lines of code and displays a summary.

The first listing is for the code base as it stood in 2002 when first checked into CVS [1] on SourceForge. From the table below you can see it consisted of 30 files and a total of 2,173 lines of “code”:

github.com/AlDanial/cloc v 1.86  T=0.02 s (1331.4 files/s, 121821.7 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C++                             12             93            126            996
Qt                               3              0              0            775
C/C++ Header                    13             91            183            206
make                             1             59             15            169
qmake                            1              1              4             27
-------------------------------------------------------------------------------
SUM:                            30            244            328           2173
-------------------------------------------------------------------------------

The second analysis is from a fresh checkout of the code base today. The difference is really astounding, even considering the time that has gone into development since the beginning:

github.com/AlDanial/cloc v 1.86  T=9.89 s (278.1 files/s, 269839.7 lines/s)
---------------------------------------------------------------------------------------
Language                             files          blank        comment           code
---------------------------------------------------------------------------------------
Qt Linguist                             45           3307              0        1731810
C                                       26          11680          53117         236881
C++                                    684          44309          33493         233137
SVG                                    414            417            361          91748
Qt                                     220              2              0          60544
C/C++ Header                           734          18064          40561          44466
Python                                 102           5384           4915          19916
XML                                    317            339             26          12109
CMake                                  122           1440           1284           5897
HTML                                     7            564             12           5138
Bourne Shell                            33            303            355           1752
QML                                     17              0              0           1299
Perl                                     9            280            272            857
XMI                                      1             11              0            575
DOS Batch                                7            135             24            474
make                                     1             37             19            138
SQL                                      2             17             32            129
CSS                                      2              3              0            102
DTD                                      1             11             42             81
m4                                       1             16             11             74
XSD                                      1              0              0             49
Windows Module Definition                1              2              0             40
Scheme                                   1              0              0             24
Bourne Again Shell                       1              2             15              5
Windows Resource File                    1              0              0              1
---------------------------------------------------------------------------------------
SUM:                                  2750          86323         134539        2447246
---------------------------------------------------------------------------------------

That’s over 2.4 million lines of code and 2,750 files. Never in my wildest dream would I have imagined the project would look like this 20 years later and there’s no sign that progress is slowing down.

Kudos to all those that have contributed over the years and those that continue to make QGIS a fantastic tool that anyone can afford. The impact of those efforts can never be quantitatively measured [2], but if it were, I’m sure we’d all be surprised.

[1] The QGIS code base used version control from the beginning and over the years transitioned from CVS to SVN (subversion), and finally git.

[2] QGIS doesn’t track users or keep any metrics on use apart from downloads from the website, which provides a small indication of the user base.