Difference between revisions of "Trash-talk"

From Earlham CS Department
Jump to navigation Jump to search
 
(23 intermediate revisions by one other user not shown)
Line 1: Line 1:
=Managing Data Files=
+
=Data Management=
 
This section covers how to download the data from the GPS unit, convert it to the necessary file type, and ultimately integrate it into GRASS.
 
This section covers how to download the data from the GPS unit, convert it to the necessary file type, and ultimately integrate it into GRASS.
  
==Downloading Data==
+
==Downloading Data Files==
*Connect the GPS unit to a computer with the provided Serial and USB to Serial cables
+
*Connect Scout Unit to computer using Serial to USB and USB cables
*Once the unit is connected to the computer, the Protrak Scout software should be started and the appropriate unit should be selected
+
*Open the Protrak SCOUT software
*Clicking on the unit name causes a menu to pop-up where you can choose what to do with that particular unit, select '''Download History Log'''
+
*Select appropriate unit
 +
*Select '''Download History Log'''
 
*Follow the on-screen instructions
 
*Follow the on-screen instructions
*Once the download is complete, the data will be stored in the following directory: C:\Program Files\PROTRAK\Data
+
*Once the download is complete, repeat the process for all units
*The data at this point has the .gps extension, which cannot be read by GRASS, meaning we need to convert the data into a useable file format such as CSV or KML, both of which can be integrated into GRASS
+
*The data will be stored as GPS files in the following directory:
 +
::'''C:\Program Files\PROTRAK\Data'''
 +
*From here, the data can be copied to a separate folder for backup purposes
  
