Install the quantum gis program (2.18 for windows, 2.16.3-1 for macs) from http://www.qgis.org/en/site/forusers/download.html For Macs – you will need to right click on open, as explained at the top of http://www.kyngchaos.com/software/qgis
First, we will open some Vector layers and see how layer order is important for viewing data:
Up should come a plain map of Alaska; no bounderies or geographical features.
If you have a scroll mouse, you will notice the ablity to zoom in/out of the map projection with scolling the mouse.
Lets look at the order of layers:
In [2]:
from IPython.display import Image
Image(filename='Images/lesson1_1.png', width=800, height=800)
Out[2]:
The way to maximise visual data and ensure all your information will be visable, is to ensure the order of layers in the Layer order panel from top to bottom is:
Also, you can also set uo your own panels, toolbars, and workspace by going Clicking on the top menu View > Panels > or View > Toolbars > and selecting or deselecting whichever ones you wish to have. This way you can always re-open a panel that may have been closed by mistake.
Vector Layers:
You will see that the Layer order panel doesn't allow us to explore any of the layer properties; the easiest way for us to see what each layer represents is by View > Panels > Layers and another panel in the vacinity of the Layer order and/or Browser panels will appear. (You can close the panels that you dont need, now that you know how to retreive them if nessecary).
This new panel will have icons associated with each layer so you can identify them in the map projection. If you Right Click you will get another menu of options for that particular layer. In this menu is an option for Properties which is also the defualt window that appears if you Double Click the layer title in the Layer panel. We dont need that option right, but we will in the future.
One of the most common uses for any GIS program is making calculations and measurements for distances, areas, and angles. These are taken care of in QGIS by the Measuring tool, which can be found by the icon of a ruler in the tools toolbar, or by View > Measure > Measure Line / Measure Area / Measure Angle. We will start with measuring a line across the whole of Alaska; whereby a single Left click creates a start point, subsiquent Left clicks create points at which you can change direction and continue measuring, and a single Right click creates and end point and stops the measurement.
If we measure across the entire width of Alasks like this:
In [2]:
Image(filename='Images/lesson1_2.png')
Out[2]:
Wikipeadia tells us that the distance should be around 3640km in width, yet with our intial configuration of layers that is not what we get. (You may have measurments in degrees, feet or meters; and anything from several magnitudes of difference to a close but not yet correct value.)
This is because we havent told QGIS how this map is to be projected: at the momnet it is just a random polygon with points on it.
The easiest way to start with this is to Click in the small globe icon in the bottom right corner of the window. If you hover of this it should read CRS Status. CRS stands for Co-ordinate reference system and is how we can ensure each layer or map we look at is telling us the same information.
A window will appear with the heading Project Properties, and a search bar labled Filter. This is where we tell QGIS what projection the map or layer is using, and therefore get an accurate representaiton of its information.
In the Filter bar search for Alaksa Albers, and we will be selecting the option NAD27 / Alaska Albers from the botton window. Click Apply:
In [4]:
Image(filename='Images/lesson1_3.png', width=500, height=500)
Out[4]:
From the left-hand menu Click on General and here we can select Meters as our Canvas Units, and you can change the backgound colour of the projection area if you finding the bright white a bit of a strain.
Your measurment may now be more accurate, but just to make sure all our tolls are on the same page, Click Settings > Options > Map tools and we can manipulate the measuring tool itself.
In [5]:
Image(filename='Images/lesson1_4.png', width=500, height=500)
Out[5]:
Now we should be able to measure the width of Alaska again and get closer to 3640km. (ie. 3500km +).
Note: If you click the option to Keep base units the measurments will stay in meters and not convert to kilometers for large distances. We dont need this feature right now, but we may in the future.
Lat of all for this lesson, we will import a CSV file that contains spatial data. Again, this is Point geometry, and you will need to ensure it is sitting above our Polygon and Line geometry layers.
Go to the Create a Layer from a Deliminated Text File window either via the Commma icon on the layer toolbar, or via Layer > Add Deliminated Text Layer.
Browse to qgis_sampe_data/csv/ and select elevp.csv.
Options in this window include:
If you are unsure of the format of the data, or which boxes to tick in this window then open the file in an editor or program such as Excel to get an idea of how the data was written.
In our case, your window should look similar to this:
In [6]:
Image(filename='Images/lesson1_6.png', width=500, height=500)
Out[6]:
Once again, you may get the option to specify the Coordinate Reference System (CRS) and we always want the .csv file data to be read in as the same projection; in this case NAD27 / Alaska Albers.
Spaital data:
You should now see another layer of points in the northern area of your map projection, these are points at which the elevation has been recorded. Obviously this is a very basic way of showing elevation, but now you have the tools to write a .csv file of data (Points of X and Y, and some value of meteorological data ie. Temperature) and import it to a QGIS project.
To actually view what the values are, zoom into a point and select the Indentity Features icon, which looks like a mouse pointer on an information symbol, in the the top toolbar. Clicking on a point will now bring upm a small window with that data point's attributes:
In [7]:
Image(filename='Images/lesson1_7.png', width=500, height=500)
Out[7]:
These data points and the associated layer Attribute Table will the subject of lesson 2, where we examine how to select and refine the data to extract more precise information from our map projections.
Bruy, A.; Svidzinska, D.; "QGIS By Example". Packt Publishing. 2015.
Dobson, J.; Boehnert.; "GIS Tutorial for Atmospheric Science". UCAR and UNC-Ashville. 2015.
Graser, A.; "Learning QGIS". Packt Publishing. 2015.
Menke, K.; Smith, R.; Pirelli, L.; Von Hoesen, J.; "Mastering QGIS". Packt Publishing. 2015.
In [ ]: