NetTopologySuite ShapeDataReader Error: Unsupported DBF reader Type 13

萝らか妹 提交于 2020-01-25 06:50:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!