Outdated version of the documentation. Find the latest one here.

10.2. Lesson: 役に立つQGISプラグイン

プラグインをインストールして有効化・無効化することができるようになりました。それではいくつかの便利なプラグインの例を見て、これが実際にどのように役に立つか見ていきましょう。

このレッスンの目標: プラグインインターフェイスに慣れ、いくつかの便利なプラグインを使ってみる。

10.2.1. basic Follow Along: The Raster Terrain Analysis Plugin

  • Start a new map with only the srtm_41_19.tif raster dataset in it (look in exercise_data/raster/SRTM).

From the lesson on raster analysis, you’re already familiar with raster analysis functions. You used GDAL tools (accessible via Raster ‣ Analysis) for this. However, you should also know about the Raster Terrain Analysis plugin. This ships standard with newer versions of QGIS, and so you don’t need to install it separately.

  • Open the Plugin Manager and check that the Raster Terrain Analysis plugin is enabled:

    ../../../_images/raster_terrain_enabled.png
  • Open the Raster menu. You should see a Terrain analysis submenu.

  • Click on Terrain analysis ‣ Relief and input the following options:

    ../../../_images/terrain_analysis_dialog.png
  • Save the new file under exercise_data/plugins/relief.tif (create a new folder if necessary).

  • Leave the Output format and Z factor unchanged.

  • Make sure the Add result to project box is checked.

  • Click the Create automatically button. The list below will be populated:

    ../../../_images/terrain_analysis_list.png

    These are the colors that the plugin will use to create the relief.

  • If you like, you can change these colors by double-clicking on each row’s color bar. For example:

    ../../../_images/color_changes.png
  • Click OK and the relief will be created:

    ../../../_images/relief_created.png

This achieves a similar effect to when you used the semi-transparent hillshade as an overlay over another raster layer. The advantage of this plugin is that it creates this effect using only one layer.

10.2.2. basic Follow Along: The OpenLayers Plugin

  • Start a new map and add the roads.shp layer to it.

  • Zoom in over the Swellendam area.

  • Using the Plugin Manager, find a new plugin by entering the word OpenLayers in the Filter field.

  • Select the OpenLayers plugin from the filtered list:

    ../../../_images/select_openlayers.png
  • Click the Install plugin button to install.

  • When it’s done, close the Plugin Manager.

Before using it, make sure that both your map and the plugin are configured properly:

  • Open the plugin’s settings by clicking on Web ‣ OpenLayers plugin ‣ OpenLayers Overview.

  • Use the panel to choose a map type you want. In this example, we’ll use the “Hybrid” type map, but you can choose any others if you want.

    ../../../_images/hybrid_map_selected.png
  • Open the Project Properties Dialog by selecting Project –> Project Properties from the menu.

  • Enable “on the fly” projection and use the Google Mercator projection:

    ../../../_images/google_mercator_crs.png
  • Now use the plugin to give you a Google map of the area. You can click on Web ‣ OpenLayers Plugin ‣ Add Google Hybrid Layer to add it:

    ../../../_images/add_google_hybrid.png

This will load a new raster image in from Google that you can use as a backdrop, or to help you find out where you are on the map. Here is such a layer, with our own vector road layer as overlay:

../../../_images/google_hybrid_result.png

ノート

You may need to drag your roads layer above the Google layer to make it visible above the background layer. It may also be necessary to zoom to the extent of the roads layer to re-center the map.

10.2.3. moderate Follow Along: The GeoSearch Plugin

  • Start a new map with no datasets.

  • Open the Plugin Manager and filter for the GeoSearch Plugin and click Install Plugin to install it.

    ../../../_images/find_geosearch_plugin.png
  • Close the Plugin Manager.

  • You can now use the GeoSearch plugin to search for placenames. Click on Plugins ‣ GeoSearch Plugin ‣ GeoSearch to open the GeoSearch dialog.

    ../../../_images/geosearch_menu.png
  • Search for Swellendam in the GeoSearch Dialog to locate it on your map:

    ../../../_images/city_search.png

10.2.4. In Conclusion

QGISではたくさんの便利なプラグインを利用することができます。ビルトインツールを用いてこれらのプラグインを管理すれば、新しいプラグインを見つけ、それらを最適に利用することができます。

10.2.5. What’s Next?

次はリモートサーバーにホストされているレイヤーをリアルタイムで使う方法を見ていきます。