[Qgis-developer] Warning from DigitizingTools about CRS mismatch

Bernhard Ströbl bernhard.stroebl at jena.de
Fri Apr 8 01:38:03 PDT 2016


Hi Casper,

DigitizingTools compares _only_ the SRS-id (SRS = 
SpatialReferenceSystem) of the project and the layer. If they missmatch 
the warning is thrown so the user gets a hint why certain functions are 
greyed out.
Thus relevant is not the prj file but the SRS assigned to the layer and 
the project in their properties. To solve this issue: if they share a 
common projection, go in the layer properties and choose the same SRS as 
the project's from the list of projections.
Background (AFAIK): In Shapefiles the data do not carry information on 
their SRS (like e.g. in PostGIS or gml). This information is contained 
in the (optional) prj file. QGIS reads the prj file and assigns the 
first matching SRS to the data (matching = definition is identical). If 
there is none matching, a USER-SRS is created with the projection 
information given in the prj file.

Bernhard

Am 08.04.2016 um 10:10 schrieb Casper Børgesen (CABO):
> Hi!
>
> I have a user who constantly get a yellow warning from QGIS when he enables editing on set of specific shape files. The message is:
>
> DigitizingTools: Amend Line is disabled because layer CRS and project CRS do not match!
>
> The project CRS is EPSG:25832. The shape file has the following .prj file:
>
> PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
>
> In "layer properties/General/Coordinate reference system", QGIS displays "Selected CRS (EPSG: 3044, ETRS89 / ETRS-TM32".
>
> If he enables editing on a shape file with the following .prj file, it doesn't happen:
>
> PROJCS["ETRS89_UTM_zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
>
> The strange thing is that this only happens on his computer not on a couple of other machines we have tried on.
>
> If there indeed is a CRS mismatch it make sense, but he is the only of our users experiencing this.
>
>
> Regards, Casper
>
>
>


__________ Information from ESET Mail Security, version of virus signature database 13303 (20160408) __________

The message was checked by ESET Mail Security.
http://www.eset.com




More information about the Qgis-developer mailing list