We received an email today from Michael Cliverton with a problem he was experiencing within QGIS Desktop concerning projections. Don’t ask me why, but I enjoy solving projection issues while others scream at their computers in tongues. The screaming is occasionally laced with profanities, but I digress. Michael did nothing of the sort. He actually found an issue we have been seeing pop up and even discussed it briefly in our Introduction to QGIS workshop as a potential gotcha to look out for. I’ll go over the problem and provide a few workarounds.
WKID: 2261 Authority: EPSG
WKID: 26918 Authority: EPSG
- Load your data into QGIS. I like to start with the imagery then load the shapefiles. For each layer, right-click then select Properties > General then click on Specify under the Coordinate reference system heading. The CRS information for Michael’s imagery appears as EPSG:32116 – NAD83 / New York Central which is the best guess that QGIS has made based on what ESRI has provided but is not correct for QGIS to work with. You can use the Filter to narrow down your selection and find the projection. In Michael’s case, I entered “New York” into the filter then was able to scroll through the list to match the FIPS code (3102) and the units (feet) with the proper CRS within QGIS which turned out to be EPSG: 102716 for NAD_StatePlane_New_York_
- I prefer to reproject the shapefiles rather than the imagery, so once the imagery’s CRS is discovered, go to Project > Project Properties > CRS. Here you can select the imagery’s CRS from the list. It will most likely now show up in the recently used list. Click on OK after selecting the CRS. If all the layers have been redefined, you should see the canvas go blank (Zoom to layer extent for the image) or all layers aligned.
2. Saving layers as new files with defined projection:
- Once you know the EPSG codes for the layers, you can redefine them and save them as new files to be in the same CRS. I did this by defining the layer projections as described in workaround #1 then right-clicking on the layer and selecting Save As… to save our as a new shapefile. The defined projection should already show up as Layer CRS just under Encoding in the tool’s form or you can manually select it as described before.
3. Reproject the shapefiles into the imagery’s CRS:
- Once you know the CRS’s of the imagery and the shapefiles, you will still need to redefine all the layers as described above. However, you can now reproject the shapefiles into the same CRS as the imagery has to save from having this issue. You do this the same as in workaround #2, except that you will select Project CRS instead of leaving it as Layer CRS. I like to have all of my files in the same projection whenever possible because of some quirky ArcMap problems I have run across, particularly when dealing with unit conversions between horizontal and vertical and selecting by location.
Hope this helps others and happy (Q)GISing!