Groups
Groups
Sign in
Groups
Groups
QGIS初心者質問グループ
Conversations
About
Send feedback
Help
pythonを使ってポリゴンを作成したい
715 views
Skip to first unread message
K N
unread,
Jan 23, 2022, 9:07:11 AM
1/23/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初心者質問グループ
皆様 お世話になります。
少々、プログラムを使うので高度な質問かもしれませんが
よろしくお願いいたします。
shapefile.Writer(shapefile.POLYGON)
というクラスを使って、読み込んだポリゴンを
属性テーブルだけ変更してジオメトリとしては
同じものを出力するプログラムを作成しました。
すると、画像のように処理後のデータ
が正しいポリゴンになっていないものが発生しました。
このような場合、どのような所が原因か
アドバイス頂ければ幸いです。
よろしくお願いいたします。
元データ.jpg
処理後.jpg
Bun
unread,
Jan 23, 2022, 6:43:16 PM
1/23/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初心者質問グループ
こんにちは
ジオメトリをいじっていないのであれば、
もとのデータのジオメトリにエラーがある場合があるのではないでしょうか。
ジオメトリの有効性のチェック、ジオメトリの修復等を実施したあとのデータで
作成されたプログラムを通すといかがでしょうか。
すでにお済みでしたらすみません。
2022年1月23日日曜日 23:07:11 UTC+9
sc42...@gmail.com
:
K N
unread,
Jan 24, 2022, 7:22:48 AM
1/24/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初心者質問グループ
Bun様 回答ありがとうございます。
元データは問題ないのでプログラムの書き方が問題です。
ポイントシェープを作成する場合なら、ねじれたりしないので
簡単に問題なく作成できるのですが、ポリゴンの場合は難しいです。
何か参考となる情報とか出てきたら教えてください。
ありがとうございました。
2022年1月24日月曜日 8:43:16 UTC+9 Bun:
ありた
unread,
Jan 24, 2022, 9:08:03 AM
1/24/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初心者質問グループ
こんにちは
この掲示板は QGIS に関する質問掲示板です。
GIS 全般はダメとまではいわないでしょうが、主に閲覧している人で Python を利用している人は
少数派でしょう。 teratail などのプログラミング系の掲示板や pyshp の issues 等にあたった方が
よいと思います。
また、プログラムの書き方の問題と想定されるのであれば(そうでなくても)、なぜコードを
提示されないのでしょうか。
ほかの人が再現できないことには、不適切な箇所の指摘やアドバイスのしようがありません。
Reply all
Reply to author
Forward
0 new messages