官术网_书友最值得收藏!

  • Practical GIS
  • Gábor Farkas
  • 430字
  • 2021-07-02 22:49:12

Accessing raster data

The first data type that we will use is raster data. It might be the most familiar to you, as it resembles traditional images. First of all, let's open QGIS. In the browser panel, we can immediately see our downloaded data if we navigate to our working directory. We can easily distinguish vector data from raster data by their icons. Raster layers have a dedicated icon of a 3x3 pixels image, while vector layers have an icon of a concave polygon:

Don't have a browser panel? You can toggle panels from the View menu's Panels option. If it is displayed, you can dock it anywhere by dragging it out from its current place and placing it in another part of the GUI.

We can drag and drop most of the data from the browser panel or, alternatively, use the Add Raster Layer button from the Add layer toolbar and browse the layer. The browser panel is more convenient for easily recognizable layers as it only lists the files we can open and hides auxiliary files with every kind of metadata. Let's drag one of the SRTM rasters to the canvas (or open one with Add Raster Layer). This is a traditional, single-band raster. It is displayed as a greyscale image with the minimum and maximum values displayed in the Layers Panel:

You can save your project any time with the Save and Save As buttons. The resulting file only contains general data about your current work (for example, paths to your opened layers, styles, and so on) from which you can restore it later. For more information, open a project file in a text or code editor.

As you can see in the preceding screenshot, there is a regular grid with cells painted differently, just like an image. However, based on the maximum value of the data, its colors aren't hard coded into the file, like in an image. Furthermore, it has only a single band, not three or four bands for RGB(A). Let's examine the raster more carefully by zooming in until we can see individual cells. We can also query them for their values with the Identify Features tool by clicking on a cell (raster):

As you can see, we get a number for every cell, which can be quite out of the range of 0-255 representing color codes. These numbers seem arbitrary, and indeed, they are arbitrary. They usually represent some kind of real-world phenomenon, like in our case, the elevation from the mean sea level in meters.

主站蜘蛛池模板: 清水县| 布拖县| 富民县| 宽城| 株洲市| 高碑店市| 思南县| 连云港市| 麻栗坡县| 肇源县| 靖西县| 顺平县| 西平县| 高要市| 阜新| 阜新| 柳河县| 汶上县| 临高县| 若羌县| 鹿邑县| 于田县| 许昌县| 若尔盖县| 泽州县| 手游| 砀山县| 隆子县| 松滋市| 开封县| 黄冈市| 华亭县| 久治县| 小金县| 武隆县| 富裕县| 盐亭县| 钟祥市| 张家口市| 合江县| 图木舒克市|