[Qgis-developer] Shapefile: prj vs qpj (CRS info)
John C. Tull
jctull at gmail.com
Tue Mar 1 11:56:29 EST 2011
Hi Benoit,
I can confirm this behavior for me as well. It seems to have crept into trunk in the past month or two. I have been banging my head on this as it is very frustrating. Shapefiles with associated prj, gdal recognizes the CRS, but QGIS seems to ignore it.
Let's look at the OS we are using. I am on OS X with William's frameworks. I build following the OS X build instructions. Any chance you are on the same build environment or is it another OS?
Cheers,
John
On Mar 1, 2011, at 8:41 AM, Benoit wrote:
> 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.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list