[Qgis-developer] Warning from DigitizingTools about CRS mismatch

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Sat Apr 9 00:35:23 PDT 2016


A futher note..

The two projections 3044 and 25832 are *identical* regarding the proj4 
parameterdefinitions in the srs.db database, so QGIS might get confused 
when it opens a datasource, where the projection definition for the 
datasource is based on proj4.

See 
http://gis.stackexchange.com/questions/115690/difference-between-etrs89-etrs-tm32-and-etrs89-utm-zone-32n 


You could do some kind of "cowboy" trick and remove the reference to 
3044 from the srs.db database, table tbl_srs. The warnings from last 
post still apply :-)

Regards

Bo Victor Thomsen
GIS & Database specialist
Municipality of Frederikssund, Denmark

Den 08/04/16 kl. 13:27 skrev Casper Børgesen (CABO):
> Hi Bernhard
>
> I do follow your suggestions and they make perfectly sense. This is a warning and I can probably safely disregard it in this case. I'm more curious to discover why two computers using the same OS and QGIS version seems to handle the CRS difference differently. My initial mail was not specifically directed at DigitizingTools but it is (from the user point of view) the source of the warning.
>
> What I suspect is that some setting somewhere, inside or outside QGIS, might lead QGIS to behave differently - and I am curious to know :)
>
>
> Regards Casper
>
> -----Original Message-----
> From: Bernhard Ströbl [mailto:bernhard.stroebl at jena.de]
> Sent: 8. april 2016 12:55
> To: Casper Børgesen (CABO); qgis-developer at lists.osgeo.org
> Subject: Re: [Qgis-developer] Warning from DigitizingTools about CRS mismatch
>
> Hi Casper,
>
> I meant the CRS set in the layer's properties for the layer in question.
> As you said both are using the same project so the project's CRS should be the same in both cases.
> In your first mail you state that the project's CRS is EPSG:25832 and the layer's is EPSG:3044. There is the missmatch. Change this to
> EPSG:25832 and all is fine. Check if the layer's CRS has been set to
> EPSG:25832 on the working computer.
> If the very same layer loads into the very same project with different CRS on different machines then this is a question of QGIS in general and has nothing to do with DigitizingTools (which is just pointing out the difference).
>
> Bernhard
>
> Am 08.04.2016 um 12:43 schrieb Casper Børgesen (CABO):
>> Hi Bernhard
>>
>> Since its the same QGIS project were opening on the different computers, I would expect them to behave the same. The current CRS (as stated in the bottom right of the QGIS window) is EPSG:25832 (OTF).
>>
>> I tried replacing the PRJ file of problematic shape file with the PRJ from the working shape file (see the first mail), but QGIS still displays the warning.
>>
>>
>> Regards, Casper
>>
>> -----Original Message-----
>> From: Bernhard Ströbl [mailto:bernhard.stroebl at jena.de]
>> Sent: 8. april 2016 11:38
>> To: Casper Børgesen (CABO); qgis-developer at lists.osgeo.org
>> Subject: Re: [Qgis-developer] Warning from DigitizingTools about CRS
>> mismatch
>>
>> Hi Casper,
>>
>> no idea why they behave differently. Are the settings for the layer's SRS on both machines the same?
>> As I wrote, the warning is shown if there is a missmatch in the project's and the layer's SRS-id.
>>
>> Bernhard
>>
>> Am 08.04.2016 um 11:13 schrieb Casper Børgesen (CABO):
>>> Hi Bernhard
>>>
>>> Thanks for your answer.
>>>
>>> Yes I know that QGIS tries hard to determine the SRS-id which matches the values of the PRJ file. But my main issue is why it displays the warning only on one computer and not the others (same QGIS project with same data)?
>>>
>>> Which mechanisms could trigger the difference in whether the warning should be shown or not?
>>>
>>> We are running QGIS 2.14.0 64 bit on Windows 7.
>>>
>>>
>>> Regards Casper
>>>
>>>
>>> -----Original Message-----
>>> From: Qgis-developer [mailto:qgis-developer-bounces at lists.osgeo.org]
>>> On Behalf Of Bernhard Ströbl
>>> Sent: 8. april 2016 10:38
>>> To: qgis-developer at lists.osgeo.org
>>> Subject: Re: [Qgis-developer] Warning from DigitizingTools about CRS
>>> mismatch
>>>
>>> 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
>>>> _
>>>> 1
>>>> 989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich"
>>>> ,
>>>> 0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Merca
>>>> t
>>>> o
>>>> r"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.
>>>> 0
>>>> ],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996]
>>>> , P ARAMETER["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_19
>>>> 8
>>>> 9
>>>> ",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],
>>>> U
>>>> N
>>>> IT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"]
>>>> ,
>>>> P
>>>> ARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PAR
>>>> A
>>>> M
>>>> ETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAME
>>>> T E R["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
>>
>>
>
>
> __________ Information from ESET Mail Security, version of virus signature database 13303 (20160408) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list