bertt / mapbox-vector-tile-cs

A .NET library for decoding a Mapbox vector tile
MIT License
74 stars 14 forks source link

Bugs in Attribute Parser ... #10

Closed Tom-Cuthill closed 7 years ago

Tom-Cuthill commented 7 years ago

The AttributeParser does not currently handle sIntValues and the code is incorrect for uInts. The bottom of the GetAttr method should look like this:

        else if(value.HasSIntValue)
        {
            res = value.SintValue;
        }
        else if (value.HasUIntValue)
        {
            res = value.UintValue;
        }

Cheers, Tom Cuthill

bertt commented 7 years ago

Thanks for noticing! Fixed in https://github.com/bertt/mapbox-vector-tile-cs/commit/73165c428bb49cc30c64452cada469c45f5f9a9e , published new NuGet package 3.1.4

bertt commented 7 years ago

maybe you can attach a test tile with sIntValues and UintValues? So I can add tests on it.

Tom-Cuthill commented 7 years ago

This pbf contains a cadastral tile which includes a signed int value in its gid attribute.

cadastral.zip

bertt commented 7 years ago

thanks test is added https://github.com/bertt/mapbox-vector-tile-cs/commit/25aea906d6e5205283158f9e706c96d72e433aab