The link to the recording for this Tutorial is
Video Recording
Project Management illustrated through software
As we progress through Geog 413, you are getting closer to being a GIS Geek that can manage large corporate datasets. In order to be able to manage different types of data, you are being introduced to many other concepts and activities you may not of thought would be in the GIS domain. In fact, the GIS domain is really only part of the overall need to understand spatial data management.
So far, you have started you journey by created a virtual machine. This represents the server you could be managing in your future spatial data management role. We are not going to think about how you may want to manage projects and the data within projects.
In today’s tutorial we are going to look at one of our favourite pieces of software that happens to be from Canada (as many geospatial software are created in Canada). This software is called FME from SAFE software of Surrey BC. Scott will give you the history of the company and its use at UNBC.
We will look at an existing data flow (FME project) that has been created to illustrate how the software can be used to model data. We will review the model and then make use of the software to expand the model in lab this week.
Exercise 1: Using FME
We can install FME on our Linux (Debian) Virtual Machines, but as this is the first week and we want to login to as many servers as possible – let’s go to osmotar. We will install FME in the lab.
Login to osmotar –> open FME workbench –> the open the FME Workbench file at: L:\geog413\tutorial_1\ saif2spatialite_geotiff_csv.fmw.
Scott will walk you through the workbench flow and discuss what is going on with the software.
Data Structures
We are not going to get into data structures today – let’s wait for the Lecture. We will however look at some different Spatial Data formats to get an idea of how spatial entities can be organized.
Exercise 2: Looking at some different formats
Let’s go to the Open Data pages for the city of Prince George to grab some spatial data. Grab something simple like traffic poles in both KML and Shapefile formats.
Once you have them downloaded we will discuss how these data formats are storing information.
Now go and grab one of the .saf files from the exercise above (copy it to your home folder). Unzip the saf file to a separate folder (i.e. saf_extracted). We will have a boo at the files you just extracted.
Sharable Spatial Databases – i.e Spatialite
Spatialite is a spatial extension to SQLite that adds spatial abilities to the portability of this database system. It works simularly to ESRI file based system in that data is stored in you personal workspace (saved as a single file), but funtions more like a RDMS internally. SQlite is the common format used for storing data for small devices such as cell phones. Spatialite is a version of SQLite that follows the Simple Feature Specification for SQL to model data in a relational system (Scott will explain in his guest lecture. As most of the Open Source Software used in the GIS Lab follows OGC standards, each piece of software works well with each other. We are going to use QGIS for the next sections of the lab.
Exercise 3: Working with Spatialite
QGIS and Spatial Lite
Open up QGIS in your virtual machine (Menu (bottom left) –> Education –> QGIS. When it opens you should have an interface that looks somewhat similar to ArcGIS. Scott will be illustrating,so if your interface looks different that his – let him know.
To add layers to QGIS, you can find the type of data you want to load under the layer –> add layer in the main menu (top of QGIS) or use the quick access icons on the left.
To add a shape file:
- Layer –> Add Vector Layer –> navigate to the shape file in the “add vector layer” panel
To add a raster file:
- Layer –> Add Raster Layer –> navigate to the file as above
Creating a Spatialite database
You should have a panel called Browser in the QGIS interface, if you don’t have the browser interface:
- View –> Panels –> Browser Panel
Inside the Browser Panel, there is a listing of types of data to load (similar to ArcCatalog). In that panel there is a entry for Spatialite. You can create a Spatialite database by:
- Right click Spatailite –> Create Database –> navigate to where you want to store it –> Save
- Now if you click the arrow to the left of the Spatialite entry, there should be a connection to this new database
Adding data to your Spatialite database – using a plugin
Plugins are a great way of adding functionality to QGIS, we are going to add a couple today – lets start with the DB Manger Plugin by:
- Plugins –> Manage Plugins –> Settings –> click on all the boxes in the panel (should be three of them) – don’t hit close yet
- Go to the All Tab –> Search –> type DB –> click once of DB Manager –> Install Plugin (bottom right corner)
- Click close
Adding data to your new database
Open a shape file from your home folder, or from the Geog413 folder into QGIS (if you have not already done so). We should check to see what projection the shape file(s) are in before we place them into a database. To see the projection of the shape file we have loaded we:
- Right ckick the shape file layer –> Properties –> General tab –> read the projection information in the Coordinate Reference System (pay attention to the EPSG number (i.e EPSG:3005 – BC Albers, or EPSG 26910: UTM Zone 10N)
- Now add it to the database by –> Database in main menu –> DB Manger –> DB Manager –> Navigate down the Spatialite tree (entry) to see your new database –> highlight it by clicking once
- Table menu –> import layer/file –> use the image below as a guide to the options you may want to use for you layer