Bug report #21122

QGIS is not recognizing the AUTHORITY["Esri", part of the .qpj file

Added by Gabriel De Luca about 5 years ago. Updated about 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Projection Support
Affected QGIS version:3.4.4 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28940

Description

Starting from a vector layer with only one point in EPSG:4326, when exporting it to a shapefile or geopackage in EPSG:102003, the saved file contains an invalid projection for QGIS.

The same behavior is observed with any projection other than an AUTHORITY["EPSG", code.

This is the content of the .qpj file:

PROJCS["USA_Contiguous_Albers_Equal_Area_Conic",
    GEOGCS["GCS_North_American_1983",
        DATUM["North_American_Datum_1983",
        SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]], 
    PROJECTION["Albers_Conic_Equal_Area"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["longitude_of_center",-96.0],
    PARAMETER["Standard_Parallel_1",29.5],
    PARAMETER["Standard_Parallel_2",45.5],
    PARAMETER["latitude_of_center",37.5],
    UNIT["Meter",1.0],
    AUTHORITY["Esri","102003"]]

I'm not sure if the mistake is made by writing it or reading it.
It may be well written and QGIS should read it like that.

But if it is changed by AUTHORITY["EPSG", QGIS reads it and assigns the corresponding CRS (EPSG:102003) to that layer.

Consequently, the projection is considered invalid (it would act in the same way if the .qpj file did not exist).

Tested in OSGeo4W installations of qgis-3.4.4-2 and qgis-dev-3.5.0-76 packages.

CRS.zip - point-4326 geopackage and point-102003 shapefile and geopackage. Also point-102003-edited.qpj (11.4 KB) Gabriel De Luca, 2019-01-29 07:37 PM

History

#1 Updated by Gabriel De Luca about 5 years ago

Also tested in linux install from qgis.org/ubuntu bionic repositories.

The .qpj file is different in some lines (i.e., PROJCS["unnamed", and no AUTHORITY line) and when exported to EPSG:102003 the console returns:


ERROR 6: EPSG PCS/GCS code 102003 not found in EPSG support files. Is this a valid EPSG coordinate system?

#2 Updated by Giovanni Manghi about 5 years ago

  • Operating System deleted (Windows 10, 64 bit.)

Also available in: Atom PDF