python将图像中的线转换为多界线

发布于 2025-02-12 09:06:28 字数 414 浏览 0 评论 0原文

我有看起来像这样的.png文件:

”在此处输入图像描述

我知道xy坐标角落,所以我可以将其放在地图中(每个.png通常覆盖50x25米的面积,因此相当准确),

我想从.png中的黑线创建多ininestring的对象

。做吗?作为新手,我甚至在努力寻找我需要搜索的东西。

我使用地理杂志并充满信心地使用了地形,现在我正在阅读有关rasterio,如何栅格图像,涂上掩码,对其进行矢量化……我不确定这会做到的。我需要寻找什么?

I have .png files that look something like this:

enter image description here

I know the x-y coordinates for the corners, so I can place it in a map (each .png normally covers an area of 50x25 meters, so it’s fairly accurate)

I would like to create multilinestring objects from the black lines in the .png

What is the process / steps needed to do it? As a newbie I am struggling to even find what I need to search for.

I use geopandas and shapely with confidence, and I am now reading about rasterio, how to raster an image, apply a mask, vectorize it… I am not sure that will do it. What do I need to look for?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文