从C#中的ShapeFile获取原始数据

发布于 2025-01-21 04:16:59 字数 130 浏览 2 评论 0原文

我想从c#中的shapefile获取列表/数组。就像您使用在线shapefile到CSV转换器一样,但当然不是在CSV中转换,而只是作为一系列字符串。我看到有些人推荐了Dotspatial,但我发现很难找到文档。我不想画形状或任何其他复杂的东西。

I want to get a list/array from a shapefile in C#. Like when you use an online shapefile to csv converter but of course not converted in csv but just as an array of strings. I saw some people recommend DotSpatial but I find it very hard to find documentation. I don't want to draw shapes or any other complicated stuff.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

杀手六號 2025-01-28 04:16:59

在Dotspatial中,您可以轻松阅读这样的数据:

using DotSpatial.Data;

Shapefile sf = Shapefile.OpenFile(Path);
System.Data.DataTable dt = sf.Attributes.Table;
List<ShapeRange> sr = sf.ShapeIndices;
DotSpatial.Data.IFeatureList features = sf.Features;
        

In DotSpatial You can easy read data like this:

using DotSpatial.Data;

Shapefile sf = Shapefile.OpenFile(Path);
System.Data.DataTable dt = sf.Attributes.Table;
List<ShapeRange> sr = sf.ShapeIndices;
DotSpatial.Data.IFeatureList features = sf.Features;
        
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文