问题描述
我正在尝试读取从创建的.shp,它进行了一些测试我是一个包含以下文件的.zip。
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.
当我尝试单独读取.shp时,出现了错误: System.IO.FileNotFoundException:'。 ../POLYGON.dbf'。
当我尝试在同一文件夹中读取带有.dbf的.shp时,出现错误: System.NotSupportedException:'Unsupported DBF reader Type 13'。
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'".
我试图在QGIS中打开该.shp,但它起作用。
我试图用我的代码从其他来源读取其他.shp文件,并且它起作用。
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.
代码:
ShapeDataReader reader = new ShapeDataReader("...\\POLYGON.shp");
文件:
Files:
POLYGON.dbf
POLYGON.prj
POLYGON.shp
POLYGON.shx
推荐答案
基于内联由NTS提供, ShapeDataReader
构造函数采用没有 .shp
文件扩展名的shapefile路径,因此请尝试以下操作:
Based on the inline docstrings provided by NTS, ShapeDataReader
constructor takes in the shapefile path without the .shp
file extension, hence try the following:
ShapeDa taReader reader = new ShapeDataReader( ... \\POLYGON)
这篇关于NetTopologySuite ShapeDataReader错误:不支持的DBF阅读器类型13的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!