Groups
Groups
Sign in
Groups
Groups
QGIS初心者質問グループ
Conversations
About
Send feedback
Help
ポリゴンの重心座標の抽出方法
1,572 views
Skip to first unread message
フリード・ティンクス
unread,
Jul 13, 2019, 9:45:45 PM
7/13/19
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初心者質問グループ
こちらフリードです。
お疲れ様です。
QGISのフィールド計算機能を使って、ポリゴンの重心座標を抽出したいのですが、
いつもは、ジオメトリツールから中心座標を抽出したのちに、$xや$yで座標を計算したのちに、フィールド結合で結合しております。
数が多いと大変なので、一気に計算する方法はありませんでしょうか?
centroid($geometry)でできるかなと考えてたのですが、うまくいきませんでした。
福岡
unread,
Jul 13, 2019, 10:23:47 PM
7/13/19
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初心者質問グループ
フリード・ティンクス
こんにちは
プロセッシングツールの「ベクター生成 - ポリゴン内にポイント(ピクセル重心)生成」はどうでしょうか?
フリード・ティンクス
unread,
Jul 15, 2019, 8:16:33 AM
7/15/19
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初心者質問グループ
福岡様
フリードです。ありがとうございます。
今回はピクセル重心では具合が悪いです。
「 ポリゴン内にポイント(ピクセル重心)生成」
ではラスタレイヤが必要となってしまい、重心座標とラスタの交差地点の値をとって拾うものだからです。
今回は、ポリゴンの重心座標を直接取得したいという質問でした。
分かりにくくてすみません。
キタ
unread,
Jul 15, 2019, 8:51:58 AM
7/15/19
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初心者質問グループ
プロセッシングツールの「重心」と「ジオメトリ属性の追加」を組み合わせるといいですね。
それぞれ順番に行ってもいいですが、レイヤファイルがたくさんあるのであれば、グラフィカルモデラーを使うと、コマンドを組み合わせて、一度に処理を行うことも出来ます。
参考に、グラフィカルモデラーのモデルファイルを作成したので添付します。
キタ
座標付き重心ポイント作成.model3
adachi
unread,
Jul 17, 2019, 5:50:57 AM
7/17/19
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初心者質問グループ
フリード様
ご要望としては、重心のポイントは特に生成不要でポリゴンに重心座標を付与したい、ということでよろしいでしょうか。
フィールド計算機で
x( $geometry)
y( $geometry)
のように入力すると、それぞれのポリゴンの重心のX, Y座標が計算されるかと思います。
フリード・ティンクス
unread,
Jul 21, 2019, 7:36:31 AM
7/21/19
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初心者質問グループ
adachiさま
ありがとうございます。その方法です。
そのような方法で計算できるのですね。覚えておきます。
下手な文章から受け取ってもらって嬉しいです。伝えるのは難しいですね。
Reply all
Reply to author
Forward
0 new messages