Most of the Windows users will install QGIS via the so called ‘stand alone installer’ which they download from download.qgis.org. For most of the users this is the easiest and most well know way to install a desktop program.
But QGIS has another Windows install possibility. And that is a so called osgeo4w installation ( osgeo4w.osgeo.org ). osgeo4w stands for ‘Open Source Geo For Windows’, and s a full blown working environment for Windows users with almost all open source geo components and libraries. After installation there is one directory on you harddisk which contains all osgeo4w related programs and libraries. You can for example install QGIS, but als command line programs like ogr2ogr or gdalinfo. Het is even possible to run mapserver from within apache in this way.
The nicest thing from osgeo4w in my opinion is that is a controlled environment in which you can ‘easily’ install gis-packages next to each other. For example for QGIS this means that you can install both the latest stable version of QGIS next to the nightly development builds at the same time. And this nightly build will be updated on the osgeo4w servers every night. So you can enjoy the stability of the latests stable AND combine that with the latest features from the development version. For QGIS that is the stable ‘QGIS 1.8 Lisboa’ version, next to the QGIS dev build, which already has recently added WMTS-support. For dutch users this is nice because they can use the national PDOK services ( instead of the unofficial way: using WMS-C interface of PDOK in QGIS )
But to be honest, the osgeo4w installer is a little… strange (in dutch we say: a rather strange duck in the pond). It is based on the so called cygwin-installer. Cygwin is a (rather big complex) package of unix-commando’s so Windows users can ‘enjoy’ unix funcionality and scripts. It is available for a long time already, but is just a little … different.
That is why I thought to do some screendumps to show how to install QGIS in this way.
Start with downloading of the osgeo4w-setup.exe from http://trac.osgeo.org/osgeo4w
In the next screen, choose ‘Advanced Install’. Although this is a little more complex, it give us the possibility to install the development, nightly version of QGIS.
I always choose ‘direct connection’ (IE5 how old is this ??)
Both for Package-dir and Root-dir choose for example “C:\OSGeo4W”. This is the default, and makes it easier to create small scripts later: no worries about spaces in paths later on.
The package directory is used by osgeo4w to save all downloaded packages. It functions as a sort of cache.
After clicking ‘next’ now, you have to decide which software packages you want to install from osgeo4w. All packages are ordered in five categories:
- Commandline utilities: small handy tools, to be used from the doc-terminal, or in scripts
- Desktop: desktop applications, like QGIS but also ‘other’ desktop gis apps
- Libs: all kind of optional libraries, to be used by the desktop or web applications
- Web_Applications: web applications like mapserver etc
You can find QGIS in the ‘Desktop appications’ category. As you see in the screenshot, you can both click ‘qgis’ or ‘qgis-dev’. The installer is instructed to install something if you click one or more times on the little icon with the arrows turning in circles. By clicking several times, you circle to the different options: voor QGIS for example you can choose to install one of two stable versions, OR choose ‘skip’ in which installation of QGIS is … skipped.
In the image below, you see that I install both current stable version 1.8.0 and the qgis-dev nightly build next to each other.
In the ‘Libs’ part it is possible to select some other stuff.
Let us also give QGIS the possibility to use ecw files (more work is needed for this, see: http://woostuff.wordpress.com/2011/03/08/getting-ecw-and-mrsid-support-working-in-qgis-dev-osgeo4w-install/)
Also the possebility to work with excel files using python (the so called python-xlrd libs to be able to read excel fiels and python-xlwt to be able to write them). These are for example mandatory to use the xy-tools plugins (TODO: write an post about this 🙂 )
If you want to connect to an Oracle database in QGIS, or open Esri File based Geodatabase, then click these also:
Click ‘Next’ and have a small coffee break. The installer now will download all selected packages and install them in your install folder. This takes some time:
The next thing I often do, is to copy the downloaded osgeo4w-setup.exe into the c:\OSGeo4W folder. With this you have ALL your osgeo4w stuff next to each other in the osgeo4w folder. The setup exe you will use/need next time when you want for example to update the QGIS-dev version or to install some other package.
Below you see my fresh desktop, with both two QGIS version, and a shortcut to the OSGeo4W command prompt with whcih you can run the command line commands.
The directory with all the percent-signs in it’s name is the download directory of the installer (it’s the name of the download service we used).
After this clean install (on a very clean virtual Windows machine) there was a small glitch that the desktop shortcuts did not seem to work. But after starting QGIS from the Start-menu once, also the shortcuts on the deskstop are working.
Enjoy your installation, and don’t forget to update your qgis-dev every once and a while. Because, he, it is a development version so maybe we squashed some bugs AND maybe there are some new features available after your update 😉
Next time I will write a small article about connecting to a Oracle database with QGIS.