bertt / mapbox-vector-tile-cs

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

Nested geometry data arrays are not identified. #3

Closed Kristonitas closed 8 years ago

Kristonitas commented 8 years ago

I tried to use this plugin with the mapbox tile: https://b.tiles.mapbox.com/v4/mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7/13/4260/2911.vector.pbf

If I parse this tile with javascript libraries, I see multiple arrays in the geometry of a feature: tile.layers.road.feature(i).loadGeometry().length //usually has a value of 1, but sometimes more

The c# package can only show a single List and the lines I render jump around the tile, connecting the separate paths.

I can include more detailed instructions to show the problem, but I found the issue to be obvious in any tile I try to load and display with c# code.

bertt commented 8 years ago

related to issue #2, sample tile has version 2 layers

bertt commented 8 years ago

replaced the geometry parsing part, results look ok to me with the mapbox tile (see first test in https://github.com/bertt/mapbox-vector-tile-cs/blob/master/tests/mapbox.vector.tile.tests/TileParserTests.cs). Todo: re-add the ToGeojson method

Kristonitas commented 8 years ago

The plugin works as expected, I can separate grouped lines. Haven't tested polygons, as it isn't needed for me.

Thanks.

bertt commented 8 years ago

ok great 👍