「Plugins georeferencer」の版間の差分

提供: OSGeo.JP Wiki
移動: 案内検索
行30: 行30:
 
   [[File:georefplugin.png|454px]]</td></tr></table>
 
   [[File:georefplugin.png|454px]]</td></tr></table>
  
===== Entering ground control points (GCPs) =====
+
===== 地上基準点(GCP)の入力 =====
 +
 
 
<span id='georeferencer_entering'></span>
 
<span id='georeferencer_entering'></span>
<ol>
 
<li>To start georeferencing an unreferenced raster, we must load it using the {{Template:BrowseButton}} browse button. The raster will show up in the main working area of the dialog. Once the raster is loaded, we can start to enter reference points.
 
 
<li>Using the {{Template:ToolBtnTwo|mActionCapturePoint|Add Point}} button, add points to the main working area and enter their coordinates (See Figure [[#fig:choose_points|49]]). For this procedure you have two options:
 
  
 
<ol>
 
<ol>
<li>Click on a point in the raster map and enter the X and Y coordinates manually
+
<li>地理参照されていないラスタデータに対して地理参照を行うには、まず{{Template:BrowseButton}}参照ボタンを押してラスタデータを読み込みます。すると、ラスタデータがメインの作業領域に表示されます。ラスタデータが読み込まれたら、参照点の入力を開始することができます。</li>
<li>Click on a point in the raster map and choose the button {{Template:ToolBtnTwo|pencil|from map canvas}} to add the X and Y coordinates with the help of a georeferenced map already loaded in QGIS.
+
<li>{{Template:ToolBtnTwo|mActionCapturePoint|Add Point}}ボタンを用いて、作業領域から点を追加し、その点に対する座標値を入力します([[#fig:choose_points|49]]参照)。この段階で2つの方法を選択できます。
 +
<ol>
 +
<li>ラスタデータ上の点をクリックし、X、Y座標を手作業で入力する</li>
 +
<li>ラスタデータ上の点をクリックし、{{Template:ToolBtnTwo|pencil|from map canvas}}を用いて、既にQGISに読み込まれている、座標値を持っているデータからX、Y座標を入力する</li>
 
</ol>
 
</ol>
<li>Continue entering points. You should have at least 4 points, and the more coordinates you can provide, the better the result will be. There are additional tools on the plugin dialog to zoom and pan the working area in order to locate a relevant set of GCP points.
+
<li>参照点の入力を繰り返します。最低4点必要ですが、より多くの座標を与えるとよりよい結果が得られます。プラグインダイアログにはそのほかにも作業領域をズーム、移動するツールボタンがあり、適切なGCPを取得するために用いることができます。
 +
</li>
 
</ol>
 
</ol>
  
 
<table align='center'>
 
<table align='center'>
<caption>'''図 49:''' Add points to the raster image {{Template:Nix}}</caption>
+
<caption>'''図 49:''' ラスタイメージに参照点を追加 {{Template:Nix}}</caption>
 
<tr><td><span id='fig:choose_points'></span>
 
<tr><td><span id='fig:choose_points'></span>
 
   [[File:choose_points.png|340px]]</td></tr></table>
 
   [[File:choose_points.png|340px]]</td></tr></table>
  
The points that are added to the map will be stored in a separate text file ([filename].points) which is stored together with the raster image. This allows us to reopen the Georeferencer plugin at a later date and add new points or delete existing ones to optimize the result. The points file contains values of the form: mapX, mapY, pixelX, pixelY. You can also {{Template:Button|Load GCPs}} and {{Template:Button|Save GCPs}} to different directories if you like.
+
マップに追加された点の情報はラスタ画像ファイルと共に([filename].points)という名前で別ファイルに保存されます。そのため、後でGeoreferencerプラグインを再度開き、新しい点を追加したり既存の点を削除したりして結果を最適化することが可能になります。参照点ファイルは以下の形式で保存されています:mapX, mapY, pixelX, pixelY。他のディレクトリに保存したい場合は{{Template:Button|Load GCPs}}ボタンと{{Template:Button|Save GCPs}}を使います。
  
===== Choosing the transformation =====
+
===== 変換方法の選択 =====
 
<span id='georeferencer_transformation'></span>
 
<span id='georeferencer_transformation'></span>
After you have added your GCPs to the raster image, you need to select the transformation type for the georeferencing process. Depending on how many ground control point you have captured, you may want to use different transformation algorithms. Choice of transformation algorithm is also dependent on the type and quality of input data and the amount of geometric distortion that you are willing to introduce to final result.
+
ラスタ画像にGCPを追加したら、地理参照プロセスで使用する変換種別を選択します。取得した基準点数に応じて、使用する変換アルゴリズムは異なるでしょう。変換アルゴリズムの選択はまた、入力データの種類や品質や、最終結果に求められる幾何学的ゆがみの総量にかかわってきます。
  
Currently, several algorithms are available:
+
現在、いくつかのアルゴリズムが利用可能です:
  
 
<ol>
 
<ol>
<li>Linear
+
<li>線形</li>
<li>Helmert
+
<li>ヘルマート</li>
<li>Polynomial 1
+
<li>多項式 1</li>
<li>Polynomial 2
+
<li>多項式 2</li>
<li>Polynomial 3
+
<li>多項式 3</li>
<li>Thin plate spline (TPS)
+
<li>薄板的スプライン(TPS)</li>
 
</ol>
 
</ol>
  
 
<ul>
 
<ul>
<li>The Linear algorithm is used to create a world-file, and is different from the other algorithms, as it does not actually transform the raster. This algorithm likely won't be sufficient if you are dealing with scanned material.
+
<li>線形アルゴリズムはワールドファイルを作成するのに用いられ、実際にはラスタデータを変換していないという点において他のアルゴリズムとは異なります。このアルゴリズムはスキャンされたデータを処理する場合はおそらく不十分です。</li>
<li>The Helmert transformation performs simple scaling and rotation transformations.
+
<li>ヘルマート変換は単純な拡大・縮小及び回転変換を行います</li>
<li>The Polynomial algorithms are among the most widely used algorithms for georeferencing, and each one differs by the degree of distortion introduced to match source and destination ground control points. The most widely used polynomial algorithm is the second order polynomial transformation, which allows some curvature. First order polynomial transformation (affine) preserves colliniarity and allows scaling, translation and rotation only.
+
<li>多項式アルゴリズムは地理参照において最もよく利用されるアルゴリズムで、変換元と変換先の地上基準点を合わせる時に用いられる変形の程度がそれぞれ異なります。最も多く用いられる多項式アルゴリズムは2次多項式変換で、若干の曲面を補正します。1次多項式変換(アフィン変換)は線形性を保持し、拡大縮小、平行移動、回転のみを補正します。</li>
<li>The Thin plate spline (TPS) algorithm is a more modern georeferencing method, which is able to introduce local deformations in the data. This algorithm is useful when very low quality originals are being georeferenced.
+
<li>薄板的スプライン(TPS)アルゴリズムはより最近用いられるようになった地理参照方法で、データの局所的変形を行うことができます。このアルゴリズムは非常に品質の低い元データに対して地理参照を行う際に大変有効です。</li>
 
</ul>
 
</ul>
  
===== Running the transformation =====
+
===== 変換の実行 =====
<span id='georeferencer_running'></span>
+
<ol>
+
<li>When the GCPs have been collected, and the transformation has been chosen, press either {{Template:Button|Create}} to create a new raster or {{Template:Button|Create and load layer}} to automatically add the new raster to the layer list.
+
<li>A warning message will appear that will inform you that a new raster (in GeoTIFF format) will be created.
+
<li>After hitting OK, you will also be asked to choose a resampling method. There are three methods available:
+
  
 
<ol>
 
<ol>
<li>Nearest neighbour
+
<li>基準点を取得し、変換種別を選択したら、{{Template:Button|Create}}ボタンを押してラスタデータを新規作成するか、{{Template:Button|Create and load layer}}ボタンを押して新規作成されたラスタデータを自動的にレイヤリストに追加します。</li>
<li>Linear
+
<li>ラスタデータ(GeoTIFFフォーマット)の作成が終了したら、それを知らせる警告メッセージが表示されます。</li>
<li>Cubic
+
<li>OKボタンを押すと、内挿法をどれにするかを訊かれます。3つの方法が利用可能です:
 +
<ol>
 +
<li>最近隣法</li>
 +
<li>共一次内挿法</li>
 +
<li>Cubic(訳注:Cubicだけだと共三次内挿法もしくは3次畳み込み内挿法の両方がありえます。)</li>
 
</ol>
 
</ol>
 
</ol>
 
</ol>
行89: 行89:
 
{{Template:Tip
 
{{Template:Tip
 
|num=44
 
|num=44
|caption=Choosing the resampling method
+
|caption=内挿法の選択
|qgistip=The type of resampling you choose will likely depending on your input data and the ultimate objective of the exercise. If you don't want to change statistics of the image, you might want to choose Nearest neighbour, whereas a Cubic resampling will likely provide a more smoothed result.
+
|qgistip=内挿法をどれにするかは入力データと、作業の最終的な目的によるでしょう。画像の統計的な値が変化することを望まない場合は最近隣法を選択するべきですが、Cubic内挿法はより滑らかな変換結果を出力します。
 
}}
 
}}

2009年10月9日 (金) 23:22時点における版

Georeferencer プラグイン

Georeferencerプラグインはラスタファイルに対するワールドファイルを生成するツールです。 このツールは、ワールドファイルを作成するか、新たな座標系へ変換を行うことによって、ラスタデータに対して測地座標もしくは投影座標を与えます。 ラスタデータに座標を与えるには、正確な座標がわかっているラスタデータ上の点を指定することが基本的な方法です。 座標値を与える情報源としては、以下のものが考えられます。

  1. ラスタデータそのもの。すなわち、ラスタデータに座標値が文字通り’記述されている’ことがあります。この場合はその値を手動で入力します。
  2. 座標値を持っているその他のデータ。すなわち、座標値を与えたいラスタデータにある目標物/地物のデータを持つラスタもしくはベクタデータです。この場合はQGISのマップキャンバスに読み込んだそれら参照データをクリックすることで座標を与えることができます。

通常、画像に座標を与えるには、ラスタデータ上の複数の点を選択し、それらの座標を決定し、適切な変換方法を選択するという手順を踏みます。入力パラメータとデータに基づいて、プラグインはワールドファイルのパラメータを計算します。より多くの座標値を与えることで、より良い結果を得ることができるでしょう。

まずはじめに、QGISを起動してGeoreferencerプラグインを読み込み(Section sec:load_core_plugin参照)、QGISツールバーメニューに表示されるGeoreferencer.png Georeferencerアイコンをクリックします。 すると図48のようにGeoreferencerプラグインのダイアログが表示されます。

ここでは例として、SDGS(訳注:South Dakota Geological Survey)のSouth Dakota州地形図を使用します。 この図は、この後でGRASS spearfish60 locationデータとともに表示することができるようになります。 地形図はこちらからダウンロードすることができます:http://grass.osgeo.org/sampledata/spearfish_toposheet.tar.gz

図 48: Georeferencer Plugin Dialog Nix.png
Georefplugin.png
地上基準点(GCP)の入力

  1. 地理参照されていないラスタデータに対して地理参照を行うには、まず...参照ボタンを押してラスタデータを読み込みます。すると、ラスタデータがメインの作業領域に表示されます。ラスタデータが読み込まれたら、参照点の入力を開始することができます。
  2. MActionCapturePoint.png Add Pointボタンを用いて、作業領域から点を追加し、その点に対する座標値を入力します(49参照)。この段階で2つの方法を選択できます。
    1. ラスタデータ上の点をクリックし、X、Y座標を手作業で入力する
    2. ラスタデータ上の点をクリックし、Pencil.png from map canvasを用いて、既にQGISに読み込まれている、座標値を持っているデータからX、Y座標を入力する
  3. 参照点の入力を繰り返します。最低4点必要ですが、より多くの座標を与えるとよりよい結果が得られます。プラグインダイアログにはそのほかにも作業領域をズーム、移動するツールボタンがあり、適切なGCPを取得するために用いることができます。
図 49: ラスタイメージに参照点を追加 Nix.png
Choose points.png

マップに追加された点の情報はラスタ画像ファイルと共に([filename].points)という名前で別ファイルに保存されます。そのため、後でGeoreferencerプラグインを再度開き、新しい点を追加したり既存の点を削除したりして結果を最適化することが可能になります。参照点ファイルは以下の形式で保存されています:mapX, mapY, pixelX, pixelY。他のディレクトリに保存したい場合はLoad GCPsボタンとSave GCPsを使います。

変換方法の選択

ラスタ画像にGCPを追加したら、地理参照プロセスで使用する変換種別を選択します。取得した基準点数に応じて、使用する変換アルゴリズムは異なるでしょう。変換アルゴリズムの選択はまた、入力データの種類や品質や、最終結果に求められる幾何学的ゆがみの総量にかかわってきます。

現在、いくつかのアルゴリズムが利用可能です:

  1. 線形
  2. ヘルマート
  3. 多項式 1
  4. 多項式 2
  5. 多項式 3
  6. 薄板的スプライン(TPS)
  • 線形アルゴリズムはワールドファイルを作成するのに用いられ、実際にはラスタデータを変換していないという点において他のアルゴリズムとは異なります。このアルゴリズムはスキャンされたデータを処理する場合はおそらく不十分です。
  • ヘルマート変換は単純な拡大・縮小及び回転変換を行います
  • 多項式アルゴリズムは地理参照において最もよく利用されるアルゴリズムで、変換元と変換先の地上基準点を合わせる時に用いられる変形の程度がそれぞれ異なります。最も多く用いられる多項式アルゴリズムは2次多項式変換で、若干の曲面を補正します。1次多項式変換(アフィン変換)は線形性を保持し、拡大縮小、平行移動、回転のみを補正します。
  • 薄板的スプライン(TPS)アルゴリズムはより最近用いられるようになった地理参照方法で、データの局所的変形を行うことができます。このアルゴリズムは非常に品質の低い元データに対して地理参照を行う際に大変有効です。
変換の実行
  1. 基準点を取得し、変換種別を選択したら、Createボタンを押してラスタデータを新規作成するか、Create and load layerボタンを押して新規作成されたラスタデータを自動的にレイヤリストに追加します。
  2. ラスタデータ(GeoTIFFフォーマット)の作成が終了したら、それを知らせる警告メッセージが表示されます。
  3. OKボタンを押すと、内挿法をどれにするかを訊かれます。3つの方法が利用可能です:
    1. 最近隣法
    2. 共一次内挿法
    3. Cubic(訳注:Cubicだけだと共三次内挿法もしくは3次畳み込み内挿法の両方がありえます。)

Tip 44 内挿法の選択


内挿法をどれにするかは入力データと、作業の最終的な目的によるでしょう。画像の統計的な値が変化することを望まない場合は最近隣法を選択するべきですが、Cubic内挿法はより滑らかな変換結果を出力します。