Bug report #15809

QGIS 2.18 not recognizing projection

Added by Randal Hale almost 5 years ago. Updated over 2 years ago.

Category:Projection Support
Affected QGIS version:2.18.0 Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:23729


I've went back and forth on this. There has been a lot of testing that has went down a different road than what I was going to file.

1. Create in QGIS a shapefile and assign a projection. I did mine with an EPSG of 2274
2. Rename or delete the QPJ file.
3. Add it to QGIS and QGIS defaults to a Unknown or Custom projection.
4. Create in QGIS a shapefile and assign a projection. I did one in 26917.
5. Remove the QPJ file.
6. Add it to QGIS and QGIS defaults to 26917.

QGIS 2.18
GDAL 2.1.0

Windows OSGEO installer 64 Bit.
Same thing happens. EXCEPT..
Right Click the Shapefile without the QPJ and go to properties. In Linux the projection shows as Unknown. In Windows it's not defined is "selected crs (,)".
QGIS 2.18
GDAL 2.1.2


#1 Updated by Richard Duivenvoorde almost 5 years ago

Hi Randal,

what is exactly the behaviour that you are expecting?

because (I did not test thouroughly though), to me this looks like QGIS is 'guessing' based on your project.

Isn't it like this:
- removing the proj information destroys any knowledge of crs so: qgis shows: "I dunno the crs"
- you create a new shape, give it a crs (and does QGIS then not silently set the PROJECT crs to that crs too)
- next time you open a shp file without crs in that project: QGIS will show it in 26917 because the project is in it.
BUT it actually does NOT have crs info, not from the qpj or prj file nor from the project file (qpj is actually a small part of it).

So my question: HOW do you excpect QGIS to handle this kind of situations?

We have had long discussions about the non defined crs's of data and projects. And one conclusion was that it sometimes was better (for unexperienced users!) to just ignore all this and start on a grid.

#2 Updated by Randal Hale over 4 years ago

I would expect that if both the QPJ and PRJ are missing QGIS is going to have to guess. I would assume (and I could be completely wrong) that QGIS will pull information from either the QPJ or the PRJ if either one is present. I guess that is what has me confused. If both the QPJ and PRJ are removed I would expect unknown.

If I remove the QPJ from two test files and keep the PRJ - it appears QGIS is reading the information from the PRJ. If the PRJ is in meters it's fine - QGIS assigns the correct projection. If the PRJ is in feet - it's defaulting to unknown. I haven't tested anything in a geographic projection. I noticed this back in 2.16 and just assumed it was me. I was working through a problem with some GRASS Data and a shapefile this week and started to notice a pattern...or at least I think I'm noticing a pattern. I've looked at this way too long and have "taken a break" until later today so I can be objective about it again.

If the shapefile was an "ESRI Projection" - I would assume it's always going to default to unknown. I think ESRI Projections are anything above 100000 in EPSG codes.

#3 Updated by Giovanni Manghi over 4 years ago

  • Easy fix? set to No
  • Regression? set to No

#4 Updated by Giovanni Manghi over 2 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

End of life notice: QGIS 2.18 LTR


QGIS 3.4 has recently become our new Long Term Release (LTR) version. This is a major step in our history – a long term release version based on the massive updates, library upgrades and improvements that we carried out in the course of the 2.x to 3x upgrade cycle.

We strongly encourage all users who are currently using QGIS 2.18 LTR as their preferred QGIS release to migrate to QGIS 3.4. This new LTR version will receive regular bugfixes for at least one year. It also includes hundreds of new functions, usability improvements, bugfixes, and other goodies. See the relevant changelogs for a good sampling of all the new features that have gone into version 3.4

Most plugins have been either migrated or incorporated into the core QGIS code base.

We strongly discourage the continued use of QGIS 2.18 LTR as it is now officially unsupported, which means we’ll not provide any bug fix releases for it.

You should also note that we intend to close all bug tickets referring to the now obsolete LTR version. Original reporters will receive a notification of the ticket closure and are encouraged to check whether the issue persists in the new LTR, in which case they should reopen the ticket.

If you would like to better understand the QGIS release roadmap, check out our roadmap page! It outlines the schedule for upcoming releases and will help you plan your deployment of QGIS into an operational environment.

The development of QGIS 3.4 LTR has been made possible by the work of hundreds of volunteers, by the investments of companies, professionals, and administrations, and by continuous donations and financial support from many of you. We sincerely thank you all and encourage you to collaborate and support the project even more, for the long term improvement and sustainability of the QGIS project.

Also available in: Atom PDF