I was asked to make a tutorial on defining and reprojecting files in QGIS. I wrote this for specific data sets that were being used and approached it as a workflow instead of just a how-to tutorial. This might help others in understanding some of the quirkiness with QGIS and projections at the moment. Obviously, there is more than one way to do this but I wrote this as a, hopefully, simple solution.
Just as a recap for those that need a refresher or are new to defining and reprojecting:
- Defining projection – the data (vector or raster files) are already drawn in a projection but the actual spatial reference description (like UTM or State Plane or Geographic) is not with the files. QGIS and ArcMap rely on knowing the spatial reference descriptions to reproject files with different defined projections on the fly within the data frame so that they overlay correctly.
- Reproject – When the spatial reference of a file is known, the software can translate the file into another defined spatial reference. An example of this would be like the conversion we did to your second set of files that were in a UTM projection with units in feet and we later reprojected them into a different UTM projection that had units in meters.
This is what we know about the files being used:
- Topo DRG – downloaded in UTM NAD83 in feet from ChartTiff
- Polygon of tract – drawn over the DRG in QGIS (will be in same coordinates as DRG)
Especially because of what QGIS is currently doing, it’s going to be very important to check the metadata of the files used to get the spatial references. (But I would definitely suggest making this a habit regardless!) If they do not come with metadata, you may need to contact the files’ creator and ask for that information as a starting point. I would also recommend going into the files’s Properties after adding it to QGIS to review the CRS information and make sure it matches what you know about the files’ spatial reference before starting to work with the files.
The workflow will go as follows:
(I’m using QGIS 2.0.1 for my example and this should not be any different if you have 2.2 installed.)
Add DRG to QGIS and check the Properties of the file for the CRS that QGIS has defined it as against what you know the file is in. If the projections are different, go to step 2.
Define the projection for the DRG.
Create a new shapefile and choose the same projection as the DRG.
Reproject the files for your GPS unit.
1. Add DRG to QGIS and check projections.
- Open QGIS, and click on the Add Raster Layer button in the sidebar. Browse to the DRG.
- After adding the DRG to QGIS, right-click and select Properties > General. Click on the Specify button under Coordinate Reference System. The screenshot below shows the CRS that QGIS has chosen for the DRG.
2. Define the projection for the DRG:
- Since we know that the DRG is in UTM with units in feet, we know that the above information chosen by QGIS is incorrect and we will need to redefine the projection within the Properties of the file. To do this, go back to Properties > General and click on the Specify button under Coordinate Reference System if you closed the window. In most cases, you would use the filter to find the projection in the list and select the correct projection.
However, in this specific case, we need a projection that is not included in QGIS. I had to create a custom projection from the NAD83 / UTM zone 18N parameters that was in feet instead of meters. You can create a custom projection under Settings > Custom CRS. The parameters I used to define the DRG were: +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs
3. Create a new shapefile in same projection as DRG:
- Go to Layer > New > New Shapefile Layer (or use the icon in the sidebar) to create the new file using the screenshot below as a guide to change the default projection to match that of the DRG:
4. Reproject files:
- To reproject the files from the UTM units in feet to UTM units in meters (to work with your GPS unit), right-click on the layer you want to reproject and select Save As. Fill out the tool form with the relevant information (giving it a new name, etc…). Both raster and vector files will have a place to select the desired projection you want the data converted to:
That’s it for today.