NetTopologySuite ShapeDataReader 错误:不支持的 DBF 读取器类型 13 [英] NetTopologySuite ShapeDataReader Error: Unsupported DBF reader Type 13
问题描述
我正在尝试读取我从 geojson.io 创建的 .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");
文件:
POLYGON.dbf
POLYGON.prj
POLYGON.shp
POLYGON.shx
推荐答案
基于内联 docstrings 由 NTS 提供,ShapeDataReader
构造函数接受没有 .shp
文件扩展名,因此请尝试以下操作:
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")
这篇关于NetTopologySuite ShapeDataReader 错误:不支持的 DBF 读取器类型 13的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!