0

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.

Jay
  • 11
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Apr 14 '22 at 11:46

1 Answers1

0

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;
        
CAD Developer
  • 1,532
  • 2
  • 21
  • 27