重要

翻訳は あなたが参加できる コミュニティの取り組みです。このページは現在 58.90% 翻訳されています。

19. ベクタタイルの操作

19.1. ベクタタイルとは?

ベクタタイルは地理データのパケットであり、Web上で転送するためにあらかじめ定義されたほぼ正方形の「タイル」にパッケージ化されています。これらは、事前にレンダリングされたラスタ地図タイルとベクタ地図タイルを組み合わせたものです。ベクタタイルサーバは、あらかじめレンダリングされた地図画像の代わりに、各タイルの境界でクリップされたベクタ地図データを返します。クリップされたタイルはベクタタイルサービスのズームレベルを表すもので、ピラミッドアプローチに由来しています。この構造を使用することで、タイル化されていないベクタ地図に較べてデータ転送を削減できます。現在のマップビュー範囲内の、現在のズームレベルのデータのみを転送すれば済むからです。また、タイル化されたラスタ地図との比較では、ベクタデータは通常、レンダリングされたビットマップよりもはるかに小さいため、データ転送も大幅に削減されます。ベクタタイルにはスタイル設定の情報は割り当てられていないため、データを表示するためにはQGISで地図作成スタイルを適用する必要があります。

../../../_images/vector_tiles_pyramid_structure.png

図 19.1 ズームレベルを持つベクタタイルのピラミッド構造

19.2. サポートする形式

ベクタタイルのサポートは以下のとおりです:

  • リモートソース(HTTP/S) - XYZテンプレートあり - 例: type=xyz&url=http://example.com/{z}/{x}/{y}.pbf

  • ローカルファイル - XYZテンプレートあり - 例: type=xyz&url=file:///path/to/tiles/{z}/{x}/{y}.pbf

  • ローカルのMBTilesデータベース - 例: type=mbtiles&url=file:///path/to/file.mbtiles

ベクタタイルデータセットをQGISにロードするには、 データソースマネージャ ダイアログの addVectorTileLayer ベクタタイル タブを使用します。詳細は ベクタタイルサービスを利用する を参照してください。

19.3. ベクタタイルデータセットのプロパティ

The vector tiles Layer Properties dialog provides the following sections:

metadata Information

system Source

symbology Symbology[1]

labelingSingle Labels[1]

rendering Rendering

editMetadata Metadata

[1] レイヤスタイルパネル からも利用可能です

19.3.1. 情報プロパティ

情報 タブは読み取り専用で、現在のレイヤの要約された情報やメタデータをさっと掴むことができる興味深い場所です。提供される情報には、以下のものがあります:

  • レイヤのプロバイダからの情報:名前、URI、ソースタイプとパス、ズームレベルの数

  • 空間参照システム(CRS):CRSの名前、単位、投影法、精度、参照(静的か動的か)

  • 入力されたメタデータ からの情報:アクセス、領域、リンク、連絡先、履歴など

19.3.2. ソースプロパティ

The system Source tab displays basic information about the selected vector tile, including:

  • レイヤパネル で表示される レイヤ名

  • the Coordinate Reference System: Displays the layer's Coordinate Reference System (CRS). You can change the layer's CRS, by selecting a recently used one in the drop-down list or clicking on the setProjection Select CRS button (see 座標参照系セレクタ). Use this process only if the layer CRS is wrong or not specified.

../../../_images/vector_tiles_source.png

図 19.2 Vector Tiles Properties - Source Dialog

19.3.3. Symbology and Labels Properties

../../../_images/vector_tiles_symbology.png

図 19.3 ベクタタイルレイヤのシンボロジ

19.3.3.1. Setting rules

As vector tiles consist of point, line and polygon geometries, the respective symbols are available. To apply a cartographic style (with symbology and/or labels), you can either:

  • Use a Style URL when creating the Vector Tiles Connection. The symbology will be shown immediately in the symbology Symbology tab after the layer is loaded in QGIS.

  • Or build your own symbology and labeling in the corresponding tabs of the layer properties. By default, QGIS assigns an identical symbol to the features based on their geometry type.

In both cases, setting a style for a vector tile relies on a set of rules applied to the features, indicating:

  • a vector symbol or label

  • a Label, a title for comprehensive identification of the rule

  • the name of a particular Layer the rule should apply to, if not applied to (all layers)

  • a Min. Zoom and a Max. Zoom, for the range of display. Symbology and labeling can be dependent on the zoom level.

  • a Filter, a QGIS expression to identify the features to apply the style to

Each rule is added pressing the symbologyAdd Add rule button and selecting the type of symbols (Marker, Line, Fill) corresponding to the features geometry type. You can as well symbologyRemove Remove selected rules or symbologyEdit Edit current rule.

At the bottom the Current Zoom is shown. Check the unchecked Visible rules only option at the top of the dialog to filter the list of rules to only those that are visible at the current zoom level. This makes it easier to work with complex vector styling and to locate troublesome rules. The search Filter rules text box also helps you easily find a rule, by searching the Label, Layer and Filter fields.

In 図 19.3 we set up style for the OpenStreetMap landuse layer. For better visibility most of the rules are deselected.

19.3.3.2. レイヤレンダリング

From the Symbology tab, you can also set some options that invariably act on all features of the layer:

  • 不透明度 :このツールを使用すると、マップキャンバスで背面にあるレイヤを見えるようにできます。スライダーを使用して、レイヤの見え方を必要に応じて変化させてください。スライダーの横にあるメニューで不透明度の割合を正確に定義することもできます。

  • Blending mode: You can achieve special rendering effects with these tools that you may previously only know from graphics programs. The pixels of your overlaying and underlaying layers are mixed through the settings described in 混合モード.

19.3.3.3. スタイル

Available at the bottom of most of the tabs, the Styles ► menu provides shortcuts to save, load, create, switch styles to apply to the vector tiles. Vector tiles can have their style saved from QGIS as QML files and they can be imported as:

More details at レイヤのプロパティの保存および共有.

19.3.4. レンダリングプロパティ

Under unchecked Scale dependent visibility, you can set the Maximum (inclusive) and Minimum (exclusive) scales, defining a range of scales in which features will be visible. Out of this range, they are hidden. The mapIdentification Set to current canvas scale button helps you use the current map canvas scale as boundary of the range visibility. See 表示縮尺セレクタ for more information.

../../../_images/vector_tiles_rendering.png

図 19.4 Vector Tiles Properties - Rendering Dialog

19.3.5. メタデータプロパティ

editMetadata メタデータ タブには、レイヤに関するメタデータレポートの作成・編集オプションがあります。詳細は メタデータ を参照してください。