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

  • 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.

主站蜘蛛池模板: 广元市| 教育| 景泰县| 甘谷县| 辽中县| 三台县| 泉州市| 剑阁县| 台南县| 阿克| 威宁| 安塞县| 黑山县| 高清| 宣威市| 阜宁县| 民和| 景泰县| 建宁县| 南丹县| 晴隆县| 中山市| 麦盖提县| 缙云县| 马尔康县| 宣武区| 手机| 楚雄市| 宜川县| 吐鲁番市| 射阳县| 敦煌市| 伽师县| 兴安盟| 基隆市| 玛沁县| 东安县| 陈巴尔虎旗| 黔西县| 城市| 监利县|