==Converting Data files==
+
==Converting Data Files==
*Using available sites such as GPSBabel or GPS Visualizer, we can convert the GPS files into a different format that we can later use in GRASS
+
*Open a web browser to the following page:
*Select '''Google Earth KML''' on the GPS Visualizer home page
+
::[http://www.gpsvisualizer.com/ GPS Visualizer]
*Under '''General Map Parameters''', select '''.kml''' as the file type; you can also add a name for the map here
+
*Select the '''Convert to Plain Text''' option
*Under '''Track Options''' there is a drop-down menu option for '''Draw as waypoints''' select the "Yes, named with data from the colorized field" option
+
*Select '''Choose File''' and browse the directory to find your desired file
**It is also possible to change the units from the default Metric to U.S. or Nautical
+
*Under '''Plain Text Delimiter''', select '''comma'''
*The last step is to upload your GPS file and hit the '''create KML file''' button on the bottom right side of the page
+
*Under '''Plain Text Output Units''', select '''U.S.'''
 +
*In the '''Time offset:''' field, type '''-4'''
 +
*Select the '''Convert''' button near the top
  
Gustavo puts notes here, Mic and Charlie review/edit them.
+
You should be redirected to a page with a text box that has the data in text format. Near the top of the page you will see a link with a string of numbers ending in '''.txt'''
  
Some places to start:
+
*Right-click on the link and select '''Save Linked File As...'''
# Process for moving data files from GPS to Google Earth and GRASS
+
*Choose a descriptive name for your data and change the ending to '''.csv''', essentially saving it as a CSV file
# Description of the data and coordinate systems along the way
 
  
Things to do:
+
==Importing Data Files==
* Consider GRASS/R interface
+
===Creating a new GRASS location===
 +
*Launch '''GRASS'''
 +
*On the right-hand side select '''Location Wizard''' under '''Define new location'''
 +
*Leave the '''GIS Data Directory''' field as is but choose a descriptive name for the '''Project Location'''
 +
*Continue to the next page
 +
*Choose '''Select Coordinate System''' and continue
 +
*Type in '''ll''' for the '''Projection Code''' or scroll down the page to find '''Lat/Lon'''
 +
*Continue to the next page
 +
*Choose '''Select Ellipsoid'''
 +
*Type in '''wgs84''' or scroll down to find it at the end of the page, its the very last entry
 +
*Continue to the last page and select '''Finish'''
 +
*You can set the default extent for the region but it can also be left alone for now
 +
 
 +
The location that we will use to import the .csv files is now set up with the appropriate coordinate system. This will allow us to validate the points' relative locations to each other.
 +
 
 +
===Importing .csv files===
 +
*Select the location created using the lat/lon projection under '''Project Location''' and hit '''Start GRASS'''
 +
*The python GUI should start
 +
*Under the '''File''' menu choose '''Import vector map''' which produces another menu, select '''ASCII points/GRASS ASCII vector import'''
 +
*Select '''Browse''' and choose any of the .csv files that were just recently made
 +
*Below that name give the output vector map a suitable name
 +
*Under the '''Columns''' tab designate which column gives the longitude and which one gives the latitude
 +
*Under the '''Optional''' tab, choose to skip the header row by giving the number of header rows that will be skipped, in this case its '''1'''
 +
*Hit the '''Run''' button
 +
*A vector map with the point data from the .csv file should have been created that you can now display by selecting the '''Add vector map layer''' button in the '''GRASS GIS layer manager''' window
 +
*You will have to right-click on the layer and select '''Zoom to selected map''' because we did not set the default extent for the region, so it will not show by default (does not apply if you did set the default extent)
 +
 
 +
===Creating location using preferred coordinate system===
 +
The Richmond Sanitary District has provided a map of the county using the Transverse Mercator projection. Unfortunately, we cannot just overlay the point map of our data with the map of the county without doing some coordinate system conversion. Luckily, this feature is built into GRASS and we will take advantage of this but first we have to import that map into GRASS to use as our basemap.
 +
 
 +
*Relaunch GRASS and select any starting location to start GRASS
 +
*Under the '''File''' menu, choose '''Import vector map''', then '''Import vector data using OGR'''
 +
*For the '''OGR datasource name:''' field, select '''Browse''' and choose the '''Parcel_BND.shp''' file
 +
*Below this, choose a descriptive name for the output map
 +
*Under the '''Optional''' tab name the location that will house the imported county map, which will be created once the '''Run''' button is selected
 +
::''Note: This will be used as the location for all subsequent point map reprojections''
 +
*The command will take almost two minutes to process but will be set up with the preferred coordinate system for later use
 +
*We are now ready to begin importing the .csv files that contain the data for the point maps
 +
 
 +
===Reprojecting vector maps===
 +
*Using this location, we can import the point maps and overlay them onto the county map
 +
*Under the '''Vector''' menu, select '''Develop vector map''', then '''Reproject vector map'''
 +
*Give the location of the desired point map in the '''Location...''' field
 +
*Give the name of the input vector map under the '''Optional''' tab as well as a different name for the output vector map (if desired, otherwise the name will stay the same if this field is left blank)
 +
*Hit '''Run'''
 +
*The point map should now be in the same location as the county map and with the same coordinate system, meaning the two can be displayed together
 +
*This process can be repeated for all point maps

Latest revision as of 12:23, 14 October 2009

Data Management

This section covers how to download the data from the GPS unit, convert it to the necessary file type, and ultimately integrate it into GRASS.

Downloading Data Files

  • Connect Scout Unit to computer using Serial to USB and USB cables
  • Open the Protrak SCOUT software
  • Select appropriate unit
  • Select Download History Log
  • Follow the on-screen instructions
  • Once the download is complete, repeat the process for all units
  • The data will be stored as GPS files in the following directory:
C:\Program Files\PROTRAK\Data
  • From here, the data can be copied to a separate folder for backup purposes

Converting Data Files

  • Open a web browser to the following page:
GPS Visualizer
  • Select the Convert to Plain Text option
  • Select Choose File and browse the directory to find your desired file
  • Under Plain Text Delimiter, select comma
  • Under Plain Text Output Units, select U.S.
  • In the Time offset: field, type -4
  • Select the Convert button near the top

You should be redirected to a page with a text box that has the data in text format. Near the top of the page you will see a link with a string of numbers ending in .txt

  • Right-click on the link and select Save Linked File As...
  • Choose a descriptive name for your data and change the ending to .csv, essentially saving it as a CSV file

Importing Data Files

Creating a new GRASS location

  • Launch GRASS
  • On the right-hand side select Location Wizard under Define new location
  • Leave the GIS Data Directory field as is but choose a descriptive name for the Project Location
  • Continue to the next page
  • Choose Select Coordinate System and continue
  • Type in ll for the Projection Code or scroll down the page to find Lat/Lon
  • Continue to the next page
  • Choose Select Ellipsoid
  • Type in wgs84 or scroll down to find it at the end of the page, its the very last entry
  • Continue to the last page and select Finish
  • You can set the default extent for the region but it can also be left alone for now

The location that we will use to import the .csv files is now set up with the appropriate coordinate system. This will allow us to validate the points' relative locations to each other.

Importing .csv files

  • Select the location created using the lat/lon projection under Project Location and hit Start GRASS
  • The python GUI should start
  • Under the File menu choose Import vector map which produces another menu, select ASCII points/GRASS ASCII vector import
  • Select Browse and choose any of the .csv files that were just recently made
  • Below that name give the output vector map a suitable name
  • Under the Columns tab designate which column gives the longitude and which one gives the latitude
  • Under the Optional tab, choose to skip the header row by giving the number of header rows that will be skipped, in this case its 1
  • Hit the Run button
  • A vector map with the point data from the .csv file should have been created that you can now display by selecting the Add vector map layer button in the GRASS GIS layer manager window
  • You will have to right-click on the layer and select Zoom to selected map because we did not set the default extent for the region, so it will not show by default (does not apply if you did set the default extent)

Creating location using preferred coordinate system

The Richmond Sanitary District has provided a map of the county using the Transverse Mercator projection. Unfortunately, we cannot just overlay the point map of our data with the map of the county without doing some coordinate system conversion. Luckily, this feature is built into GRASS and we will take advantage of this but first we have to import that map into GRASS to use as our basemap.

  • Relaunch GRASS and select any starting location to start GRASS
  • Under the File menu, choose Import vector map, then Import vector data using OGR
  • For the OGR datasource name: field, select Browse and choose the Parcel_BND.shp file
  • Below this, choose a descriptive name for the output map
  • Under the Optional tab name the location that will house the imported county map, which will be created once the Run button is selected
Note: This will be used as the location for all subsequent point map reprojections
  • The command will take almost two minutes to process but will be set up with the preferred coordinate system for later use
  • We are now ready to begin importing the .csv files that contain the data for the point maps

Reprojecting vector maps

  • Using this location, we can import the point maps and overlay them onto the county map
  • Under the Vector menu, select Develop vector map, then Reproject vector map
  • Give the location of the desired point map in the Location... field
  • Give the name of the input vector map under the Optional tab as well as a different name for the output vector map (if desired, otherwise the name will stay the same if this field is left blank)
  • Hit Run
  • The point map should now be in the same location as the county map and with the same coordinate system, meaning the two can be displayed together
  • This process can be repeated for all point maps