Bug report #10245
Defining custom CRS in QGIS 2.2
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Jorge Rocha | ||
Category: | Projection Support | ||
Affected QGIS version: | 2.2.0 | Regression?: | No |
Operating System: | Ubuntu | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18682 |
Description
For some reason, defining a new CRS is not working. The following error is reported: The proj4 definition of 'name' is not valid.
I'm defining a new CRS, from Settings -> Custom CRS... with:
Name: China Geodetic Coordinate System 2000
Parameters: +proj=geocent +ellps=GRS80 +units=m +no_defs
These parameters were pasted from EPSG:4479 definition.
!Screenshot - 05122014 - 02:10:07 PM.png!
I can use the calculator at the bottom to test the coordinate transformation, and it seems to works.
But it does not save the new CRS. It reports the following error: The proj4 definition of 'China Geodetic Coordinate System 2000' is not valid.
!Screenshot - 05122014 - 02:10:39 PM.png!
I've tried to add this projection to PostGIS and it works.
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 4479, 'EPSG', 4479, '+proj=geocent +ellps=GRS80 +units=m +no_defs ', 'GEOCCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Geocentric X",OTHER],AXIS["Geocentric Y",OTHER],AXIS["Geocentric Z",NORTH],AUTHORITY["EPSG","4479"]]'); select ST_AsText(ST_Transform(ST_SetSRID(ST_Makepoint(114,30), 4326), 4479)); "POINT(-2248544.5475367 5050313.74152924)"
History
#1 Updated by Jorge Rocha over 10 years ago
- % Done changed from 0 to 100
- Assignee set to Jorge Rocha
- Status changed from Open to Closed
With the precious feedback from Andre Joost, proj4
does not support the geocent projection.
proj -lp | grep geocent
Does not return any projection matching geocent.