Difference between revisions of "Trash-talk"
(→Importing Data Files) |
(→Importing Data Files) |
||
Line 43: | Line 43: | ||
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. | 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. | ||
+ | |||
+ | ===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. | ||
+ | |||
+ | *Select any starting location to start GRASS | ||
+ | *Under the '''File''' menu, choose '''Import vector map''', then '''Import vector data using OGR''' | ||
+ | * | ||
===Importing .csv files=== | ===Importing .csv files=== |
Revision as of 11:59, 23 July 2009
Contents
Managing Data Files
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:
- Select the Convert to Plain Text option
- Select Choose File and browse the directory to find your desired file
- Under Plain Text Delimiter, select pipe (|)
- 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.
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.
- Select any starting location to start GRASS
- Under the File menu, choose Import vector map, then Import vector data using OGR
Importing .csv files
- Select the newly created location 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)
v.in.ascii input=blah output=blah skip=1 x=4 y=3