I am trying to import a tiff raster file into GRASS however every time I do this the below error message comes up. I am using a custom CRS so I have tried changing it back to the default CRS but still the same message comes up.

enter image description here

Screenshot of GRASS shell:

enter image description here


You have about three options:

  1. (Best) In the GRASS plugin, open the GRASS shell - it's at the top of the Module tree. Type into the command line the r.in.gdal command, and include the location=... parameter. This will create a new LOCATION based on your custom CRS, and import the raster there. You'll then need r.proj to reproject your other layers into this LOCATION with the custom CRS.
  2. (Also good) You can also run GRASS standalone, outside of QGIS. Start in the same grassdata directory as you're using in QGIS (with QGIS shutdown). Then use either the command line, or the GUI menus to import your raster into a new LOCATION with the same location=... parameter like above.
  3. (Not so good) If you're sure the layer in correctly located in some standard projection then you have the option to override the CRS checking. It's in the Advanced options section of the r.in.gdal window


Now I see that your original raster has no projection information attached to it. Are you sure that it is already referenced in your custom laea projection? If so, then you should first add your custom projection to QGIS - that's under the Settings Menu->Custom Projection. Give it an understandable name, and enter the full proj4 string in the Parameters section.

Now load your raster into QGIS, and choose, under the Raster->Projections menu the Assign function, and set the proj info of this raster to your new custom CRS. (Note: If the original raster is actually in some other CRS, this "Assign" will throw it somewhere to the other side of the world...)

Next, In the GRASS plugin, you'll add a new LOCATION, again based on this new custom CRS. It's the second button on the GRASS plugin bar. Again give the location an understandable (but short and no spaces) name. The steps thru the LOCATION wizard are pretty clear.

Once you've done this, open this new LOCATION in the GRASS plugin (forst button on the GRASS plugin bar), and you should be able to import you raster directly, without the "location=" parameter.

  • I am attempting solution 1. Excuse my inexperience but I am unaware of how to use the command line in Grass shell. Is the exact command line bash-3.2$r.in.gdallocation=+proj=laea +lat_0=70 +lon_0=0 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ? I have included a screen shot of GRASS shell of where I believe you want me to type the above.
    – anina
    Sep 23 '14 at 12:25
  • I just now noticed that your original raster has no CRS information. I've added a different procedure to the answer above
    – Micha
    Sep 24 '14 at 21:27

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.