问题
I'm trying to read an .shp that I created from geojson.io to do some tests, it gave me an .zip which contains the files below.
When I try to read the .shp alone I'm having the error: "System.IO.FileNotFoundException: '.../POLYGON.dbf'".
When I try to read the .shp with the .dbf in the same folder I'm having the error: "System.NotSupportedException: 'Unsupported DBF reader Type 13'".
I tried to open this .shp in QGIS and it worked.
I tried to read other .shp files from other sources with my code and it worked.
Code:
ShapeDataReader reader = new ShapeDataReader("...\\POLYGON.shp");
Files:
POLYGON.dbf
POLYGON.prj
POLYGON.shp
POLYGON.shx
回答1:
Based on the inline docstrings provided by NTS, ShapeDataReader
constructor takes in the shapefile path without the .shp
file extension, hence try the following:
ShapeDataReader reader = new ShapeDataReader("...\\POLYGON")
来源:https://stackoverflow.com/questions/59655295/nettopologysuite-shapedatareader-error-unsupported-dbf-reader-type-13