QGIS 2.x: You can run but you can’t hide from projection issues.

Mar 5, 2014 | ArcGIS Desktop, EPSG, GIS, Projections, QGIS

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.

The problem:
Michael provided us with a few sample files that I reviewed in ArcMap. Projections for the files were as follows:
  • Imagery:
NAD_1983_StatePlane_New_York_Central_FIPS_3102_Feet
WKID: 2261 Authority: EPSG
  • Shapefiles:
NAD_1983_UTM_Zone_18N
WKID: 26918 Authority: EPSG
The files overlay within ArcMap with no problem using the reproject-on-the-fly built into the project data frame. Unfortunately, this is an issue that Randy and I have been witnessing within QGIS when trying to use its Enable ‘on the fly’ CRS transformation within the Project Properties. Projections in ArcMap are not defined the same way as they need to be in QGIS. QGIS is reading the ArcMap projections as custom-like projections and making a best guess OR ArcMap isn’t using the same EPSG codes for similar projections that QGIS is using (example below). If you look on the same website, you’ll see that ESRI has their own list of codes which may be the root of the problem. Same projections, differing reference codes. I’m really not sure which it is but either way, QGIS isn’t happy. Neither ESRI nor QGIS seems to be doing anything wrong, it’s the way they are communicating with one another when passing data between the two.

The workarounds:
The workarounds are a bit clunky and there is a bit of guess work. The assumption with these workarounds is that you are very familiar with most of the projections you are working with to take some of the guess work out of the equation.
1. Setting (defining) the CRS for each layer as well as the Project Properties for ‘on the fly’ transformations:
  • 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_Central_FIPS_3102_Feet.
  • 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!

You may also like

TNGIC 2024

TNGIC 2024

So - if you're coming to the 2024 TNGIC (TN Geographic Information Council) meeting (April 9-11 2024) to talk about how no one understands what you do......I'm doing a workshop. What workshop? It's a new workshop. QGIS and LIDAR data. As to what I do with the class...

iNaturalist and QGIS

I am probably the worst for being able to properly name "things". There are big trees and little trees. There are the annoying bugs and the not so annoying bugs. There are ducks, birds, bigger birds, and the birds that hang out at my bird feeder. As much time as I...

Mergin Maps and DB Sync

Mergin Maps and DB Sync

I don't know if I would label this exercise as fun but I've learned alot. I don't do a ton of data collection these days. At one time a few years ago I was out in the field with Fulcrum, a laptop, and sketchy internet for days at a time. These days I'm hardly ever...