3

I'm a fairly new user of QGIS and I've run into an issue that I can't seem to solve on my own. I'm trying to work with the NRCan Atlas of Canada Waterbodies SHP file but I'm having an issues re-projecting other datasets to line up with this one.

When I reviewed the .PRJ file packaged with the NRCan data, it indicates it is Lambert Conformal Conic projection with two standard parallels at 49°N and 77°N (see .PRJ text below); however, when I add the file to QGIS (v1.8.0-Lisboa) and view the layer properties, the CRS is displayed as follows:

USER:100001 - * Generated CRS (+proj=lcc +lat_1=49 +lat_0=49 +lon_0=-95 +k_0=1 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs)

Note that the second standard parallel (which should be in there as '+lat_2=77') is missing... I'm hoping this explains why my other datasets aren't lining up when I project them, but I can't seem to get QGIS to recognize the second parallel.

Suggestions? Or is this second parallel not an issue for re-projecting data?


Unmodified NRCan .PRJ file contents

 PROJCS["NAD_1983_Canada_Atlas_Lambert",
 GEOGCS["GCS_North_American_1983",
  DATUM["D_North_American_1983",
  SPHEROID["GRS_1980",6378137.0,298.257222101]],
  PRIMEM["Greenwich",0.0],
  UNIT["Degree",0.0174532925199433]],
 PROJECTION["Lambert_Conformal_Conic"],
  PARAMETER["False_Easting",0.0],
  PARAMETER["False_Northing",0.0],
  PARAMETER["Central_Meridian",-95.0],
  PARAMETER["Standard_Parallel_1",49.0],
  PARAMETER["Standard_Parallel_2",77.0],
  PARAMETER["Latitude_Of_Origin",49.0],
  UNIT["Meter",1.0]]
  • I think the CRS of this shapefile might be EPSG:3979. N. – nhopton Dec 30 '13 at 19:13
  • @nhopton, i think you might be right about the EPSG code. But I'm still wondering if QGIS is correctly interpreting the second standard parallel. – chatty Dec 30 '13 at 19:33
  • 1
    I was getting a similar issue but only on Linux - Windows QGIS could find the right projection: lists.osgeo.org/pipermail/qgis-user/2013-November/024805.html I'm not sure how to get the missing projections into QGIS by default (proj4 is missing them maybe?). – SaultDon Dec 30 '13 at 19:39
  • In that mailing list post, is a link to my projected dataset that you can steal the prj file from to see if that works for you too. – SaultDon Dec 30 '13 at 19:45
  • 1
    I've updated the ticket, I'll take a peek either tonight or tomorrow. – user10353 Dec 30 '13 at 23:24
2

The problem you found is an already known bug, and has some tickets for GDAL:

http://trac.osgeo.org/gdal/ticket/4605

http://trac.osgeo.org/gdal/ticket/5191

To solve the problem, Set CRS for Layer to EPSG:3979, then Save As ... to another name.

With that, a .qpj file is added with the correct EPSG code, which will QGIS force to use that.


EDIT

Ogr2ogr seems to read the projection correctly, so running

ogr2ogr -t_srs EPSG:4326 waterwgs.shp AC_1M_Waterbodies.shp 

converts the shapefiles to a CRS that QGIS can load without misplacement.

  • thanks very much for the links; that very much describes the issue. I don't seem to have EPSG:3978 or EPSG:3979 available when I try to Set Layer CRS, so I'm unable to force it to be 3978. Though this seems to be an issue with my database of CRS' rather than an issue with the solution. – chatty Dec 30 '13 at 20:41
  • @Andre Do you know if those have patches? I don't see them referenced in the bug tickets. I'd like to compile gdal with those patches to test this out. I only get this problem on Linux - Windows with QGIS 2.0.1 can set the projection properly as EPSG:3978 or EPSG:3979 – SaultDon Dec 30 '13 at 21:20
  • 2
    You get those EPSG codes if you switch to QGIS 2.0.1 or GDAL 1.10.1. kyle has added some patches now, but I have to wait until it gets into the Windows binaries. – AndreJ Dec 31 '13 at 7:09
  • If someone takes a look at the ticket(s) and agrees with my logic, I'll apply it to the trunk and it should get into Tamas' dev build after that. Thanks for the reporting. – user10353 Dec 31 '13 at 20:14
  • Checked in to the trunk. Should be available in dev builds tomorrow. – user10353 Jan 15 '14 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.