Skip to content

Bug in ShapefileReaderExtensions #368

@TomQv

Description

@TomQv

Itinero.IO.Shape.Reader.ShapefileReaderExtensions:
Bug AddToAttributeCollection(this ShapefileDataReader reader, IAttributeCollection collection) at line 49:

public static void AddToAttributeCollection(this ShapefileDataReader reader, IAttributeCollection collection)
{
    var valueString = string.Empty;
    for (var i = 1; i < reader.FieldCount; i++)
    {
        var name = reader.GetName(i);
        // 5.12.23, Tom, bug
        //var value = reader.GetValue(i - 1);
        var value = reader.GetValue(i);
        valueString = string.Empty;
        if (value != null)
        {
            valueString = value.ToInvariantString();
        }
        collection.AddOrReplace(name, valueString);
    }
}

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