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

benoit-3 at bc-consult.com benoit-3 at bc-consult.com
Tue Mar 1 08:26:22 EST 2011


 Hi Luiz,

 Thanks for your comments.

 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.

 Note that in doing the above, loading the shapefile into QGIS and going 
 to Layers properties, General tab, the CRS is specified as below:
 " - * Generated CRS (+proj=utm +zone=30 +ellps=WGS84 +units=m 
 +no_defs)"

 It seems that QGIS recomputes its own CRS from the qpj (= renamed prj).

 Another question is why does QGIS now need a qpj file when a prj file 
 exists?

 Regards,
 Benoit


 On Tue, 1 Mar 2011 09:47:19 -0300, Luiz Motta <motta.luiz at gmail.com> 
 wrote:
> Hi Benoit,
>
> I created a new shapefile by QGIS with same CRS of Town (EPSG 32630).
>
> The QGIS created two files of projections: PRJ and  QPJ.
>
> The PRJ have the same value of yours (Town.prj) but the QPJ don´t 
> have
> same value (see below):
>
> 1) Default -PRJ :
>
> 
> PROJCS["WGS_1984_UTM_Zone_30N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
>
> 2) Create by QGIS - QPJ :
>
> PROJCS["UTM Zone 30, Northern Hemisphere",GEOGCS["WGS
> 84",DATUM["WGS_1984",SPHEROID["WGS
> 
> 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
>
> The QGIS read CRS only by QPJ value.
>
> You can put this value(QPJ) inside in PRJ file for work with QGIS.
>
>
> The questions is:
> Why, QGIS have two different values for "WKT CSR"  for same EPSG 
> 32630 ?
> One for PRJ other for QPJ
>
>
>
> 2011/3/1  <benoit-3 at bc-consult.com>:
>> Hi Paolo,
>>
>> Please see attached zip file (small 2KB file)
>>
>> It contains:
>> - A point shapefile with its CRS set to WGS84 UTM30N (prj file only) 
>> and a
>> single point (located over the town of Kumasi in Ghana)
>> - A QGIS project in Google Mercator CRS.
>>
>> When you load the shapefile into the project and then use the google 
>> plugin
>> to display the satellite image around the point you could note that 
>> the
>> satellite image is not what you expect (if you know the area).
>> Also, double click the shapefile layer and go to the General tab. 
>> The CRS is
>> set to Google Mercator, not UTM30N.
>>
>> Quit QGIS, rename the prj to qpj and do the above process again, and 
>> all is
>> correct now.
>>
>> I hope you can reproduce this behaviour.
>>
>> Regards,
>> Benoit
>>
>>
>>
>> On Tue, 01 Mar 2011 12:13:03 +0100, Paolo Cavallini 
>> <cavallini at faunalia.it>
>> wrote:
>>>
>>> Il giorno mar, 01/03/2011 alle 12.59 +0200, Tim Sutton ha scritto:
>>>
>>>> I tested with a shp that I use in training courses I give. For me 
>>>> if I
>>>> rename the qpj, the prj is still recognised correctly.
>>>
>>> Just checked: a shp with a prj, no qpj is recognized and 
>>> reprojected
>>> correctly.
>>> Could you please share the shp that gives you trouble?
>>> 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