 Welcome to this course on programming for geospatial hydrological applications. I'm Hans van der Kwas, your lecturer, and I'm going to introduce you to the first module, which is an introduction to the command line and GDOL. Scripting languages are very important if you want to automate procedures. For example, if you want to do batch processing, or convert a lot of files at once without doing that for each individual file in a graphical user interface. Scripting is also important for advanced analysis and spatial dynamic modeling, as you will learn later in this course. We have to distinguish between high-level and low-level scripting languages. High-level scripting languages are much easier to use by scientists because they are very much readable, while low-level programming languages deal with all kinds of computer knowledge that scientists not necessarily have. Here are some examples of high-level scripting languages. We can use, for example, batch files in DOS or shell scripts in Linux to automate procedures. Many engineers learn how to use MATLAB or Python for their processes. Later in this course, you will learn Python, a programming language. There's also other examples like Perl, and you will later also learn PC Raster, which can be used for map algebra and dynamic modeling. R is also a very useful scripting language. So why should I learn scripting? As already mentioned, automation can save you a lot of time. I can give you an example of a student who came some time ago to meet. She was converting 800 modis netcdf files to GeoTiff, and she was doing it by hand in the QGIS interface. After 300, she came to me to ask if there was an easier way to do that, and of course then you can apply scripting in a couple of lines that you will learn later. You can solve this problem, and it will save you a lot of time. Scripts also keep things consistent. Once you have it in a script, you can repeat it in the same way over and over again. It also makes the knowledge portable. Because you can easily share the script with the input files and the user can then run the script and generate, in a consistent way, the output file and can read how you came to the result by reading the script. Scripting is also not as difficult as you think. Many people are afraid of working with the command line or writing code and prefer pushing buttons, but you will learn that it's more flexible if you know scripting. And if you don't learn these skills, someone else will, and these skills are very much appreciated in the labor market, especially if you are in GIS, modeling, engineering or want to make web applications. I'm going to give you a few examples. In the green screen, you see that we use a command line batch script to convert a set of files. And with the user interface, that would take you a lot of time. But here, in just five lines of code, we can convert all the TIFF files in this folder and change even the projection. Here you see an example of a Python script where we convert Idrisi GIS files, that's a certain format that came out of a model, 41 of these files, to convert it to the PCRaster time series format. And just with a couple of lines, we can run this and it will be applied to all the files in the folder and they will be converted at once. So a real time saver compared to if you want to do that in a graphical user interface in desktop software. In the first tutorial of this module, you're going to learn the command line. I was first exposed to the command line with MS-DOS, the Microsoft Disk Operating System. It was installed on all IBM compatible PCs in the 80s and the early 90s. We had to run our software from floppy disks and the early hard drives by using the commands, even if we wanted to start games. But when operating systems start moving to graphical user interfaces, the command line became less used, but it was always there and it's still there as the command prompt. For example, on your Windows machine, you can find the command prompt and from there you can still use the same commands that were used in those days, but there are also new ones added. So we're in the 21st century. Why do I need to learn all these command line skills? Well, it's not really back to the future. It's still around and you need to learn this because it gives you a better understanding about the file system and you need that when you do programming. You need to learn how to navigate in your file system and you need to learn how to use absolute and relative paths and what are the advantages and disadvantages of that. It's also very important to understand what is behind the graphical user interfaces. What is behind the buttons that you push? Does the button do what you expect or can you have more control on it? Also simple scripting with batch files is still used. When I do a search on my modern computer, I found 820 batch files. So it has been around and it will be around, so it's very useful if you want to learn programming and scripting. In this module, you will not only learn the command line, but you will also learn GDAL or GUDAL. The pronunciation depends on who you speak with. I will use GDAL. And GDAL is basically a library to translate between different raster and vector formats and also between projections and it can do even much more spatial analysis. It used a lot in different GIS software and often you will find it behind different buttons. In the GDAL tutorial of this module, we will try a few of these commands to convert between raster and vector formats and deal with projections. This is an example from QGIS where the GDAL Warp command is used. Here you can see that there's a dialogue build around it and every time we fill in something in the dialogue, it's added to the GDAL Warp command that is printed at the bottom of the dialogue. We can use that same command in the command line and even add arguments to it which are not supported by the user interface. So this is a good example to make the process transparent and flexible to be reused in other applications outside of the user interface. Later in this course, you will also learn how to use GDAL as a library in Python to do all kinds of conversions. In this example on the screen you see how we convert GeoTips to the PC Raster format and you see that it's almost human readable. But don't worry, you will learn more about this later. So in this module you need to complete two tutorials. The first one is an introduction to the command line and the second one is an introduction to GDAL where you use GDAL from the command line. For the first tutorial you can use the DOS emulator, the link is provided in the tutorial or you can use a command line from your operating system. For the second tutorial on GDAL you can use the OS Geo for W prompt that is provided with QGIS or you can use another prompt where GDAL is installed. Instructions for installing QGIS are also provided.