This tutorial explores some basic raster operations in QGIS such as viewing, mosaicing and subsetting.
We will download some public domain raster data for Brazil and view it in QGIS. Next, we will merge these into a single mosaic and clip it using a country boundary to get a single seamless dataset for the country.
We need Brazil country boundary to clip our raster. You can get the Admin 0 - Countries shapefile from Natural Earth.
NASA/GSFC, Rapid Response site has a good collection of near real-time satellite imagery. A good regional product is USDA Foreign Agricultural Service (FAS) subsets.. We will use 2km resolution FAS subsets for Brazil for this tutorial.
Here is how to search and download the revelant data.
Repeat the process for all 7 FAS subsets for Brazil.
For convenience, you can directly download sample data used in this tutorial from links below.
FAS_Brazil1.2013363.aqua.ndvi.2km.tif
FAS_Brazil2.2013363.terra.ndvi.2km.tif
FAS_Brazil3.2013363.aqua.ndvi.2km.tif
FAS_Brazil4.2013363.aqua.ndvi.2km.tif
FAS_Brazil5.2013363.aqua.ndvi.2km.tif
FAS_Brazil6.2013363.terra.ndvi.2km.tif
FAS_Brazil7.2013363.aqua.ndvi.2km.tif
Data Sources: [LANCE] [NATURALEARTH]
Ctrl
key and click on the image files to make a multiple selection. Click
Open.Note
The Raster menu in QGIS comes from a core plugin called GdalTools. If you do not see the Raster menu, enable the GdalTools plugin from . See Using Plugins for more details.
Ctrl
key and select all the.
subsets. Now click Select… next to Output file
and name the output as Brazil_mosaic.tif
. At the bottom, check the box next to
Load into canvas when finished. Click OK.ne_10m_admin_0_countries.zip
file and click
Open. When prompted to select the layer within the zip file,
select ne_10m_admin_0_countries.shp
.ne_10m_admin_0_countries
layer and select
Save Selection As….brazil_boundary.shp
and make sure Add
saved file to map box is checked. click OK.Brazil_mosaic
. Name the
Output file as Brazil_mosaic_clipped
. In the
Clipping mode section, choose Mask layer. Select
the newly created brazil_boundary
as the mask layer. Check the box next
to Load into canvas when finished. Click OK.Brazil_mosaic_clipped
layer and select Properties.This work is licensed under a Creative Commons Attribution 4.0 International License