Skip to content

Open a shapefile which contains faulty data #6

Description

@airbreather

From @laetitiamh on September 7, 2016 14:58

Hi!

I am trying to open a shapefile that contains building outlines using NetTopologySuite.IO.ShapefileReader.
I only get around 700 of the 5000+ buildings as a result as the reading stops early because of a faulty linear ring "Number of points must be 0 or >3". This shapefile is automatically generated and contains some errors. I can open the same file in a tool like http://mapshaper.org/ and I can see all the outlines.

The ShapefileEnumerator::MoveNext will return false when it encounters such an exception and as a result the ShapeFileReader::ReadAll will abort the foreach loop.
Could we specifiy as an option to the ShapefileReader to continue reading until the end of the file even when it finds faulty geometries?

Thank you very much!

Copied from original issue: NetTopologySuite/NetTopologySuite#121

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions