The Image Is Too Wide to Output Please Crop It or Reduce Resolution and Try Again
Raster Mosaicing and Clipping¶
This tutorial explores some basic raster operations in QGIS such as viewing, mosaicing and subsetting.
Overview of the chore¶
Nosotros 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.
Other skills yous will learn¶
-
Searcing and downloading near real-time public domain satellite imagery.
-
Selecting a unmarried feature from a vector layer and saving it to a new shapefile.
Get the information¶
We need Brazil state boundary to clip our raster. Yous can get the Admin 0 - Countries shapefile from Natural World.
NASA/GSFC, Rapid Response site has a good drove of near existent-fourth dimension satellite imagery. A good regional production is USDA Foreign Agricultural Service (FAS) subsets.. We will utilise 2km resolution FAS subsets for Brazil for this tutorial.
Here is how to search and download the revelant data.
-
Open the South America region subsets. Find the Brazil subsets shown in the FAS Subsets section. Click on any one of them.
-
In the details page, click the 2km link nether the product of your choice. Here we will download the NDVI product. Learn more almost NDVI.
-
Click the Download GeoTIFF file link to download the raster image.
Repeat the process for all 7 FAS subsets for Brazil.
For convenience, you can straight download sample data used in this tutorial from links beneath.
ne_10m_admin_0_countries.zero
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]
Procedure¶
-
Open QGIS and go to .
-
Scan to the directory with the individual images. Agree down the Ctrl key and click on the paradigm files to make a multiple selection. Click Open.
-
You volition meet the images load up in the Table of Content on the left panel. At present allow us create a single Mosaic image from all these individual images. Click on .
Note
The Raster menu in QGIS comes from a cadre plugin chosen GdalTools. If you do not see the Raster menu, enable the GdalTools plugin from . Run into Using Plugins for more details.
-
In the Merge dialog, click Select… side by side to Input files and browse to the directory containing all the individual geotiffs. Proceed holding Ctrl cardinal and select all the. subsets. At present click Select… next to Output file and name the output as
Brazil_mosaic.tif
. At the lesser, check the box adjacent to Load into sail when finished. Click OK.
-
You volition get a popular-upwardly message saying Processing complete, once the mosaic is created and loaded to the QGIS Canvas. You will encounter that the individual images and now combined and mosaiced into a unmarried layer. You lot can now turn off individual layers past un-checking the box next to them.
-
Some other Raster functioning you can do is to subset or crop an prototype. We tin apply a polygon from a vector layer to crop the raster to the exact shape. Permit's load the state polygons shapefile we downloaded from Natural Earth. Go to .
-
Select the
ne_10m_admin_0_countries.zip
file and click Open. When prompted to select the layer inside the zip file, selectne_10m_admin_0_countries.shp
.
-
In one case the vector layer is loaded, we want to select and excerpt the polygon for Brazil. Select the Select Unmarried Characteristic tool from the toolbar.
-
Click anywhere on the Brazil polygon and it will be selected.
-
Right-click the
ne_10m_admin_0_countries
layer and select Save Selection As….
-
Proper name your output equally
brazil_boundary.shp
and brand certain Add saved file to map box is checked. click OK.
-
You will see the Brazil boundary polygon now loaded in QGIS.
-
Now go to .
-
Select the input file (raster) as
Brazil_mosaic
. Name the Output file asBrazil_mosaic_clipped
. In the Clipping mode section, cull Mask layer. Select the newly createdbrazil_boundary
as the mask layer. Bank check the box next to Load into canvas when finished. Click OK.
-
The new cropped layer will be loaded into QGIS. You will discover the black pixels surrounding the actual mosaic. Let'due south remove that. Right-click on the
Brazil_mosaic_clipped
layer and select Properties.
-
Go to the Transparency tab, and add 0 as an Additional no data value.
-
Now y'all take a squeamish mosaic cropped to a country boundary that you tin can use in your projection as a background layer or practise further analysis on.
comments powered by
Source: http://www.qgistutorials.com/en/docs/raster_mosaicing_and_clipping.html
0 Response to "The Image Is Too Wide to Output Please Crop It or Reduce Resolution and Try Again"
Postar um comentário