Bug report #10101
User CRS created when selecting South African CRS : HBK_NO_23 as a CRS for a new shapefile
|Affected QGIS version:||2.2.0||Regression?:||No|
|Operating System:||Windows 7 and 8||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||18569|
When selecting South African CRS : HBK_NO_23 as the CRS for a new shapefile, QGIS creates slightlly different QPJ and PRJ files and creates a new user-specified CRS in the list of CRSes available in the QGIS desktop environment.
Steps followed to reproduce the issue:
Creating user CRSes¶
1. Start a new project in QGIS Desktop.
2. Create a new shapefile and select South African CRS : HBK_NO_23 as the CRS.
3. Look at the layer properties of the newly-created file - no CRS specified.:
4. Close QGIS without saving the project and relaunch QGIS.
5. Select Settings - Custom CRS from the menu; a new user-specified CRS has been added with a definition almost identical to South African CRS : HBK_NO_23. The only difference is that the user-specified CRS doesn’t have an +axis parameter set (values copied from QGIS Desktop Project Properties dialogue box):
South African CRS : HBK_NO_23:
+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=0 +y_0=0 +axis=enu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
6. Load the previously created shapefile and look at its layer properties. Its CRS is now the user-specified one:
QPJ and PRJ files are not identical¶
The shapefile’s .prj and .qpj files have slightly different values for the datum’s degree unit (different number of decimal places and 295 (last three digits) in PRJ replaced with 3 in QPJ:
I don't think a user-specified CRS should be created when selecting a built-in CRS.
Also, I'm not sure if the differences in the QPJ and PRJ files might create problems when using other GIS software.
#2 Updated by Andre Joost over 7 years ago
I solved the problem by manually setting the authority and code parameters at the end of the .qpj file:
I suspect that the "ZANGI:ZANGI:xyz" spoils the usual storing of authority and code into the .qpj file. As far as I see from the srs.db, "ZANGI" is inserted as auth_name and "ZANGI:xyz" is stored in auth_id.
I guess that revision 14f639d568fb5b8aba8b96f70f4b4e71253df0d4 was made in a hurry, not looking carefully at the way other srs codes are stored.
Apart from the fact that the National Geo-spatial Information of South Africa does not call itself ZANGI, but NGI: http://www.ngi.gov.za/
So "NGIZA" would sound better to me.
#5 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