[Qgis-developer] Shapefile: prj vs qpj (CRS info)

Benoit benoit-3 at bc-consult.com
Tue Mar 1 11:41:24 EST 2011


Hi Paolo,

I agree with you.

Furthermore, the behaviour should depend on the option selected in
Settings/Options->CRS tab:

Option: "Prompt for CRS" should ask the user to define the CRS of the
loaded file if, and only if, it is not defined. Unfortunately if you
only have a prj file, QGIS asks you to define the CRS. QGIS only
recognises the qpj file.

Option: "Project wide default CRS will be used". Here again the prj file
is not recognised and the shapefile is given the project CRS. It is fine
when both have the same CRS but lead to wrong location if they don't and
"on-the-fly" projection has been enabled.

Option: "Global default CRS displayed below will be used". Again, the
prj file is not recognised and the shapefile is given the global default
CRS.

I have this problem when I want to import a shapefile (in a projected
CRS) into a project having a Google Mercator CRS and OTF enabled.

Can this be confirmed by someone, or am I doing something wrong?

Regards,
Benoit



On 01/03/2011 16:57, Paolo Cavallini wrote:
> Il giorno mar, 01/03/2011 alle 08.26 -0500, benoit-3 at bc-consult.com ha
> scritto:
>
>> Yes, there is a CRS definition difference between prj and qpj.
>>  But, if you only have a prj file you can rename it to qpj. QGIS does 
>>  not complain and displays the shapefile at the correct location.
>>  So the way to go forward, at least for me, would be to rename all the 
>>  shapefiles *.prj to *.qpj in order to use them in QGIS.
> This is not the correct behaviour: QGIS should use qpj when present,
> otherwise prj, if nothing is available it should apply the default, as
> chosen by the user from the menu Options.
> If the behaviour you describe is confirmed (in my case it is not), then
> it's a bug.
> All the best.


More information about the Qgis-developer mailing list