Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in ShapefileReaderExtensions #368

Open
TomQv opened this issue Dec 5, 2023 · 0 comments
Open

Bug in ShapefileReaderExtensions #368

TomQv opened this issue Dec 5, 2023 · 0 comments

Comments

@TomQv
Copy link

TomQv commented Dec 5, 2023

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);
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant