「ESRI シェープファイル」の版間の差分

提供: OSGeo.JP Wiki
移動: 案内検索
(Improving Performance)
(タグ・画像の調整)
 
(2人の利用者による、間の15版が非表示)
行1: 行1:
==ESRI シェープファイル==
+
=== ESRI シェープファイル ===
  
The standard vector file format used in QGIS is the ESRI Shapefile. Support
+
QGISで使う標準的なベクトルファイル形式はESRI Shapefileです。ShapefileはOGRの Simple Feature Library({{Template:URL|http://www.gdal.org/ogr/}})
is provided by the OGR Simple Feature Library( http://www.gdal.org/ogr/ ). A shapefile actually consists of several files. The following three are required:
+
の機能を利用してサポートされてます。実際にはshapefileはいくつかのファイルで構成されています。以下の3種類のファイルは必須で必要です:
  
*.shp file containing the feature geometries.
+
<ul>
*.dbf file containing the attributes in dBase format.
+
<li>{{Template:FileName|.shp}} ファイルには知物の幾何情報が格納されています。
*.shx index file.
+
<li>{{Template:FileName|.dbf}} ファイルには属性情報がdBase形式で格納されています。
 +
<li>{{Template:FileName|.shx}} インデックスファイルです。
 +
</ul>
  
Shapefiles also can include a file with a .prj suffix, which contains
+
Shapefiles には{{Template:FileName|.prj}} という拡張子のファイルもあります。このファイルには投影情報が格納されます。
the projection information. While it is very useful to have a projection file, it is not mandatory. A shapefile dataset can contain additional files. For further details see the ESRI technical specification at http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf .
+
投影情報ファイルはとても便利ですが、このファイルの利用は必須ではありません。
.
+
shapefileのデータセットは様々な追加ファイルを持てます。詳細についてはESRIテクニカルスペシフィケーション {{Template:URL|http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf}} を参照してください。
  
===Loading a Shapefile===
 
  
[[ファイル:MActionAddNonDbLayer.png]] To load a shapefile, start
+
==== Shapefileのロード ====
QGIS and click on the {{Template:ToolBtnTwo|MActionAddNonDbLayer|Add a vector layer}}
+
<span id='sec:load_shapefile'></span>
toolbar button or simply type {{Template:KeyStroke|V}}.
+
This will bring up a new window (see Figure[[#Figure 5|5]]).
+
  
From the available options check File. Click on Browse.
+
<table align='center'>
That will bring up a standard open file dialog (see Figure
+
<caption>'''図 5:''' Add Vector Layer Dialog {{Template:Nix}}</caption>
[[#Figure 6|6]]) which allows you to navigate the file system and load
+
<tr><td><span id='fig:addvectorlayer'></span>
a shapefile or other supported data source.
+
  [[File:addvectorlayerdialog.png|454px]]</td></tr></table>
The selection box Files of type... allows you to preselect some OGR supported file formats.
+
  
{{Template:Figure|num=5|caption=Add Vector Layer Dialog|fname=Addvectorlayerdialog}}
+
<table align='center'>
 +
<caption>'''図 6:''' Open an OGR Supported Vector Layer Dialog {{Template:Nix}}</caption>
 +
<tr><td><span id='fig:openshapefile'></span>
 +
  [[File:shapefileopendialog.png|529px]]</td></tr></table>
  
You can also select the Encoding type for the shapefile if desired.
+
<table align='center'>
 +
<caption>'''図 7:''' QGIS with Shapefile of Alaska loaded {{Template:Nix}}</caption>
 +
<tr><td><span id='fig:loadedshapefile'></span>
 +
  [[File:shapefileloaded.png|605px]]</td></tr></table>
  
Selecting a shapefile from the list and clicking {{Template:Button|Open}} loads it into QGIS. Figure  
+
[[File:mActionAddNonDbLayer.png|26px]] shapefileをロードするためにはQGISを開始した後にツールば
[[#Figure 7|7]] shows QGIS after loading the alaska.shp file.
+
ボタン{{Template:ToolBtnTwo|MActionAddNonDbLayer|Add a vector layer}}をクリックするか{{Template:KeyStroke|V}}をキーボード入力してください。そうすると(see Figure[[#fig:addvectorlayer|5]])の新規ウィンドウが表示されます。
  
----
+
指定可能なオプション{{Template:RadioButtonOn|ファイル}}をチェックします。{{Template:Button|ブラウズ}}をクリックします。
'''Tip 8'''
+
そうすると標準的なファイルダイアログが表示されます([[#fig:openshapefile|6]]参照)
----
+
そこではファイルシステムの中を探してshapefileかサポートされているデータソースをロードできます。
When you add a layer to the map, it is assigned a random color. When adding more than one layer at a time,
+
選択ボックスの{{Template:SelectString|ファイルのtype|...}}でいくつかのOGRで利用できるファイル形式をあらかじめ選択できます。
different colors are assigned to each layer.
+
----
+
  
Once loaded, you can zoom around the shapefile using the map navigation tools.
+
必要があればshapefileのエンコーディングタイプ(文字コード)を指定できます。
To change the symbology of a layer, open the {{Template:Dialog|Layer Properties}} dialog by double
+
clicking on the layer name or by right-clicking on the name in the legend and
+
choosing {{Template:DropMenuOpt|Properties}} from the popup menu. See
+
Section [[The_Vector_Properties_Dialog:Symbology_Tab|5.4.2]] for more information on setting symbology of
+
vector layers.
+
  
===Improving Performance===
+
shapefileをリストから選択して{{Template:Button|Open}}をクリックするとQGISにロードできます。
 +
Figure [[#fig:loadedshapefile|7]]は{{Template:FileName|alaska.shp}}をQGISにロードした後の図です。
  
To improve the performance of drawing a shapefile, you can create a spatial
+
{{Template:Tip
index. A spatial index will improve the
+
|num=8
speed of both zooming and panning. Spatial indexes used by QGIS have a
+
|caption=Layer Colors
.qix extension.
+
|qgistip=地図にレイヤを追加した時にはランダムな色で描画されます。複数のレイヤを一度に追加した場合はそれぞれのレイヤ
 +
は異なる色で描画されます。
 +
}}
  
Use these steps to create the index:
+
一度ロードされるとshapefileのズームはナビゲーションツールで実行できます。
 +
レイヤの描画方法を変更する場合は{{Template:Dialog|Layer Properties}}ダイアログをレイヤ名ダブルクリックか凡例
 +
右ボタンポップアップメニューで{{Template:DropMenuOpt|Properties}}を選択してください。セクション[[The_Vector_Properties_Dialog:Symbology_Tab#sec:symbology|5.4.2]] を参照するとベクタレイヤのシンボロジ設定についてさらなる情報があります。
  
*Load a shapefile.
+
==== パフォーマンスの改善 ====
*Open the {{Template:Dialog|Layer Properties}} dialog by double-clicking on the
+
shapefile name in the legend or by right-clicking and choosing
+
{{Template:DropMenuOpt|Properties}} from the popup menu.
+
{{Template:Figure|num=6|caption=Open an OGR Supported Vector Layer Dialog|fname=Shapefileopendialog}}
+
*In the tab {{Template:Tab|General}} click the {{Template:Button|Create Spatial Index}} button.
+
  
===Loading a MapInfo Layer===
+
shapefileの描画パフォーマンスを改善するために空間インデックスをつくることができます。
 +
空間インデックスはズームとパンの性能を改善します。QGISにおける空間インデックスは
 +
{{Template:FileName|.qix}}というエクステンションを利用します。
  
To load a MapInfo layer, click on the
+
次のステップでインデックスを作成できます。
mActionAddNonDbLayerAdd a vector layer
+
toolbar bar button or type V, change the file type filter to
+
Files of Type[OGR] MapInfo (*.mif *.tab *.MIF *.TAB) and select the layer you want to load.
+
  
===Loading an ArcInfo Binary Coverage===
+
<ul>
 +
<li>shapefileをロードします
 +
<li>凡例のshapefile名をダブルクリックするかマウス右ボタンクリックで表示されるポップアップメニューで{{Template:DropMenuOpt|Properties}}を選択して{{Template:Dialog|Layer Properties}} ダイアログを開きます。
 +
<li>{{Template:Tab|General}}タブで click the {{Template:Button|Create Spatial Index}} ボタンをクリックします。
 +
</ul>
  
To load an ArcInfo binary coverage click on the
+
==== MapInfo Layerのロード ====
mActionAddNonDbLayerAdd a vector layer
+
toolbar button or type V to open the
+
Add Vector Layer dialog.  Select Directory. Change to TypeArc/Ingo Binary Coverage.
+
Navigate to the directory that contains the coverage files and select it.
+
  
{{Template:Figure|num=7|caption=QGIS with Shapefile of Alaska loaded|fname=Shapefileloaded|width=700px}}
+
MapInfo Layerをロードするためにはツールバーの{{Template:ToolBtnTwo|mActionAddNonDbLayer|Add a vector layer}}ボタンを
 +
クリックするか{{Template:KeyStroke|V}}キーをタイプしてください。ファイルダイアログでファイルタイプフィルターを次のように変更してください{{Template:SelectString|Files of Type|[OGR] MapInfo (*.mif *.tab *.MIF *.TAB)}}。その後ロードしたいレイヤを選択してください。
  
Similarly, you can load directory based  vector files in the UK National Transfer Format as well as the
+
==== ArcInfo Binary Coverageのロード ====
raw TIGER Format of the US Census Bureau.
+
 
 +
ArcInfo binary coverageをロードするためにはツールバーの
 +
{{Template:ToolBtnTwo|mActionAddNonDbLayer|Add a vector layer}}ボタンをクリックするか
 +
{{Template:KeyStroke|V}} キーをタイプして{{Template:Dialog|Add Vector Layer}} を開いて
 +
ください。{{Template:RadioButtonOn|Directory}}を選択してください。
 +
{{Template:SelectString|Type|Arc/Ingo Binary Coverage}}に変更してください・
 +
読み込みたいcoverageファイルがあるディレクトリに移動してファイルを選択してください。
 +
 
 +
同じようにUK National Transfer 形式のベクタファイルやUS Census BureauのTIGER形式のファイルもロードできます。

2009年10月4日 (日) 16:17時点における最新版

ESRI シェープファイル

QGISで使う標準的なベクトルファイル形式はESRI Shapefileです。ShapefileはOGRの Simple Feature Library(http://www.gdal.org/ogr/ ) の機能を利用してサポートされてます。実際にはshapefileはいくつかのファイルで構成されています。以下の3種類のファイルは必須で必要です:

  • .shp ファイルには知物の幾何情報が格納されています。
  • .dbf ファイルには属性情報がdBase形式で格納されています。
  • .shx インデックスファイルです。

Shapefiles には.prj という拡張子のファイルもあります。このファイルには投影情報が格納されます。 投影情報ファイルはとても便利ですが、このファイルの利用は必須ではありません。 shapefileのデータセットは様々な追加ファイルを持てます。詳細についてはESRIテクニカルスペシフィケーション http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf を参照してください。


Shapefileのロード

図 5: Add Vector Layer Dialog Nix.png
Addvectorlayerdialog.png
図 6: Open an OGR Supported Vector Layer Dialog Nix.png
Shapefileopendialog.png
図 7: QGIS with Shapefile of Alaska loaded Nix.png
Shapefileloaded.png

MActionAddNonDbLayer.png shapefileをロードするためにはQGISを開始した後にツールば ボタンMActionAddNonDbLayer.png Add a vector layerをクリックするかVをキーボード入力してください。そうすると(see Figure5)の新規ウィンドウが表示されます。

指定可能なオプションRadioButtonOn.png ファイルをチェックします。ブラウズをクリックします。 そうすると標準的なファイルダイアログが表示されます(6参照) そこではファイルシステムの中を探してshapefileかサポートされているデータソースをロードできます。 選択ボックスのファイルのtype ... SelectString.pngでいくつかのOGRで利用できるファイル形式をあらかじめ選択できます。

必要があればshapefileのエンコーディングタイプ(文字コード)を指定できます。

shapefileをリストから選択してOpenをクリックするとQGISにロードできます。 Figure 7alaska.shpをQGISにロードした後の図です。


Tip 8 Layer Colors


地図にレイヤを追加した時にはランダムな色で描画されます。複数のレイヤを一度に追加した場合はそれぞれのレイヤ は異なる色で描画されます。



一度ロードされるとshapefileのズームはナビゲーションツールで実行できます。 レイヤの描画方法を変更する場合はLayer Propertiesダイアログをレイヤ名ダブルクリックか凡例 右ボタンポップアップメニューでPropertiesを選択してください。セクション5.4.2 を参照するとベクタレイヤのシンボロジ設定についてさらなる情報があります。

パフォーマンスの改善

shapefileの描画パフォーマンスを改善するために空間インデックスをつくることができます。 空間インデックスはズームとパンの性能を改善します。QGISにおける空間インデックスは .qixというエクステンションを利用します。

次のステップでインデックスを作成できます。

  • shapefileをロードします
  • 凡例のshapefile名をダブルクリックするかマウス右ボタンクリックで表示されるポップアップメニューでPropertiesを選択してLayer Properties ダイアログを開きます。
  • Generalタブで click the Create Spatial Index ボタンをクリックします。

MapInfo Layerのロード

MapInfo LayerをロードするためにはツールバーのMActionAddNonDbLayer.png Add a vector layerボタンを クリックするかVキーをタイプしてください。ファイルダイアログでファイルタイプフィルターを次のように変更してくださいFiles of Type [OGR] MapInfo (*.mif *.tab *.MIF *.TAB) SelectString.png。その後ロードしたいレイヤを選択してください。

ArcInfo Binary Coverageのロード

ArcInfo binary coverageをロードするためにはツールバーの MActionAddNonDbLayer.png Add a vector layerボタンをクリックするか V キーをタイプしてAdd Vector Layer を開いて ください。RadioButtonOn.png Directoryを選択してください。 Type Arc/Ingo Binary Coverage SelectString.pngに変更してください・ 読み込みたいcoverageファイルがあるディレクトリに移動してファイルを選択してください。

同じようにUK National Transfer 形式のベクタファイルやUS Census BureauのTIGER形式のファイルもロードできます。