G.S.I. and Fundamental GeoPackage Builder
Grid Sheet Importer and Fundamental GeoPackage Builder は国土地理院の基盤地図情報と最適化ベクトルタイルを、見ている地図の範囲だけ取得し、1つの GeoPackage にまとめる QGIS プラグインです。
Grid Sheet Importer and Fundamental GeoPackage Builder is a QGIS plugin that fetches the Fundamental Geospatial Data and the optimized vector tiles of the Geospatial Information Authority of Japan for the area you are looking at, and keeps them in one GeoPackage.
1. 考え方
可視範囲のメッシュだけ(初期)
橙の枠=今見ている範囲。取得・レイヤーへの配置は、この枠の分だけです。
取得済みの範囲すべて
保存先にある範囲を、すべてレイヤーで表示します(取得は今見ている範囲のまま)。
地図の塗り(緑・黄)は、保存先に取得済みの範囲すべてを、今のチェックに対して示します。チェックを足すと、前に取った範囲が黄に変わり、足りない項目があることが分かります。
2. 基本の流れ
- 取得データはQGISプロジェクトファイルと同階層のフォルダに格納します。データ取得する前にプロジェクトを保存してください。
- 地図を作業する範囲へ動かします。範囲に掛かるメッシュが橙の枠で出ます。
- 左の「使用データ」で、必要な項目にチェックを入れます。
- 「取得」を押します。ログインしていなければ、ログインを求めます。
- 取得が終わると、レイヤーパネルのグループに配置されます。
3. 画面の構成
| 使用データ | 基盤地図情報と最適化ベクトルタイルの項目。チェックした項目を取得し、レイヤーへ配置し、地図の塗りの基準にします。同じ地物はどちらか一方だけ選べます(⇄)。「ロック」を押すと、今のチェックをプロジェクトの構成として記録し、変えられないようにします(「ロック中」)。同じ構成で別の場所を取得するときに使います。もう一度押すと外れます。ロックを外して変えたチェックは、「構成を復元」でロックに最後に記録した構成に戻せます。 |
|---|---|
| 状況の表 | 表示範囲のメッシュごとに、最新のデータの日付と保存済みの状況。「最新の状況を確認」で問い合わせ直します。 |
| 保存とレイヤー | 保存先の GeoPackage、グループ名、取り直さない設定、取得後に配置する設定。 |
| 実行の区域 | 取得する件数の見込み、処理中は進み具合。右に「取得」「レイヤーへ配置」「配置する範囲」。待機中はプレビュー地図のチェックと地図の凡例。 |
| 記録 | 開くと窓の下に記録が出ます。右に「マニュアル」と言語の切り替え。 |
4. 保存先
初めは、プロジェクトと同じ階層の gsi_fgd_builder/gsi_fgd_builder.gpkg です。使う保存先はプロジェクトに記録されるので、次に開いたときも同じものが選ばれます。
- そこにすでにデータがあれば、「共有データとして使用しますか?」と聞きます。「いいえ」なら、別の場所か別の名前を選びます。
- 「…」で別の場所の GeoPackage も選べます。地域ごとのデータを、複数のプロジェクトで共有することもできます。
- プロジェクトを保存するまでは取得できません。
5. 取得と中止
- 取得はメッシュごとに進めます。1つのメッシュは、チェックした内容すべてをそろえてから保存します。
- 「中止」は取り込み中のメッシュを終えてから止まり、もう一度押す「すぐに止める」は、そのメッシュを取得前の状態のまま止まります。どちらでも、中途半端なメッシュは残りません。
- 取得中に窓を閉じると、中止の仕方を選んでから閉じます。
6. ログイン
取得には、基盤地図情報ダウンロードサービスの利用者登録(無料)とログインが必要です。最新の状況の確認・地図の塗り・レイヤーへの配置は、ログインしなくても使えます。
最適化ベクトルタイルは、国土地理院の公開ページ(optimal_bvmap)から別途取得することもできます。
7. データの利用と出典
このプラグインで取得するデータは、すべて国土地理院のものです。取得したデータを地図や資料、画面で使うとき、人に渡すときは、国土地理院の利用規約と測量法に従ってください。
出典の表示
取得したデータを使った地図・資料・画面には、出典を示します。書き方の例です。
| 基盤地図情報 | 出典:基盤地図情報(国土地理院) |
|---|---|
| 最適化ベクトルタイル | 出典:国土地理院最適化ベクトルタイル |
| 両方を使ったとき | 出典:基盤地図情報、最適化ベクトルタイル(国土地理院) |
配置したレイヤーには、レイヤーのプロパティの「メタデータ」の権利の欄に出典を入れてあります。印刷レイアウトなどで出典を書くときの手がかりにしてください。
加工したとき
取得したデータを加工して(切り出し、属性の変更、ほかのデータとの重ね合わせなど)使うときは、出典に加えて加工したことを書きます。加工したものを、国土地理院が作ったように見せてはいけません。
| 書き方の例 | 基盤地図情報(国土地理院)を加工して作成 |
|---|
このプラグインが取り込むときに行っていること:
- 基盤地図情報:ZIP の中の GML を GeoPackage の表へ並べ替え、メッシュの番号とデータの日付の項目を足します。曲線の地物は線分に直し、項目
fid(地物ID)は名前をsrc_fidに変えます。座標と、ほかの属性の値は変えません。 - 最適化ベクトルタイル:タイルの座標(ウェブメルカトル)を経緯度(JGD2011)に変換します。地物はタイルの枠で切られた形のまま保存し、タイルの番号と分類コードの名前(種別)の項目を足します。
測量法の承認申請
基盤地図情報は、測量法の「基本測量の測量成果」にあたります。複製・使用の目的や方法によっては、国土地理院長の承認申請が必要です(測量法 第29条・第30条)。
- 2019年12月の運用の見直しで、出典を示すだけで使える範囲が広がりました。
- 申請が要るかどうかは、使い方によって変わります。国土地理院の「地図の利用手続ナビ」で確かめられます。
- 申請が要る場合は、国土地理院のワンストップサービスから申請できます。
GeoPackage を人に渡すとき
保存先の GeoPackage の中身は、国土地理院のデータそのものです。人に渡したり公開したりするときも、上の出典の表示や手続はそのまま当てはまります。受け取る人にも、出典と利用条件を伝えてください。
最適化ベクトルタイル(試験公開)
- 国土地理院が試験公開しているデータです。URL やデータの内容が、予告なく変わったり、公開が終わったりすることがあります。
- 記号や注記の分類コードの意味は、国土地理院が公開している一覧から読み取れたものだけを入れています。
プレビュー地図(地理院タイル)
プレビュー地図は、取得する範囲を選ぶための背景です。この窓を開いている間だけレイヤーパネルに置き、閉じると外します。GeoPackage には保存しません。出典は窓の下と、レイヤーのメタデータに示しています。
データの時点と正確さ
- 基盤地図情報は、メッシュと項目ごとに更新の時点が違います。データの日付は、状況の表とレイヤーの名前(例:
道路縁-20260701)で確かめられます。 - 最適化ベクトルタイルの日付は、配信ファイルが更新された日で、データの時点そのものではありません。
- 地図の精度は、データの元になった地図の縮尺(地図情報レベル)によって違います。現地の測量の代わりにはなりません。
確認先
8. このプラグインについて
- このプラグインは国土地理院が制作したものではありません。国土地理院が推奨・保証するものでもありません。
- このプラグインは無保証です。使用によって生じた結果について、作者は責任を負いません。
- ライセンスは GNU General Public License v2 以降です。
1. The idea
Visible meshes only (default)
Orange frames = the area in view. Fetching and placing layers cover these meshes only.
All stored areas
The layers show every area stored in the GeoPackage (fetching still covers the area in view).
The green and yellow fill shows every stored area against the current checks. Check a new item and earlier areas turn yellow, so you can see what is missing.
2. Basic workflow
- The fetched data is stored in a folder at the same level as the QGIS project file. Save the project before fetching data.
- Move the map to your work area. The meshes covering it are shown with orange frames.
- Check the items you need under "Data to use".
- Press "Fetch". Log in when asked, for the Fundamental Geospatial Data.
- When fetching has finished, the layers are placed in a group in the Layers panel.
3. Window layout
| Data to use | Items of the Fundamental Geospatial Data and of the optimized vector tiles. The checked items are fetched, placed as layers, and used as the basis of the map colours. For the same features, only one of the two can be selected (⇄). "Lock" records the checked items as the configuration of the project and keeps them from being changed ("Locked"); use it to fetch other areas with the same configuration. Press again to unlock. After changing the checks while unlocked, "Restore" returns them to the configuration last recorded by the lock. |
|---|---|
| Status table | For each mesh in view, the latest data date and what is stored. "Check latest status" queries again. |
| Storage and layers | The GeoPackage, the group name, whether to skip up-to-date data, and whether to place layers after fetching. |
| Action area | What will be fetched, or the progress while working. On the right: "Fetch", "Place layers" and the placement range. When idle: the preview map check box and the map legend. |
| Log | Opens the log below the window. On the right: "Manual" and the language switch. |
4. Where data is saved
By default, gsi_fgd_builder/gsi_fgd_builder.gpkg next to the project file. The GeoPackage used is recorded in the project, so it is selected again next time.
- If data already exists there, you are asked whether to use it as shared data. If not, choose another location or another name.
- "…" selects a GeoPackage elsewhere. Several projects can share the data of one region.
- Fetching is not possible until the project is saved.
5. Fetching and stopping
- Fetching goes mesh by mesh. Each mesh is saved only when all checked contents are complete.
- "Stop" finishes the mesh being imported first; "Stop now" (pressing again) leaves that mesh as it was before the fetch. Either way, no half-imported mesh is left.
- Closing the window during a fetch asks how to stop, then closes.
6. Login
Fetching requires a free user account for the GSI download service (基盤地図情報ダウンロードサービス) and a login. Checking the latest status, the map colours and placing layers work without logging in.
The optimized vector tiles can also be obtained separately from the GSI release page (optimal_bvmap).
7. Use of data and attribution
All data fetched by this plugin belongs to the Geospatial Information Authority of Japan (GSI). When you use it in maps, documents or on screen, or give it to others, follow the GSI terms of use and the Survey Act of Japan.
Showing the source
Maps, documents and screens that use the fetched data must show the source. Examples:
| Fundamental Geospatial Data | Source: Fundamental Geospatial Data (GSI Japan) |
|---|---|
| Optimized vector tiles | Source: GSI optimized vector tiles |
| Both | Source: Fundamental Geospatial Data and optimized vector tiles (GSI Japan) |
The placed layers carry the source in the rights field of the layer metadata (layer properties → Metadata). Use it when writing the source in a print layout.
When you process the data
When you process the data (clipping, changing attributes, combining it with other data, etc.), state that it was processed in addition to the source. Processed data must not be presented as if GSI had made it.
| Example | Created by processing the Fundamental Geospatial Data (GSI Japan) |
|---|
What this plugin does when importing:
- Fundamental Geospatial Data: the GML in the ZIP files is rearranged into GeoPackage tables, and fields for the mesh code and the data date are added. Curved features are converted to line segments, and the field
fid(feature ID) is renamedsrc_fid. Coordinates and other attribute values are not changed. - Optimized vector tiles: tile coordinates (Web Mercator) are converted to latitude/longitude (JGD2011). Features are stored as clipped by the tile boundaries, and fields for the tile number and the code name (種別) are added.
Approval under the Survey Act
The Fundamental Geospatial Data is a result of basic surveys under the Survey Act. Depending on the purpose and method of copying or using it, an application for approval to the Director-General of GSI is required (Survey Act, Articles 29 and 30).
- Since a revision of the procedure in December 2019, more uses only need the source to be shown.
- Whether an application is needed depends on the use. GSI's "地図の利用手続ナビ" (map use procedure guide) helps you check.
- Applications can be made through GSI's one-stop service.
When you give the GeoPackage to others
The GeoPackage contains GSI data as it is. Showing the source and the procedures above also apply when you give it to others or publish it. Tell the recipients the source and the terms of use.
Optimized vector tiles (trial release)
- This data is a trial release by GSI. The URL and contents may change, or the release may end, without notice.
- Only the code meanings that could be read from GSI's published code list are included.
Preview map (GSI Tiles)
The preview map is a background for choosing the area. It is in the Layers panel only while this window is open, and is not saved in the GeoPackage. Its source is shown at the bottom of the window and in the layer metadata.
Data date and accuracy
- The Fundamental Geospatial Data is updated at different times for each mesh and item. Check the data date in the status table and in the layer names (e.g.
Road edge-20260701). - The date of the optimized vector tiles is the date the distributed file was updated, not the date of the data itself.
- Accuracy depends on the scale (map information level) of the source maps. The data does not replace a field survey.
Where to check (in Japanese)
8. About this plugin
- This plugin was not made by GSI, and is not endorsed or guaranteed by GSI.
- The plugin is provided without warranty; the author takes no responsibility for any result of its use.
- License: GNU General Public License v2 or later.