NetTopologySuite / NetTopologySuite.IO.ShapeFile

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

Issue with 'L' Column in DBF with Length greater than 1. #87

Closed mahdirastegari closed 1 month ago

mahdirastegari commented 2 months ago

I encountered a shapefile with an 'L' column where the Length is greater than 1. However, when reading the logical column, there is a mismatch at the start of the reader.

Below is an image to illustrate the mismatch I'm referring to.

image

Here is the shape file zipped which I face the issue. roads4.zip

Although I understand that the Logic column should have a Length of 1, other importers such as QGIS can import this file correctly, so I believe we should address the issue.

mahdirastegari commented 2 months ago

I believe we're encountering the same problem with the Date issue because we're only reading 8 bytes. According to the code, if the shapefile date column is exported with a size other than 8, we'll encounter the same problem.

If everyone agrees that this is the case, I can submit a pull request to resolve the issue for both 'L' and 'D' column types.

FObermaier commented 2 months ago

This package is deprecated, please use the successor.

KubaSzostak commented 1 month ago

Fixed by https://github.com/NetTopologySuite/NetTopologySuite.IO.Esri/issues/51. Thank you @mahdirastegari.