NetTopologySuite/NetTopologySuite.IO.Esri

Shapefile Reader throws an exception on invalid geometry.

Closed this issue · 1 comments

I have upgraded to the new NetTopologySuite.IO.Esri library from the older/deprecated NetTopologySuite.IO.ShapeFile. The old version would allow me to read a Shapefile and check each feature for "Geometry.IsValid" before doing anything with it (alerting the user to the issue with the feature's name etc). The new library immediately throws an exception without the ability to alert the user or simply skip said invalid feature.

Solved by using the "GeometryBuilderMode.IgnoreInvalidShapes" option within ShapefileReaderOptions.