2

I am performing an NDVI calculation against 2 sets of rasters. One produced by LANDSAT5 the other by LANDSAT8.

r.mapcalc "L8_NDVI = float(L8Band5 - L8Band4) / (L8Band5 + L8Band4)"

The L8_NDVI file gets created successfully in my GRASS mapset. I see it in all of the subdirectories (cell, cellhd, hist,etc.), but It does not appear in the QGIS Layers Panel. Is there a GRASS "Show Output On Map" command that I need to execute as follwoup to my ndvi command?

I tried the simple r.in.gdal command to import the layer form the mapset to the QGIS map, but it prompts me to overwrite the output file which also happens to be the input file.

1

GRASS GIS is not QGIS. For importing the files from a GRASS mapset look at the QGIS GRASS Cookbook. You can use

  • The GRASS (6 or 7 version) plugin
  • if GDAL/OGR is properly configured in QGIS, you can directly open the /.../cellhd/name_of_raster for rasters and the /.../vector/name_of_layer/head' file for vectors

New

Ok, therefore simply use the Browser Panel and move the layers to the QGIS canvas (The QGIS GRASS plugin is back)

enter image description here

But for GRASS 7.x, look at

  • 1
    Let me clarify a bit, I am using QGIS Desktop 2.14.3 with Grass 7.0.4. The Grass Plugin is active and installed. I am using the Grass Tools within QGIS. – Scott Bing Jul 15 '16 at 19:05
  • The layer files already exist in the mapset. All I want to do is show them in the map (add them to the Layer Panel in QGIS). I don’t want to recreate them in the mapset. This is a similar process right clicking on a layer in the QGIS and selecting the ‘Remove Layer’ function. The layer disappears from the layers panel on the QGIS map but it still exists in the mapset. Is there way to restore that layer to the QGIS map? – Scott Bing Jul 15 '16 at 19:20
  • look in new, above – gene Jul 15 '16 at 20:16
-2

Navigate to where your GRASS mapset is in the Browser Panel and simply drag and drop from there.

  • 2
    Isn't that just part of what another answerer wrote and illustrated two years ago? – PolyGeo Jul 13 '18 at 6:45

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.