- Privacy and the use of your mobile device (today we are using Location Services)
- Review of Assignment from last lab
- Using GPS (GNSS) on your cell Phone
- Exploring the uses of LiDAR Data
- Initial description of Site Layout assignment
Privacy concerns with the use of data collected – i.e. your cell phones
Scott has said that Aliens are inspecting the Earth and are trying to decide how to exploit us, but they cannot get a handle on our supreme leader – Google. There are of course other players in the web based digital age, and all collect information from willing users. This may be true, but willing users may be better define and unwitting users. Let’s discuss this unwittingness and look at some links as well.
EU and Canada ask Mark Zuckerberg to come to their privacy meeting
Where does this leave us with our devices? This will be part of the written assignment for the course.
Review of last weeks assignment
Lets go through the assignment as posted last week – Data Gathering and Assembly Assignment
GPS – What we really mean is GNSS – Global Navigation Satellite System
GPS is actually a subset of GNSS, below is a list of some of the satellite networks covered under the GNSS unbrella
GPS: Global Positioning System – USA
GLONASS: Globalnaya Navigazionnaya Sputnikovaya Sistema, or Global Navigation Satellite System – It has Sputnik in the name – must be Russian
BeiDou: Navigation Satellite System (BDS) – Chinese
Galileo: European Union
Quasi-Zenith Satellite System (QZSS): Japan
NAVIC – Indian Regional Navigation Satellite System (IRNSS) : India
The always useful Wikipedia link
Almanac, Ephemeris – orbits and time
Your GNSS receiver – what is commonly called “a GPS” needs a few things for it to work. Scott will sketch it out but here is a sketch from Geocommons showing satellites in relation to receivers
Augmented or Assisted GPS/GNSS – your mobile phone
Our receivers and antennas on cell phones are not very powerful (excepts Scott’s old Nokia) as they will drain batteries. There is a mechanism to get suplimentary location data (such as the almanac and ephemeris data) from using your cell network – A-GPS. Again we will look at the Wikipedia page for help.
Using and App to collect tracks and waypoints
You will lots of complaining from Scott about Apple products and this will be one of those cases. Perhaps you will have better luck, but to find an App that does not cost money and provides data for free (free maps) was no easy task for IPhones. Finding and managing data on Android – no problem (not saying Android does not bring problems of its own).
Download OpenGPX Tracker from here
This app is quite simple. It has a map interface using Open Street Map (OSM) or Apple imagery. The OSM data can be cached to take in the field. We are really only interested in collecting tracks and maybe waypoints.
Install the app –> turn on location services for the app (on be default) –> Turn on the app –> click the start button –> you can stop, start. pause tracks–> click on the folder in the top left to see the tracks –> press tracks to share via email.
Download GPS Logger from here
Turn on Location Services (device only) –> Install the app –> turn it on (outside) –> click tracks –> start walking. You can play with the settings to decrease sampling, manage tracks to save the tracks and to share (email). You can also collect waypoints.
Collecting Data with GNSS enabled on your phone
Collecting and using GeoTagged photos
Take a look at this tutorial geotagged tutorial from Geog 204 (many of you may remember it). This process takes your geotagged photos and makes a KML file of the results. We are going to follow this strategy for collecting photos, as well as collecting tracks.
Ensure that locations services are turned on for your phone and your camera app is on the list of apps that can access location services. By default this should be the case for most users. We will then head outside to collect data.
TOP on Location Services (device only) –> Install the app –> turn it on (outside) –> click tracks –> start walking. You can play with the settings to decrease sampling, manage tracks to save the tracks and to share (email). You can also collect waypoints.
Independent of collecting tracks, take photos with your camera on your phone – or even better with a separate digital camera.
GNSS data into QGIS
If we were using Garmin (or other units) we could plug them directly into the computer to read from them (you can do this with an Andriod – but we will humor the IPhone users), but using our cell phones means we have to email the GPX files saved from the device to ourselves. There is no need to convert the GPX data for use in QGIS however as it accepts GPX data natively. Just add it as vector layer (you only need the tracks and track points.
Once you have put the GPX file in a folder, we can add it like any other vector layer into QGIS. Unlike Shapefile, GPX files can have more than one feature type – but they do not store polygons. In fact they only store point locations, they just assemble the points into lines (tracks lines). Cleaning the tracks to have lines that make sense (no overlap etc) is the same as editing any other layer, but you cannot edit them as a GPX. You need to save them as a Shapefile or SpatialLite file. We will be using SpatialLite files in this course – but that is for next weeks class.
Photos taken can be associated with the same time stamp as the tracks collected and geotagged to match the location at the time of the track collection geotagged tutorial
Scott will show you GPSPrune and the guts of GPX/KML files. We want to use these data types and techniques to build a database of information for site analysis.
LiDAR data and creating Elevation models
Scott spend hours trying to find a relatively simple solution to create elecation models from LAS (LiDAR) files. We can try to create a file using ArcMap, but with all of us working on osmotar – that would grind the system down to running even slower than normal. So we have to run a couple of commands in a terminal to do the trick.
Here are the steps to create a couple of DEM (one DTM and one DSM) – check out this link to understand the differences – https://gisgeography.com/dem-dsm-dtm-differences/
View the data
Lets view the data first. Open up a terminal and paste in this command:
wine /home/gislab_software/lastools/bin/lasview.exe 093G086444.las
You can navigate around the scene by using your mouse. You can change the options by right clicking on the word “pan” in the upper left corner and pick other options.
Create Elevation Models
- Create a folder to hold this weeks work. It is data for the same ortho/LiDAR map sheet we used last week – or you can call it lab2
- Create a Digital Surface Model
- open up a terminal and change to the folder you created to hold the las file you copied above
- run this command:
- sh /home/labs/enpl303/unbc_data/surface.sh
- Create a Digital Terrain Model
- in the same terminal run a similar command:
- sh /home/labs/enpl303/unbc_data/terrain.sh
Using the “.sh” file for other LAS files
The above she file (i.e. terrain.sh) is simply a command inside of a file that you called using the terminal. If you want to use the same command for a different input LAS file, you would edit the file, save it in your folder and run it again. For instance, the current terrain.sh file contains the following command:
/home/gislab_software/WBT/whitebox_tools -r=LidarNearestNeighbourGridding -v –wd=”./” -i=/home/labs/enpl303/unbc_data/093G086444.las -o=unbc_terrain.tif ‐‐radius=2 ‐‐resolution=.2 –exclude_cls=’1,3,4,5,6,8′
Broken down the command has there parameters
The command you are running:
/home/gislab_software/WBT/whitebox_tools -r=LidarNearestNeighbourGridding -v (sofware whitbox with specific command LidarNeighbourGridding) with the -v (verbose)
The working folder (somewhere you have the ability to write data into)
-wd=”./” (the ./ means the folder you are in – you can also type in the long address i.e wd=”/home/emmons/enpl303/unc_data”)
the input and output files:
The extra work you want the software to undertake (the are parameters by the software)
‐radius=2 ‐‐resolution=.2 –exclude_cls=’1,3,4,5,6,8′ (in this case, the search radius for LiDAR points, the resolution of the output raster layers and the classes not used). We are only keeping class 2 (ground).
Changes can be made to the file, saved and run by putting “sh” and a space in front of the script name.
Classes in the LiDAR point cloud
The above inputs were based on the output we derived from last week for the classified points in the LAS file:
505954 Unclassified (1)
6553515 Ground (2)
18066819 Low Vegetation (3)
9831788 Medium Vegetation (4)
41072754 High Vegetation (5)
591463 Building (6)
57367 Model Key-point (mass point) (8)
196322 Water (9)
Working with the Elevation data in QGIS
Load the two elevation models into QGIS (add raster layer). What do you notice about the buildings on campus. Reload the viewer and see what class the buildings are.
Perform a height from ground calculation by using the raster calculator to look at height changes in the landscape. This can be done by:
- Raster –> Raster Calculator
- Put in an equation such as: unbc_surface@ – unbc_terrain@
- Create a file for the height differences
Try to create other classified elevation models – i.e. one with strictly vegetation and perform another difference.
We will continue with raster data – particularly elevation models. We will start to look at the next assignment