「Plugins georeferencer」の版間の差分

提供: OSGeo.JP Wiki
移動: 案内検索
(ページの作成: <H2> Georeferencer Plugin </H2> <P> The Georeferencer Plugin is a tool for generating world files for rasters. It allows you to reference rasters to geographic or projected coor…)
 
("Georeference"の訳を修正)
 
(2人の利用者による、間の4版が非表示)
行1: 行1:
<H2>
+
=== Georeferencer プラグイン ===
Georeferencer Plugin
+
<span id='georeferencer'></span>
</H2>
+
  
<P>
+
Georeferencerプラグインはラスタファイルに対するワールドファイルを生成するツールです。
The Georeferencer Plugin is a tool for generating world files for rasters.
+
このツールは、ワールドファイルを作成するか、新たな座標系へ変換を行うことによって、ラスタデータに対して測地座標もしくは投影座標を与えます。
It allows you to reference rasters to geographic or projected coordinate systems by creating a
+
ラスタデータに対して地理参照を行うには、正確な座標がわかっているラスタデータ上の点を指定することが基本的な方法です。
world file, or by transforming the raster to a new coordinate system. The basic approach to georeferencing a raster is to locate points on the raster for which you can accurately determine their coordinates. The source of the coordinates can be:
+
座標値を与える情報源としては、以下のものが考えられます。
  
<P>
+
<ol>
 +
<li>
 +
ラスタデータそのもの。すなわち、ラスタデータに座標値が文字通り’記述されている’ことがあります。この場合はその値を手動で入力します。
 +
</li>
 +
<li>
 +
地理参照されているその他のデータ。すなわち、座標値を与えたいラスタデータにある目標物/地物のデータを持つラスタもしくはベクタデータです。この場合はQGISのマップキャンバスに読み込んだそれら参照データをクリックすることで座標を与えることができます。
 +
</li>
 +
</ol>
  
