NetTopologySuite / NetTopologySuite.IO.ShapeFile

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

ShapeHandler.GeometryInstantiationErrorHandling cannot be set when using ShapefileReader #43

Closed stijnherreman closed 2 years ago

stijnherreman commented 4 years ago

https://github.com/NetTopologySuite/NetTopologySuite/commit/19f2f409105726780d6988c7a08c97dfa5e5d17f introduced ShapeHandler.GeometryInstantiationErrorHandling, but this property is only accessible through an instance of a handler. When using ShapefileReader, the handler is a private field of the ShapefileEnumerator class, making it impossible to change the value of this property.

Relevant code:

https://github.com/NetTopologySuite/NetTopologySuite.IO.ShapeFile/blob/bef5ec80cc5b1b5a95f4df3bfc5a61ab837525a1/src/NetTopologySuite.IO.ShapeFile/Handlers/ShapeHandler.cs#L520

https://github.com/NetTopologySuite/NetTopologySuite.IO.ShapeFile/blob/bef5ec80cc5b1b5a95f4df3bfc5a61ab837525a1/src/NetTopologySuite.IO.ShapeFile/Handlers/MultiLineHandler.cs#L86-L103