NetTopologySuite / NetTopologySuite.IO.ShapeFile

The ShapeFile IO module for NTS.
35 stars 25 forks source link

System.NotSupportedException: 'Unsupported DBF reader Type 13 #28

Open raulbrennersc opened 4 years ago

raulbrennersc commented 4 years ago

I'm starting with NetTopologySuite and I'm trying to read an .shp that I created from geojson.io to do some tests, it gave me an .zip file which contains 4 files (.dbf, .prj, .shp and .shx).

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");

File: polygon.zip

NetTopologySuite.IO.ShapeFile version: 1.15.3

DGuidi commented 4 years ago

Only checking at the source code, error looks thrown in this line

According to DBF specs the first byte should be the DBase version number, so probably your file is in a format non supported right now.

Hope to check the files in the afternoon.