2

I am using QGIS 3.03 Girona and trying to process the CONUS 2016 NLCD (Continental US 2016 National Land Cover Database) 30x30 raster data provided by the MRLC viewer. I downloaded an area with the boundaries W078 N40 E076 S38 and would like to use this landcover data with Open Street Map vector data and SRTM-1 elevation height maps. That data comes in the WGS84 projection while the NLCD data comes in its own projection: enter image description here

The CRS given by QGIS is:

  • Generated CRS (+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs)

However, I have been having trouble reprojecting the data. If I set WGS84 directly by Set Layer CRS, the raster layer disappears entirely. Zoom to layer shows its now projected fine but massively zoomed out: notice the coordinates at the bottom - thats in degrees!

enter image description here

If I save as with WGS84 set, I get the same (except in black and white).

If I use the warp tool to reproject as WGS84, I get the very same that I started with (the image on top of the OSM data correctly scaled, but slanted over).

Does anyone know how to project it properly?

It should cover the exact same area as my four SRTM-1 elevation tiles.

1 Answer 1

2

I think this issue is coming from the projection setting the CONUS 2016 NLCD data has. As you have described in your post, it has +datum=WGS84, however, the Proj4 textstring of NAD83 / Conus Albers; EPSG:5070 has +ellps=GRS80.

QGIS is following this definition and created a new custom projection, as it did not recognize the CRS.

You can fix it in two steps:

(1) Override +datum=WGS84 by +ellps=GRS80

  • Raster > Projections > Assign Projection
  • Desired CRS is EPSG:5070 (NAD83 / Conus Albers)

(2) Reproject it to WGS 84 geographical coordinates by WARP.

  • Raster > Projections > Warp (Reproject)

Try not to reproject the raster by right clicking > Export > Save As... because this does not offer you to select Nearest Neighbor option. Because your raster has color palette (Land Cover Class), you will need to keep the original cell value unchanged during reprojection task.

enter image description here

If in doubt, open an .xml file associated with the downloaded file, then you will find a description (geodetic tag) written by authors:

<geodetic>
        <horizdn>North American Datum of 1983</horizdn>
        <ellips>Geodetic Reference System 80</ellips>
        <semiaxis>6378137.000000</semiaxis>
        <denflat>298.257222</denflat>
</geodetic>  

As rf (1/f) is 298.257222101 for GRS80, and 298.257223563 for WGS84, overriding will have no effect on your data.

Additional note - This raster has an associated color palette. Export the palette as a .clr file from the original image, and reload it to use it for the reprojected image.

1
  • Thank you for this detailed comment. I will mark this as the answer as soon as I verify it works.
    – user143817
    May 29, 2019 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.