Skip to content

ShpReader fails to read null-shapes written by NetTopologySuite.IO.ShapefileWriter.WriteNullShapeRecord() #67

@pvlcursus

Description

@pvlcursus

The WriteNullShapeRecord() method of NetTopologySuite.IO.ShapefileWriter writes a record length of 12 for null shapes. This length is wrong but is ignored by most geoprocessing software, including NetTopologySuite.IO.ShapefileReader, so the shapefile opens correctly.

However, NetTopologySuite.IO.Esri.Shp.Readers.ShpReader doesn't ignore this length and advances the reading pointer with 12 words, causing the next shape to be read incorrectly and throwing an exception.

Can the record length be ignored for null shapes? This would avoid interoperability problems with shapefiles generated by the old implementation.

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