<OL>
+
通常、画像に対して地理参照を行うには、ラスタデータ上の複数の点を選択し、それらの座標を決定し、適切な変換方法を選択するという手順を踏みます。入力パラメータとデータに基づいて、プラグインはワールドファイルのパラメータを計算します。より多くの座標値を与えることで、より良い結果を得ることができるでしょう。
<LI>The raster itself, sometimes coordinates are literally `written' on the raster.
+
In this case you can enter the coordinates manually.
+
</LI>
+
<LI>Other georeferenced data, this can be either vector or raster data that contain the same objects/features that you have on the raster that you want to georeference. In this case you can enter the coordinates by clicking on the reference dataset loaded in QGIS map canvas.
+
</LI>
+
</OL>
+
  
<P>
+
まずはじめに、QGISを起動してGeoreferencerプラグインを読み込み(Section [[sec:load_core_plugin]]参照)、QGISツールバーメニューに表示される{{Template:ToolBtnTwo|georeferencer|Georeferencer}}アイコンをクリックします。
The usual procedure for georeferencing an image involves selecting multiple points on the raster,
+
すると図[[#fig:georefplugin|48]]のようにGeoreferencerプラグインのダイアログが表示されます。
specifying their coordinates, and choosing a relevant transformation type. Based on the input parameters and data, the plugin will compute the world file parameters. The more coordinates you provide, the better the result will be.
+
  
<P>
+
ここでは例として、SDGS(訳注:South Dakota Geological Survey)のSouth Dakota州地形図を使用します。
The first step is to start QGIS and load the Georeferencer Plugin (see Section [[#sec:load_core_plugin]]) and click on the georeferencerGeoreferencer
+
この図は、この後でGRASS spearfish60 locationデータとともに表示することができるようになります。
icon which appears in the QGIS toolbar menu. The Georeferencer Plugin dialog appears as
+
地形図はこちらからダウンロードすることができます:{{Template:URL|http://grass.osgeo.org/sampledata/spearfish_toposheet.tar.gz}}
shown in Figure [[#fig:georefplugin|50]].
+
  
<P>
+
<table align='center'>
For this example, we are using a topo sheet of South Dakota from SDGS. It can later be visualized
+
<caption>'''図 48:''' Georeferencer Plugin Dialog {{Template:Nix}}</caption>
together with the data from the GRASS spearfish60 location. You can download the topo sheet here:  
+
<tr><td><span id='fig:georefplugin'></span>
http://grass.osgeo.org/sampledata/spearfish_toposheet.tar.gz
+
  [[File:georefplugin.png|454px]]</td></tr></table>
<P>
+
  
<DIV ALIGN="CENTER"><A NAME="fig:georefplugin"></A><A NAME="11"></A>
+
===== 地上基準点(GCP)の入力 =====
<TABLE>
+
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
Georeferencer Plugin Dialog </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
</DIV>
+
<P></P>
+
<DIV ALIGN="CENTER">  [clip=true, width=12cm]georefplugin
+
  
</DIV></TD></TR>
+
<span id='georeferencer_entering'></span>
</TABLE>
+
</DIV>
+
  
<P>
+
<ol>
Entering ground control points (GCPs)<A NAME="georeferencer_entering"></A>
+
<li>地理参照されていないラスタデータに対して地理参照を行うには、まず{{Template:BrowseButton}}参照ボタンを押してラスタデータを読み込みます。すると、ラスタデータがメインの作業領域に表示されます。ラスタデータが読み込まれたら、参照点の入力を開始することができます。</li>
<P>
+
<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>
 +
<li>参照点の入力を繰り返します。最低4点必要ですが、より多くの座標を与えるとよりよい結果が得られます。プラグインダイアログにはそのほかにも作業領域をズーム、移動するツールボタンがあり、適切なGCPを取得するために用いることができます。
 +
</li>
 +
</ol>
  
<OL>
+
<table align='center'>
<LI>To start georeferencing an unreferenced raster, we must load it using the 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.
+
<caption>'''図 49:''' ラスタイメージに参照点を追加 {{Template:Nix}}</caption>
 +
<tr><td><span id='fig:choose_points'></span>
 +
  [[File:choose_points.png|340px]]</td></tr></table>
  
<P>
+
マップに追加された点の情報はラスタ画像ファイルと共に([filename].points)という名前で別ファイルに保存されます。そのため、後でGeoreferencerプラグインを再度開き、新しい点を追加したり既存の点を削除したりして結果を最適化することが可能になります。参照点ファイルは以下の形式で保存されています:mapX, mapY, pixelX, pixelY。他のディレクトリに保存したい場合は{{Template:Button|Load GCPs}}ボタンと{{Template:Button|Save GCPs}}を使います。
</LI>
+
<LI>Using the mActionCapturePointAdd Point button, add points to the main working area and enter their coordinates (See Figure <A HREF="#fig:choose_points">51</A>). For this procedure you have two options:
+
  
<P>
+
===== 変換方法の選択 =====
 +
<span id='georeferencer_transformation'></span>
 +
ラスタ画像にGCPを追加したら、地理参照プロセスで使用する変換種別を選択します。取得した基準点数に応じて、使用する変換アルゴリズムは異なるでしょう。変換アルゴリズムの選択はまた、入力データの種類や品質や、最終結果に求められる幾何学的ゆがみの総量にかかわってきます。
  
<OL>
+
現在、いくつかのアルゴリズムが利用可能です:
<LI>Click on a point in the raster map and enter the X and Y coordinates manually
+
</LI>
+
<LI>Click on a point in the raster map and choose the button pencilfrom map canvas to add the X and Y coordinates with the help of a georeferenced map already loaded in QGIS.
+
</LI>
+
</OL>
+
</LI>
+
<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>
+
</OL>
+
  
<P>
+
<ol>
 +
<li>線形</li>
 +
<li>ヘルマート</li>
 +
<li>多項式 1</li>
 +
<li>多項式 2</li>
 +
<li>多項式 3</li>
 +
<li>薄板的スプライン(TPS)</li>
 +
</ol>
  
<DIV ALIGN="CENTER"><A NAME="fig:choose_points"></A><A NAME="29"></A>
+
<ul>
<TABLE>
+
<li>線形アルゴリズムはワールドファイルを作成するのに用いられ、実際にはラスタデータを変換していないという点において他のアルゴリズムとは異なります。このアルゴリズムはスキャンされたデータを処理する場合はおそらく不十分です。</li>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
<li>ヘルマート変換は単純な拡大・縮小及び回転変換を行います</li>
Add points to the raster image </CAPTION>
+
<li>多項式アルゴリズムは地理参照において最もよく利用されるアルゴリズムで、変換元と変換先の地上基準点を合わせる時に用いられる変形の程度がそれぞれ異なります。最も多く用いられる多項式アルゴリズムは2次多項式変換で、若干の曲面を補正します。1次多項式変換(アフィン変換)は線形性を保持し、拡大縮小、平行移動、回転のみを補正します。</li>
<TR><TD>
+
<li>薄板的スプライン(TPS)アルゴリズムはより最近用いられるようになった地理参照方法で、データの局所的変形を行うことができます。このアルゴリズムは非常に品質の低い元データに対して地理参照を行う際に大変有効です。</li>
<DIV ALIGN="CENTER">
+
</ul>
</DIV>
+
<P></P>
+
<DIV ALIGN="CENTER"> [clip=true,width=9cm]choose_points
+
  
</DIV></TD></TR>
+
===== 変換の実行 =====
</TABLE>
+
</DIV>
+
  
<P>
+
<ol>
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 Load GCPs and Save GCPs to different directories if you like.
+
<li>基準点を取得し、変換種別を選択したら、{{Template:Button|Create}}ボタンを押してラスタデータを新規作成するか、{{Template:Button|Create and load layer}}ボタンを押して新規作成されたラスタデータを自動的にレイヤリストに追加します。</li>
 +
<li>ラスタデータ(GeoTIFFフォーマット)の作成が終了したら、それを知らせる警告メッセージが表示されます。</li>
 +
<li>OKボタンを押すと、内挿法をどれにするかを訊かれます。3つの方法が利用可能です:
 +
<ol>
 +
<li>最近隣法</li>
 +
<li>共一次内挿法</li>
 +
<li>Cubic(訳注:Cubicだけだと共三次内挿法もしくは3次畳み込み内挿法の両方がありえます。)</li>
 +
</ol>
 +
</ol>
  
<P>
+
{{Template:Tip
Choosing the transformation<A NAME="georeferencer_transformation"></A>
+
|num=44
<P>
+
|caption=内挿法の選択
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.
+
|qgistip=内挿法をどれにするかは入力データと、作業の最終的な目的によるでしょう。画像の統計的な値が変化することを望まない場合は最近隣法を選択するべきですが、Cubic内挿法はより滑らかな変換結果を出力します。
 
+
}}
<P>
+
Currently, several algorithms are available:
+
 
+
<P>
+
 
+
<OL>
+
<LI>Linear
+
</LI>
+
<LI>Helmert
+
</LI>
+
<LI>Polynomial 1
+
</LI>
+
<LI>Polynomial 2
+
</LI>
+
<LI>Polynomial 3
+
</LI>
+
<LI>Thin plate spline (TPS)
+
</LI>
+
</OL>
+
 
+
<P>
+
 
+
<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>The Helmert transformation performs simple scaling and rotation transformations.
+
</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>
+
<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>
+
</UL>
+
 
+
<P>
+
Running the transformation<A NAME="georeferencer_running"></A>
+
<P>
+
 
+
<OL>
+
<LI>When the GCPs have been collected, and the transformation has been chosen, press either Create to create a new raster or Create and load layer to automatically add the new raster to the layer list.
+
</LI>
+
<LI>A warning message will appear that will inform you that a new raster (in GeoTIFF format) will be created.
+
</LI>
+
<LI>After hitting OK, you will also be asked to choose a resampling method. There are three methods available:
+
 
+
<P>
+
 
+
<OL>
+
<LI>Nearest neighbour
+
</LI>
+
<LI>Linear
+
</LI>
+
<LI>Cubic
+
</LI>
+
</OL>
+
</LI>
+
</OL>
+
 
+
<P>
+
<BR>
+
 
+
<BR>
+
 
+
<P>
+

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

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内挿法はより滑らかな変換結果を出力します。