Groups
Groups
Sign in
Groups
Groups
QGIS初心者質問グループ
Conversations
About
Send feedback
Help
Geotiffの一変換
735 views
Skip to first unread message
EJEC吉中輝彦
unread,
Mar 9, 2022, 10:39:03 PM
3/9/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
お世話になります。
GeotiffのXY座標の変換を行いたいのですが、このようなことは可能でしょうか?
現在手元に緯度がX方向、経度がY方向で作られておりますGeotiffがあります。
その画像なのですが、点群から作られたものであるのですが、点群の段階でXYを取り違えていたことが確認できました。(もとの点群は無いとの事です。)
そのようなGeotiffのばあい、XY座標を入れ替えないと入れないのですが、このような処理は可能でしょうか?
できる場合、やり方を知りたいです。
よろしくお願いします。
sakuya_izayoi
unread,
Mar 9, 2022, 10:42:55 PM
3/9/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
すみません、上記は、sakuya_izayoiからの質問です。
(google meet使ったままのアカウントにしておりました。)
ベクトルファイルならばXYのスワップでいけるのですが、Geotiffだとワールドファイルで変換した方が良いでしょうか?
いちおう、ワールドファイルでできたと言えばできたのですが、なんだかすっきりしないです。
Gdalで機能を探しているのですが、まだ見つけれてません。
2022年3月10日木曜日 12:39:03 UTC+9 EJEC吉中輝彦:
wata909
unread,
Mar 9, 2022, 11:07:04 PM
3/9/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
ワールドファイルでできたなら、gdal_translate(だっけかな?)GeoTiffに変換すればできるのでは?
あとは、gdal2xyzで、xyz形式のテキストに変換して、それを手動でXYを入れ替え、それから、GeoTiffにもどすとかですかね。
2022年3月10日木曜日 12:42:55 UTC+9 sakuya_izayoi:
sakuya_izayoi
unread,
Mar 9, 2022, 11:10:46 PM
3/9/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
追伸
実際にやった時には、
ワールドファイル作成だけではうまくいかなかったので、画像加工ソフト(gimp)で回転及び反転を行ってから
ワールドファイルで座標を与えております
①geitiffから位置情報を削除。
(少し前に福岡さんが投稿なされた方法)
「
https://gis.stackexchange.com/questions/218342/delete-all-tiff-metadata
次のようなコードが示されていました。
gdal_translate -of GTiff -co PROFILE=BASELINE input_geotiff.tif output_clean.tif」
②GIMPで画像を読み込み、画像回転及び画像をX軸で反転
③ワールドファイルを作成してQGISに読み込ませる。
という流れです。
2022年3月10日木曜日 12:42:55 UTC+9 sakuya_izayoi:
すみません、上記は、sakuya_izayoiからの質問です。
sakuya_izayoi
unread,
Mar 9, 2022, 11:12:19 PM
3/9/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
wata909様
なるほど。点群にした後にGeotiffにした方が早いですね。
Geotiffだから云々と考えていたけど、点群の方が良いですね。
ありがとうございます。
2022年3月10日木曜日 13:10:46 UTC+9 sakuya_izayoi:
ありた
unread,
Mar 10, 2022, 7:56:20 AM
3/10/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
こんにちは
うまくいくかわかりませんが、ラスタメニューの「再投影( warp )」を選択し、
詳細パラメータ内の「追加のコマンドラインパラメータ」の入力枠に
-ct "+proj=axisswap +order=2,1,3,4"
と入力し、実行してみるとどうでしょうか。
sakuya_izayoi
unread,
Mar 10, 2022, 6:57:38 PM
3/10/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
ありた様
軸の入れ替えってこのように記述するんですね。
https://proj.org/operations/conversions/axisswap.html
がもとですかね?
ふむふむ。
結構ありがたいかもです。今から点群から作ったラスタも結構手に入りやすくなりそうだけど、数学座標と測量座標とがしばらく混ざりそうだから
覚えておいた方がよさそうな感じ。
2022年3月10日木曜日 21:56:20 UTC+9 ありた:
ありた
unread,
Mar 10, 2022, 10:00:05 PM
3/10/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
ラスタデータの再投影を行う gdalwarp ですが、一般的な使い方は、変換元の参照系を
-s_srs
オプションで、変換先の参照系を
-t_srs
オプションで指定する方法します。
変換前後の座標参照系を使わず、具体的な変換操作自体を明示的に
-ct
オプションで
指定する方法もあり、 Proj の書式で指定します。
このオプションを利用すると、より細かく、意図した変換が可能です。
ありた
unread,
Mar 10, 2022, 10:06:12 PM
3/10/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
すみません。
Proj の記法だけでなく、 WKT で記載されたオペレーションや、オペレーション定義された
EPSG コードでも指定することは可能ですね。
wata909
unread,
Mar 11, 2022, 3:29:25 AM
3/11/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
なるほど、projの定義をいちいち書かなくていいように、EPSGを使っても変換できるよ、ということですね。
不勉強で知りませんでした。勉強になりました
>
-ct "+proj=axisswap +order=2,1,3,4"
をためしてみたら、ちゃんと変換できました!
参考になりました。ありがとうございますm(__)m
2022年3月11日金曜日 12:06:12 UTC+9 ありた:
Reply all
Reply to author
Forward
0 new messages