从另一个GeodataFrame中替换GeodataFrame中多边形的ID值
我在另一个较大的单个多边形内有多边形,我希望能够将以前多边形的ID值(例如)替换为后者的ID值。
假设我有一个带有3个多边形的GeodataFrame,它们的ID为[8,20,55]
。现在,这些多边形实际上在另一个具有[2]
的ID的较大多边形(第二个GeodataFrame)内。我想知道如何将[8,20,55]
的值从第一个GeodataFrame转换为[2,2,2]
根据较大的来自第二个GeodataFrame的多边形。从概念上讲,图像看起来像这样:
I have polygons inside another bigger single polygon and I want to be able to replace the ID values (for example) of the former polygon to that of the latter.
Suppose I have a geodataframe with 3 polygons and the IDs of them are [8, 20, 55]
. Now, these polygons are actually inside another bigger polygon (second geodataframe) with an ID of [2]
. I want to know how it is possible to convert the values of [8,20,55]
from the first geodataframe to [2,2,2]
according to the bigger polygon from the second geodataframe. Conceptually the image looks like this:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
sjoin
:
Use
sjoin
: