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

  • QGIS 2 Cookbook
  • Alex Mandel Víctor Olaya Ferrero Anita Graser Alexander Bruy
  • 376字
  • 2021-07-16 11:12:35

Describing data sources

You can get additional information about a data file before opening it. This recipe shows you how to explore the properties of a data origin.

Getting ready

Before you start working, make sure that you have copied the sample dataset to your filesystem and that you have it located.

How to do it…

  1. In the QGIS browser, navigate to the folder with your sample dataset. Select the elev_lid792_1m file and right-click on it. In the context menu, select Properties. A dialog like the one in the following screenshot will appear:
    How to do it…

    This dialog displays the properties of a raster layer.

  2. Now, let's select a vector layer instead. Select the elev_lid792_randpts.shp file, right-click on it, and select Properties. The information dialog will look like the following:
    How to do it…

How it works…

In the upper part of the description window, you will see a field named Provider. Provider defines the type or data origin and who takes care of reading the data and passing it to QGIS. For raster layers, you will see gdal as Provider. For most file-based vector layers, ogr will be the provider that will appear. They refer to the GDAL and OGR libraries, two open-source libraries that are used by many GIS programs to access both raster and vector data.

There's more…

If the data is already loaded in QGIS, you can access the information about it in the Properties section of the layer (right-click on the layer name to select the Properties entry in the context menu). In the sections displayed in the left-hand side, select the Metadata section. You will see a box containing all the information corresponding to the layer data origin:

There's more…

Functionality provided by the GDAL library, which (mentioned earlier) acts as a provider for raster layers, is also available in the Raster menu. This includes processing and data analysis methods, but it also includes the information tool that is used to describe a raster data source. You will find it by navigating to Raster | Miscellaneous | Info:

There's more…

See also

  • This is a more complex way to retrieve properties as you can call the tool by adjusting the parameters with more details to get additional information. To know more, check the gdalinfo help page at http://www.gdal.org/gdalinfo.html.
主站蜘蛛池模板: 三穗县| 龙里县| 山西省| 甘谷县| 晋江市| 开江县| 敖汉旗| 沭阳县| 团风县| 黄冈市| 禹州市| 五指山市| 扎鲁特旗| 濮阳市| 华池县| 周至县| 淳化县| 大姚县| 寿阳县| 兴城市| 博野县| 甘德县| 左贡县| 乌什县| 定结县| 永兴县| 那坡县| 南部县| 新建县| 海淀区| 新乡县| 苏尼特左旗| 微博| 古蔺县| 东明县| 华池县| 周宁县| 镇雄县| 景德镇市| 赞皇县| 从化市|